diff --git a/ketcher-autotests/tests/File-Management/Open-And-Save-Files/Open-File/open-file.spec.ts b/ketcher-autotests/tests/File-Management/Open-And-Save-Files/Open-File/open-file.spec.ts index 03e912d8ec..af0bb8e084 100644 --- a/ketcher-autotests/tests/File-Management/Open-And-Save-Files/Open-File/open-file.spec.ts +++ b/ketcher-autotests/tests/File-Management/Open-And-Save-Files/Open-File/open-file.spec.ts @@ -65,7 +65,7 @@ the first one disappears. Couldn't reproduct manually. // add second structure from file to canvas await selectTopPanelButton(TopPanelButton.Open, page); - await openFile('glutamine.mol', page); + await openFile('Molfiles-V2000/glutamine.mol', page); await waitForLoad(page, async () => { await pressButton(page, 'Add to Canvas'); }); diff --git a/ketcher-autotests/tests/Macromolecule-editor/Ket/ket-deserialize.spec.ts-snapshots/Ket-Deserialize-Open-ket-file-with-monomers-and-bonds-1-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Ket/ket-deserialize.spec.ts-snapshots/Ket-Deserialize-Open-ket-file-with-monomers-and-bonds-1-chromium-linux.png index 9fe32380e9..7f612bf447 100644 Binary files a/ketcher-autotests/tests/Macromolecule-editor/Ket/ket-deserialize.spec.ts-snapshots/Ket-Deserialize-Open-ket-file-with-monomers-and-bonds-1-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/Ket/ket-deserialize.spec.ts-snapshots/Ket-Deserialize-Open-ket-file-with-monomers-and-bonds-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts index bc8ea22aca..5f941444f8 100644 --- a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts +++ b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts @@ -19,18 +19,23 @@ import { waitForRender, } from '@utils'; -async function zoomWithMouseWheel( - page: Page, - numberOfMouseWheelScroll: number, - randomMouseWheelScroll: number, -) { +const topLeftCorner = { + x: -425, + y: -235, +}; + +async function zoomWithMouseWheel(page: Page, scrollValue: number) { await page.keyboard.down('Control'); - for (let i = 0; i < numberOfMouseWheelScroll; i++) { - await page.mouse.wheel(0, randomMouseWheelScroll); - } + await page.mouse.wheel(0, scrollValue); await page.keyboard.up('Control'); } +async function scrollHorizontally(page: Page, scrollValue: number) { + await page.keyboard.down('Shift'); + await page.mouse.wheel(0, scrollValue); + await page.keyboard.up('Shift'); +} + async function pasteFromClipboard(page: Page, fileFormats: string) { await selectTopPanelButton(TopPanelButton.Open, page); await page.getByText('Paste from clipboard').click(); @@ -72,9 +77,11 @@ test.describe('Macro-Micro-Switcher', () => { Description: Preview window of macro structure doesn't change in micro mode Test working incorrect now because we have bug https://github.com/epam/ketcher/issues/3603 */ + const scrollValue = -400; const moleculeLabels = ['A', '25R', 'baA', 'Test-6-Ph', 'Test-6-Ch']; await openFileAndAddToCanvas('KET/five-monomers.ket', page); await turnOnMicromoleculesEditor(page); + await scrollHorizontally(page, scrollValue); for (const label of moleculeLabels) { await page.getByText(label, { exact: true }).hover(); await takeEditorScreenshot(page); @@ -105,7 +112,12 @@ test.describe('Macro-Micro-Switcher', () => { Description: Micromolecules in macromode represented as CHEMs with generated name(F1, F2, ...Fn) */ await turnOnMicromoleculesEditor(page); - await openFileAndAddToCanvas('KET/eight-micromolecules.ket', page); + await openFileAndAddToCanvas( + 'KET/eight-micromolecules.ket', + page, + topLeftCorner.x, + topLeftCorner.y, + ); await turnOnMacromoleculesEditor(page); await takeEditorScreenshot(page); }); @@ -135,14 +147,19 @@ test.describe('Macro-Micro-Switcher', () => { await takeEditorScreenshot(page); }); - test('Check that the Ket-structure opened from the file in Macro mode is visible in Micro mode', async ({ + test('Check that the Ket-structure opened from the file in Macro mode is visible in Micro mode', async ({ page, }) => { /* Test case: Macro-Micro-Switcher Description: Mol-structure opened from the file in Macro mode is visible on Micro mode when */ - await openFileAndAddToCanvas('KET/stereo-and-structure.ket', page); + await openFileAndAddToCanvas( + 'KET/stereo-and-structure.ket', + page, + topLeftCorner.x, + topLeftCorner.y, + ); await turnOnMicromoleculesEditor(page); await takeEditorScreenshot(page); }); @@ -256,12 +273,12 @@ test.describe('Macro-Micro-Switcher', () => { await turnOnMicromoleculesEditor(page); await turnOnMacromoleculesEditor(page); // eslint-disable-next-line no-magic-numbers - await zoomWithMouseWheel(page, 5, -80); + await zoomWithMouseWheel(page, -400); await takeEditorScreenshot(page); // eslint-disable-next-line no-magic-numbers - await zoomWithMouseWheel(page, 5, 50); + await zoomWithMouseWheel(page, 250); await takeEditorScreenshot(page); await page.getByTestId('reset-zoom-button').click(); @@ -289,7 +306,7 @@ test.describe('Macro-Micro-Switcher', () => { await takeEditorScreenshot(page); // eslint-disable-next-line no-magic-numbers - await zoomWithMouseWheel(page, 5, 50); + await zoomWithMouseWheel(page, 250); await turnOnMacromoleculesEditor(page); await takeEditorScreenshot(page); @@ -371,7 +388,12 @@ test.describe('Macro-Micro-Switcher', () => { Test case: Macro-Micro-Switcher Description: Mol-structure opened from the file in Micro mode is visible on Macro mode when hover on it */ - await openFileAndAddToCanvas('Molfiles-V2000/glutamine.mol', page); + await openFileAndAddToCanvas( + 'Molfiles-V2000/glutamine.mol', + page, + topLeftCorner.x, + topLeftCorner.y, + ); await turnOnMacromoleculesEditor(page); await page.getByText('F1').locator('..').click(); await takeEditorScreenshot(page); @@ -384,7 +406,12 @@ test.describe('Macro-Micro-Switcher', () => { Test case: Macro-Micro-Switcher Description: Mol-structure opened from the file in Micro mode is visible on Macro mode when hover on it */ - await openFileAndAddToCanvas('KET/stereo-and-structure.ket', page); + await openFileAndAddToCanvas( + 'KET/stereo-and-structure.ket', + page, + topLeftCorner.x, + topLeftCorner.y, + ); await turnOnMacromoleculesEditor(page); await page.getByText('F1').locator('..').hover(); await takeEditorScreenshot(page); @@ -397,7 +424,12 @@ test.describe('Macro-Micro-Switcher', () => { Test case: Macro-Micro-Switcher Description: Structure exists on the canvas with changes by Charge Plus (+) Tool and Charge Plus (-). */ - await openFileAndAddToCanvas('KET/two-benzene-charged.ket', page); + await openFileAndAddToCanvas( + 'KET/two-benzene-charged.ket', + page, + topLeftCorner.x, + topLeftCorner.y, + ); await turnOnMacromoleculesEditor(page); await page.getByText('F2').locator('..').hover(); await takeEditorScreenshot(page); @@ -410,7 +442,12 @@ test.describe('Macro-Micro-Switcher', () => { Test case: Macro-Micro-Switcher Description: Structure exists on the canvas without text. */ - await openFileAndAddToCanvas('KET/benzene-rings-with-text.ket', page); + await openFileAndAddToCanvas( + 'KET/benzene-rings-with-text.ket', + page, + topLeftCorner.x, + topLeftCorner.y, + ); await turnOnMacromoleculesEditor(page); await page.getByText('F1').locator('..').hover(); await takeEditorScreenshot(page); @@ -423,7 +460,12 @@ test.describe('Macro-Micro-Switcher', () => { Test case: Macro-Micro-Switcher Description: Structure exists on the canvas without Shape Ellipse. */ - await openFileAndAddToCanvas('KET/two-benzene-and-ellipse.ket', page); + await openFileAndAddToCanvas( + 'KET/two-benzene-and-ellipse.ket', + page, + topLeftCorner.x, + topLeftCorner.y, + ); await turnOnMacromoleculesEditor(page); await takeEditorScreenshot(page); }); @@ -435,7 +477,12 @@ test.describe('Macro-Micro-Switcher', () => { Test case: Macro-Micro-Switcher Description: Structures exists on the canvas without arrow ( Arrow Open Angle Tool ) */ - await openFileAndAddToCanvas('KET/two-benzene-and-arrow.ket', page); + await openFileAndAddToCanvas( + 'KET/two-benzene-and-arrow.ket', + page, + topLeftCorner.x, + topLeftCorner.y, + ); await turnOnMacromoleculesEditor(page); await takeEditorScreenshot(page); }); @@ -447,8 +494,12 @@ test.describe('Macro-Micro-Switcher', () => { Test case: Macro-Micro-Switcher Description: In Macro mode ABS, AND and OR is not appear */ + const zoomOutValue = 500; + const scrollRightValue = -500; await openFileAndAddToCanvas('KET/three-alpha-d-allopyranose.ket', page); await turnOnMacromoleculesEditor(page); + await zoomWithMouseWheel(page, zoomOutValue); + await scrollHorizontally(page, scrollRightValue); await page.getByText('F1').locator('..').hover(); await takeEditorScreenshot(page); }); @@ -460,23 +511,32 @@ test.describe('Macro-Micro-Switcher', () => { Test case: Macro-Micro-Switcher Description: In Macro mode plus sign is not appear */ - await openFileAndAddToCanvas('KET/two-benzene-and-plus.ket', page); + await openFileAndAddToCanvas( + 'KET/two-benzene-and-plus.ket', + page, + topLeftCorner.x, + topLeftCorner.y, + ); await turnOnMacromoleculesEditor(page); await takeEditorScreenshot(page); }); - test('Check that the Ket-structure pasted from the clipboard in Micro mode is visible in Macro mode when hover on it.', async ({ + test('Check that the Ket-structure pasted from the clipboard in Micro mode is visible in Macro mode when hover on it.', async ({ page, }) => { /* Test case: Macro-Micro-Switcher Description: Ket-structure pasted from the clipboard in Micro mode is visible in Macro mode when hover on it */ + const topLeftCornerCoords = { + x: 100, + y: 100, + }; await pasteFromClipboard( page, FILE_TEST_DATA.oneFunctionalGroupExpandedKet, ); - await clickInTheMiddleOfTheScreen(page); + await page.mouse.click(topLeftCornerCoords.x, topLeftCornerCoords.y); await turnOnMacromoleculesEditor(page); await page.getByText('F1').locator('..').click(); await takeEditorScreenshot(page); @@ -489,11 +549,17 @@ test.describe('Macro-Micro-Switcher', () => { Test case: Macro-Micro-Switcher Description: Mol-structure pasted from the clipboard in Micro mode is visible in Macro mode when hover on it */ + const coordsToClick = { + x: 200, + y: 100, + }; await pasteFromClipboard( page, FILE_TEST_DATA.functionalGroupsExpandedContractedV3000, ); - await clickInTheMiddleOfTheScreen(page); + await waitForRender(page, async () => { + await page.mouse.click(coordsToClick.x, coordsToClick.y); + }); await turnOnMacromoleculesEditor(page); await page.getByText('F1').locator('..').hover(); await takeEditorScreenshot(page); @@ -507,7 +573,12 @@ test.describe('Macro-Micro-Switcher', () => { Description: Full screen mode is not reset Test working not properly now because we have bug https://github.com/epam/ketcher/issues/3656 */ - await openFileAndAddToCanvas('KET/two-benzene-and-plus.ket', page); + await openFileAndAddToCanvas( + 'KET/two-benzene-and-plus.ket', + page, + topLeftCorner.x, + topLeftCorner.y, + ); await page.getByTestId('fullscreen-mode-button').click(); await turnOnMacromoleculesEditor(page); await takePageScreenshot(page); diff --git a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Add-monomers-in-macro-mod-3601b-micro-mode-and-check-that-it-can-not-be-moved-1-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Add-monomers-in-macro-mod-3601b-micro-mode-and-check-that-it-can-not-be-moved-1-chromium-linux.png index 2f7208daca..996a50e1ea 100644 Binary files a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Add-monomers-in-macro-mod-3601b-micro-mode-and-check-that-it-can-not-be-moved-1-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Add-monomers-in-macro-mod-3601b-micro-mode-and-check-that-it-can-not-be-moved-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Add-monomers-in-macro-mod-3a1d0--remove-abbreviation-and-switch-to-macro-mode-1-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Add-monomers-in-macro-mod-3a1d0--remove-abbreviation-and-switch-to-macro-mode-1-chromium-linux.png index 212068f8f7..88d53363d4 100644 Binary files a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Add-monomers-in-macro-mod-3a1d0--remove-abbreviation-and-switch-to-macro-mode-1-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Add-monomers-in-macro-mod-3a1d0--remove-abbreviation-and-switch-to-macro-mode-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-Zoom-In-Zoom-O-11636--Mouse-scroll-after-switching-to-Macro-mode-2-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-Zoom-In-Zoom-O-11636--Mouse-scroll-after-switching-to-Macro-mode-2-chromium-linux.png index f2aa742882..27abd3b439 100755 Binary files a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-Zoom-In-Zoom-O-11636--Mouse-scroll-after-switching-to-Macro-mode-2-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-Zoom-In-Zoom-O-11636--Mouse-scroll-after-switching-to-Macro-mode-2-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-Zoom-In-Zoom-O-131b4-rk-UI-Buttons-after-switching-to-Macro-mode-1-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-Zoom-In-Zoom-O-131b4-rk-UI-Buttons-after-switching-to-Macro-mode-1-chromium-linux.png index c79b63da1d..95713f6127 100755 Binary files a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-Zoom-In-Zoom-O-131b4-rk-UI-Buttons-after-switching-to-Macro-mode-1-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-Zoom-In-Zoom-O-131b4-rk-UI-Buttons-after-switching-to-Macro-mode-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-Zoom-In-Zoom-O-1d5fd-rk-UI-Buttons-after-switching-to-Macro-mode-3-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-Zoom-In-Zoom-O-1d5fd-rk-UI-Buttons-after-switching-to-Macro-mode-3-chromium-linux.png index a896f10958..bfa2afa3cb 100755 Binary files a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-Zoom-In-Zoom-O-1d5fd-rk-UI-Buttons-after-switching-to-Macro-mode-3-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-Zoom-In-Zoom-O-1d5fd-rk-UI-Buttons-after-switching-to-Macro-mode-3-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-Zoom-In-Zoom-O-2ea75--Mouse-scroll-after-switching-to-Macro-mode-3-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-Zoom-In-Zoom-O-2ea75--Mouse-scroll-after-switching-to-Macro-mode-3-chromium-linux.png index a896f10958..bfa2afa3cb 100755 Binary files a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-Zoom-In-Zoom-O-2ea75--Mouse-scroll-after-switching-to-Macro-mode-3-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-Zoom-In-Zoom-O-2ea75--Mouse-scroll-after-switching-to-Macro-mode-3-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-Zoom-In-Zoom-O-6d8d0-rk-UI-Buttons-after-switching-to-Macro-mode-2-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-Zoom-In-Zoom-O-6d8d0-rk-UI-Buttons-after-switching-to-Macro-mode-2-chromium-linux.png index 8900a77821..31906c2893 100755 Binary files a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-Zoom-In-Zoom-O-6d8d0-rk-UI-Buttons-after-switching-to-Macro-mode-2-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-Zoom-In-Zoom-O-6d8d0-rk-UI-Buttons-after-switching-to-Macro-mode-2-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-Zoom-In-Zoom-O-c1f8a--Mouse-scroll-after-switching-to-Macro-mode-1-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-Zoom-In-Zoom-O-c1f8a--Mouse-scroll-after-switching-to-Macro-mode-1-chromium-linux.png index af3df94daf..2ebe4215d1 100755 Binary files a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-Zoom-In-Zoom-O-c1f8a--Mouse-scroll-after-switching-to-Macro-mode-1-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-Zoom-In-Zoom-O-c1f8a--Mouse-scroll-after-switching-to-Macro-mode-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-the-Ket-struct-205ec-de-is-visible-in-Macro-mode-when-hover-on-it-1-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-the-Ket-struct-205ec-de-is-visible-in-Macro-mode-when-hover-on-it-1-chromium-linux.png index a3c788ba38..115aa94bec 100755 Binary files a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-the-Ket-struct-205ec-de-is-visible-in-Macro-mode-when-hover-on-it-1-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-the-Ket-struct-205ec-de-is-visible-in-Macro-mode-when-hover-on-it-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-the-Ket-struct-3dd89-e-file-in-Macro-mode-is-visible-in-Micro-mode-1-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-the-Ket-struct-3dd89-e-file-in-Macro-mode-is-visible-in-Micro-mode-1-chromium-linux.png new file mode 100644 index 0000000000..097837d413 Binary files /dev/null and b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-the-Ket-struct-3dd89-e-file-in-Macro-mode-is-visible-in-Micro-mode-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-the-Ket-struct-c5639-de-is-visible-in-Macro-mode-when-hover-on-it-1-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-the-Ket-struct-c5639-de-is-visible-in-Macro-mode-when-hover-on-it-1-chromium-linux.png index e9630ed6cc..a3093bfaea 100755 Binary files a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-the-Ket-struct-c5639-de-is-visible-in-Macro-mode-when-hover-on-it-1-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-the-Ket-struct-c5639-de-is-visible-in-Macro-mode-when-hover-on-it-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-the-Mol-struct-c463d-de-is-visible-in-Macro-mode-when-hover-on-it-1-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-the-Mol-struct-c463d-de-is-visible-in-Macro-mode-when-hover-on-it-1-chromium-linux.png index b08aa11039..2f6e58fda8 100755 Binary files a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-the-Mol-struct-c463d-de-is-visible-in-Macro-mode-when-hover-on-it-1-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-the-Mol-struct-c463d-de-is-visible-in-Macro-mode-when-hover-on-it-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-the-Mol-struct-eab02-ode-is-visible-on-Macro-mode-when-hover-on-it-1-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-the-Mol-struct-eab02-ode-is-visible-on-Macro-mode-when-hover-on-it-1-chromium-linux.png index 03f68509c8..302efc1dd2 100755 Binary files a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-the-Mol-struct-eab02-ode-is-visible-on-Macro-mode-when-hover-on-it-1-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-the-Mol-struct-eab02-ode-is-visible-on-Macro-mode-when-hover-on-it-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-the-zoomed-in--7ae35--switch-to-Micro-mode-and-again-to-Macro-mode-1-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-the-zoomed-in--7ae35--switch-to-Micro-mode-and-again-to-Macro-mode-1-chromium-linux.png index 49f7f678a3..2ed8f36145 100755 Binary files a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-the-zoomed-in--7ae35--switch-to-Micro-mode-and-again-to-Macro-mode-1-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-the-zoomed-in--7ae35--switch-to-Micro-mode-and-again-to-Macro-mode-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-the-zoomed-in--c5dca--switch-to-Micro-mode-and-again-to-Macro-mode-2-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-the-zoomed-in--c5dca--switch-to-Micro-mode-and-again-to-Macro-mode-2-chromium-linux.png index a896f10958..bfa2afa3cb 100755 Binary files a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-the-zoomed-in--c5dca--switch-to-Micro-mode-and-again-to-Macro-mode-2-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Check-that-the-zoomed-in--c5dca--switch-to-Micro-mode-and-again-to-Macro-mode-2-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-ABS-new-OR-Group--8b476-nd-check-that-ABS-AND-and-OR-isn-not-appear-1-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-ABS-new-OR-Group--8b476-nd-check-that-ABS-AND-and-OR-isn-not-appear-1-chromium-linux.png index b626e0789e..cb3010c272 100755 Binary files a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-ABS-new-OR-Group--8b476-nd-check-that-ABS-AND-and-OR-isn-not-appear-1-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-ABS-new-OR-Group--8b476-nd-check-that-ABS-AND-and-OR-isn-not-appear-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-a-sequence-of-mono-e8311-ode-select-the-entire-structure-and-rotate-it-1-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-a-sequence-of-mono-e8311-ode-select-the-entire-structure-and-rotate-it-1-chromium-linux.png index 4a8930722e..c77d2f648e 100644 Binary files a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-a-sequence-of-mono-e8311-ode-select-the-entire-structure-and-rotate-it-1-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-a-sequence-of-mono-e8311-ode-select-the-entire-structure-and-rotate-it-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-a-sequence-of-mono-ecee6-ntire-structure-and-move-it-to-a-new-position-1-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-a-sequence-of-mono-ecee6-ntire-structure-and-move-it-to-a-new-position-1-chromium-linux.png index 49f7f678a3..2ed8f36145 100644 Binary files a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-a-sequence-of-mono-ecee6-ntire-structure-and-move-it-to-a-new-position-1-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-a-sequence-of-mono-ecee6-ntire-structure-and-move-it-to-a-new-position-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-two-Benzene-rings--447c0-added-in-Micro-mode-and-switch-to-Macro-mode-1-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-two-Benzene-rings--447c0-added-in-Micro-mode-and-switch-to-Macro-mode-1-chromium-linux.png index 0afa671238..d5990b2c43 100755 Binary files a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-two-Benzene-rings--447c0-added-in-Micro-mode-and-switch-to-Macro-mode-1-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-two-Benzene-rings--447c0-added-in-Micro-mode-and-switch-to-Macro-mode-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-two-Benzene-rings--6dbf2-added-in-Micro-mode-and-switch-to-Macro-mode-1-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-two-Benzene-rings--6dbf2-added-in-Micro-mode-and-switch-to-Macro-mode-1-chromium-linux.png index fc8a4d3b00..ecb8b1ae35 100755 Binary files a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-two-Benzene-rings--6dbf2-added-in-Micro-mode-and-switch-to-Macro-mode-1-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-two-Benzene-rings--6dbf2-added-in-Micro-mode-and-switch-to-Macro-mode-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-two-Benzene-rings--b7c8c-added-in-Micro-mode-and-switch-to-Macro-mode-1-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-two-Benzene-rings--b7c8c-added-in-Micro-mode-and-switch-to-Macro-mode-1-chromium-linux.png index d199053934..841efd4774 100755 Binary files a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-two-Benzene-rings--b7c8c-added-in-Micro-mode-and-switch-to-Macro-mode-1-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-two-Benzene-rings--b7c8c-added-in-Micro-mode-and-switch-to-Macro-mode-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-two-Benzene-rings--bade1--Tool-in-Micro-mode-and-switch-to-Macro-mode-1-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-two-Benzene-rings--bade1--Tool-in-Micro-mode-and-switch-to-Macro-mode-1-chromium-linux.png index d4ac15f782..a1cc10f985 100755 Binary files a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-two-Benzene-rings--bade1--Tool-in-Micro-mode-and-switch-to-Macro-mode-1-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-two-Benzene-rings--bade1--Tool-in-Micro-mode-and-switch-to-Macro-mode-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-two-Benzene-rings--eff28--added-in-Micro-mode-and-switch-to-Macro-mode-1-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-two-Benzene-rings--eff28--added-in-Micro-mode-and-switch-to-Macro-mode-1-chromium-linux.png index 470670b2b2..21c16fb009 100755 Binary files a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-two-Benzene-rings--eff28--added-in-Micro-mode-and-switch-to-Macro-mode-1-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Create-two-Benzene-rings--eff28--added-in-Micro-mode-and-switch-to-Macro-mode-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Make-full-screen-mode-in-micro-mode-and-switch-to-macro-mode-1-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Make-full-screen-mode-in-micro-mode-and-switch-to-macro-mode-1-chromium-linux.png index 776ebdd13c..399c3179c5 100644 Binary files a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Make-full-screen-mode-in-micro-mode-and-switch-to-macro-mode-1-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Make-full-screen-mode-in-micro-mode-and-switch-to-macro-mode-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Micromolecules-in-macromo-f6740-d-as-CHEMs-with-generated-name-F1-F2-Fn-1-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Micromolecules-in-macromo-f6740-d-as-CHEMs-with-generated-name-F1-F2-Fn-1-chromium-linux.png index 8c9a1707ed..0dd81325a6 100755 Binary files a/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Micromolecules-in-macromo-f6740-d-as-CHEMs-with-generated-name-F1-F2-Fn-1-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts-snapshots/Macro-Micro-Switcher-Micromolecules-in-macromo-f6740-d-as-CHEMs-with-generated-name-F1-F2-Fn-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/Opening-Files/Molv3000.spec.ts b/ketcher-autotests/tests/Macromolecule-editor/Opening-Files/Molv3000.spec.ts index e37d8b4fe6..acb5fdcbac 100644 --- a/ketcher-autotests/tests/Macromolecule-editor/Opening-Files/Molv3000.spec.ts +++ b/ketcher-autotests/tests/Macromolecule-editor/Opening-Files/Molv3000.spec.ts @@ -21,6 +21,8 @@ function removeNotComparableData(file: string) { .join('\n'); } +const topLeftCorner = -300; + test.describe('MolV300 Files', () => { test.beforeEach(async ({ page }) => { await waitForPageInit(page); @@ -28,7 +30,12 @@ test.describe('MolV300 Files', () => { }); test('Import', async ({ page }) => { - await openFileAndAddToCanvas('Molfiles-V3000/monomers-and-chem.mol', page); + await openFileAndAddToCanvas( + 'Molfiles-V3000/monomers-and-chem.mol', + page, + topLeftCorner, + topLeftCorner, + ); await takeEditorScreenshot(page); }); diff --git a/ketcher-autotests/tests/Macromolecule-editor/Opening-Files/Molv3000.spec.ts-snapshots/MolV300-Files-Import-1-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Opening-Files/Molv3000.spec.ts-snapshots/MolV300-Files-Import-1-chromium-linux.png index 0685b6a561..9b940d9545 100644 Binary files a/ketcher-autotests/tests/Macromolecule-editor/Opening-Files/Molv3000.spec.ts-snapshots/MolV300-Files-Import-1-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/Opening-Files/Molv3000.spec.ts-snapshots/MolV300-Files-Import-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/Opening-Files/Molv3000.spec.ts-snapshots/MolV300-Files-Import-with-clipboard-1-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Opening-Files/Molv3000.spec.ts-snapshots/MolV300-Files-Import-with-clipboard-1-chromium-linux.png index 0685b6a561..9b940d9545 100644 Binary files a/ketcher-autotests/tests/Macromolecule-editor/Opening-Files/Molv3000.spec.ts-snapshots/MolV300-Files-Import-with-clipboard-1-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/Opening-Files/Molv3000.spec.ts-snapshots/MolV300-Files-Import-with-clipboard-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/RNA-Builder/rna-library.spec.ts-snapshots/RNA-Library-Open-Sugar-Base-Phosphate-from-ket-file-and-switch-to-Micromolecule-mode-1-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/RNA-Builder/rna-library.spec.ts-snapshots/RNA-Library-Open-Sugar-Base-Phosphate-from-ket-file-and-switch-to-Micromolecule-mode-1-chromium-linux.png index 9c866787fc..26d6cd83dd 100644 Binary files a/ketcher-autotests/tests/Macromolecule-editor/RNA-Builder/rna-library.spec.ts-snapshots/RNA-Library-Open-Sugar-Base-Phosphate-from-ket-file-and-switch-to-Micromolecule-mode-1-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/RNA-Builder/rna-library.spec.ts-snapshots/RNA-Library-Open-Sugar-Base-Phosphate-from-ket-file-and-switch-to-Micromolecule-mode-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/RNA-Builder/rna-library.spec.ts-snapshots/RNA-Library-Open-file-from-ket-and-Delete-12ddR-monomer-1-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/RNA-Builder/rna-library.spec.ts-snapshots/RNA-Library-Open-file-from-ket-and-Delete-12ddR-monomer-1-chromium-linux.png index 9dcb27fa09..f6c6328c43 100644 Binary files a/ketcher-autotests/tests/Macromolecule-editor/RNA-Builder/rna-library.spec.ts-snapshots/RNA-Library-Open-file-from-ket-and-Delete-12ddR-monomer-1-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/RNA-Builder/rna-library.spec.ts-snapshots/RNA-Library-Open-file-from-ket-and-Delete-12ddR-monomer-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/RNA-Builder/rna-library.spec.ts-snapshots/RNA-Library-Open-file-from-ket-and-Delete-P-monomer-1-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/RNA-Builder/rna-library.spec.ts-snapshots/RNA-Library-Open-file-from-ket-and-Delete-P-monomer-1-chromium-linux.png index 6cb04837db..a021023c2f 100644 Binary files a/ketcher-autotests/tests/Macromolecule-editor/RNA-Builder/rna-library.spec.ts-snapshots/RNA-Library-Open-file-from-ket-and-Delete-P-monomer-1-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/RNA-Builder/rna-library.spec.ts-snapshots/RNA-Library-Open-file-from-ket-and-Delete-P-monomer-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/RNA-Builder/rna-library.spec.ts-snapshots/RNA-Library-Open-file-from-ket-and-Delete-baA-monomer-1-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/RNA-Builder/rna-library.spec.ts-snapshots/RNA-Library-Open-file-from-ket-and-Delete-baA-monomer-1-chromium-linux.png index 6f507d7af9..0f851eedb6 100644 Binary files a/ketcher-autotests/tests/Macromolecule-editor/RNA-Builder/rna-library.spec.ts-snapshots/RNA-Library-Open-file-from-ket-and-Delete-baA-monomer-1-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/RNA-Builder/rna-library.spec.ts-snapshots/RNA-Library-Open-file-from-ket-and-Delete-baA-monomer-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/Undo-Redo/undo-redo.spec.ts-snapshots/Undo-Redo-Undo-redo-for-imported-structure-1-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Undo-Redo/undo-redo.spec.ts-snapshots/Undo-Redo-Undo-redo-for-imported-structure-1-chromium-linux.png index 66e92a511e..8f6b55df49 100644 Binary files a/ketcher-autotests/tests/Macromolecule-editor/Undo-Redo/undo-redo.spec.ts-snapshots/Undo-Redo-Undo-redo-for-imported-structure-1-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/Undo-Redo/undo-redo.spec.ts-snapshots/Undo-Redo-Undo-redo-for-imported-structure-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Macromolecule-editor/Undo-Redo/undo-redo.spec.ts-snapshots/Undo-Redo-Undo-redo-for-imported-structure-2-chromium-linux.png b/ketcher-autotests/tests/Macromolecule-editor/Undo-Redo/undo-redo.spec.ts-snapshots/Undo-Redo-Undo-redo-for-imported-structure-2-chromium-linux.png index 75d137314b..1852a6477b 100644 Binary files a/ketcher-autotests/tests/Macromolecule-editor/Undo-Redo/undo-redo.spec.ts-snapshots/Undo-Redo-Undo-redo-for-imported-structure-2-chromium-linux.png and b/ketcher-autotests/tests/Macromolecule-editor/Undo-Redo/undo-redo.spec.ts-snapshots/Undo-Redo-Undo-redo-for-imported-structure-2-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Erase-Tool/erase-tool.spec.ts b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Erase-Tool/erase-tool.spec.ts index 591ba67816..41586f9497 100644 --- a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Erase-Tool/erase-tool.spec.ts +++ b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/Erase-Tool/erase-tool.spec.ts @@ -79,7 +79,7 @@ test.describe('Erase Tool', () => { const [plusElement] = window.ketcher.editor.struct().rxnPluses.values(); return { plusElement: plusElement || null, - scale: window.ketcher.editor.options().scale, + scale: window.ketcher.editor.options().microModeScale, }; }); @@ -110,7 +110,7 @@ test.describe('Erase Tool', () => { const [element] = window.ketcher.editor.struct().rxnArrows.values(); return { arrowElement: element || null, - scale: window.ketcher.editor.options().scale, + scale: window.ketcher.editor.options().microModeScale, }; }); diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/Data-S-Group-Tool/data-s-group-tool.spec.ts-snapshots/Data-S-Group-tool-Add-Data-S-Group-for-the-reaction-components-1-chromium-linux.png b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/Data-S-Group-Tool/data-s-group-tool.spec.ts-snapshots/Data-S-Group-tool-Add-Data-S-Group-for-the-reaction-components-1-chromium-linux.png index b2dfffc000..0368b244dc 100644 Binary files a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/Data-S-Group-Tool/data-s-group-tool.spec.ts-snapshots/Data-S-Group-tool-Add-Data-S-Group-for-the-reaction-components-1-chromium-linux.png and b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/Data-S-Group-Tool/data-s-group-tool.spec.ts-snapshots/Data-S-Group-tool-Add-Data-S-Group-for-the-reaction-components-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/Data-S-Group-Tool/data-s-group-tool.spec.ts-snapshots/Data-S-Group-tool-Add-Data-S-Group-for-the-reaction-components-with-attached-radio-button-1-chromium-linux.png b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/Data-S-Group-Tool/data-s-group-tool.spec.ts-snapshots/Data-S-Group-tool-Add-Data-S-Group-for-the-reaction-components-with-attached-radio-button-1-chromium-linux.png index 1581287868..aab5a05abe 100644 Binary files a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/Data-S-Group-Tool/data-s-group-tool.spec.ts-snapshots/Data-S-Group-tool-Add-Data-S-Group-for-the-reaction-components-with-attached-radio-button-1-chromium-linux.png and b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/Data-S-Group-Tool/data-s-group-tool.spec.ts-snapshots/Data-S-Group-tool-Add-Data-S-Group-for-the-reaction-components-with-attached-radio-button-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/Data-S-Group-Tool/data-s-group-tool.spec.ts-snapshots/Data-S-Group-tool-Hover-over-created-S-Group-displays-tooltip-for-it-1-chromium-linux.png b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/Data-S-Group-Tool/data-s-group-tool.spec.ts-snapshots/Data-S-Group-tool-Hover-over-created-S-Group-displays-tooltip-for-it-1-chromium-linux.png index 91ac27def5..de83e51d70 100644 Binary files a/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/Data-S-Group-Tool/data-s-group-tool.spec.ts-snapshots/Data-S-Group-tool-Hover-over-created-S-Group-displays-tooltip-for-it-1-chromium-linux.png and b/ketcher-autotests/tests/Structure-Creating-&-Editing/Actions-With-Structures/S-Group-Tool/Data-S-Group-Tool/data-s-group-tool.spec.ts-snapshots/Data-S-Group-tool-Hover-over-created-S-Group-displays-tooltip-for-it-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Templates/Custom-Templates/custom-templates.spec.ts-snapshots/Open-Ketcher-Thumbnail-images-are-readable-in-Template-Dialog-1-chromium-linux.png b/ketcher-autotests/tests/Templates/Custom-Templates/custom-templates.spec.ts-snapshots/Open-Ketcher-Thumbnail-images-are-readable-in-Template-Dialog-1-chromium-linux.png index 8c1128a54f..1238a8c30a 100644 Binary files a/ketcher-autotests/tests/Templates/Custom-Templates/custom-templates.spec.ts-snapshots/Open-Ketcher-Thumbnail-images-are-readable-in-Template-Dialog-1-chromium-linux.png and b/ketcher-autotests/tests/Templates/Custom-Templates/custom-templates.spec.ts-snapshots/Open-Ketcher-Thumbnail-images-are-readable-in-Template-Dialog-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Check-stru-a3c82-ed-and-Functional-Group-selected-using-hotkey-1-chromium-linux.png b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Check-stru-a3c82-ed-and-Functional-Group-selected-using-hotkey-1-chromium-linux.png index 76dd280369..0dbaa53cb1 100644 Binary files a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Check-stru-a3c82-ed-and-Functional-Group-selected-using-hotkey-1-chromium-linux.png and b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Check-stru-a3c82-ed-and-Functional-Group-selected-using-hotkey-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-1-chromium-linux.png b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-1-chromium-linux.png index 894d10d1b5..be5e88cc3c 100644 Binary files a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-1-chromium-linux.png and b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-10-chromium-linux.png b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-10-chromium-linux.png index f59f46a225..d7890cddad 100644 Binary files a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-10-chromium-linux.png and b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-10-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-11-chromium-linux.png b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-11-chromium-linux.png index f59f46a225..95ba03f100 100644 Binary files a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-11-chromium-linux.png and b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-11-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-12-chromium-linux.png b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-12-chromium-linux.png index f59f46a225..95ba03f100 100644 Binary files a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-12-chromium-linux.png and b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-12-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-13-chromium-linux.png b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-13-chromium-linux.png index f59f46a225..95ba03f100 100644 Binary files a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-13-chromium-linux.png and b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-13-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-14-chromium-linux.png b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-14-chromium-linux.png index f59f46a225..95ba03f100 100644 Binary files a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-14-chromium-linux.png and b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-14-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-16-chromium-linux.png b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-16-chromium-linux.png index 0bfdcb6dc5..3450b86340 100644 Binary files a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-16-chromium-linux.png and b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-16-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-2-chromium-linux.png b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-2-chromium-linux.png index 0bfdcb6dc5..038ea3d409 100644 Binary files a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-2-chromium-linux.png and b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-2-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-3-chromium-linux.png b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-3-chromium-linux.png index 0bfdcb6dc5..038ea3d409 100644 Binary files a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-3-chromium-linux.png and b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-3-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-4-chromium-linux.png b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-4-chromium-linux.png index 0bfdcb6dc5..3450b86340 100644 Binary files a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-4-chromium-linux.png and b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-4-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-5-chromium-linux.png b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-5-chromium-linux.png index 0bfdcb6dc5..3450b86340 100644 Binary files a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-5-chromium-linux.png and b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-5-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-6-chromium-linux.png b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-6-chromium-linux.png index f59f46a225..d7890cddad 100644 Binary files a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-6-chromium-linux.png and b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-6-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-7-chromium-linux.png b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-7-chromium-linux.png index f59f46a225..d7890cddad 100644 Binary files a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-7-chromium-linux.png and b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-7-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-8-chromium-linux.png b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-8-chromium-linux.png index 0bfdcb6dc5..038ea3d409 100644 Binary files a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-8-chromium-linux.png and b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-8-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-9-chromium-linux.png b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-9-chromium-linux.png index f59f46a225..95ba03f100 100644 Binary files a/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-9-chromium-linux.png and b/ketcher-autotests/tests/Templates/Functional-Groups/Functional-Group-Tools/functional-group-tools.spec.ts-snapshots/Templates---Functional-Group-Tools3-Expand-Remove-abbreviation-context-menu-with-selected-tools-9-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Templates/Functional-Groups/functional-groups.spec.ts-snapshots/Functional-Groups-Selection-highlight-appears-immediately-after-hover-over-text-1-chromium-linux.png b/ketcher-autotests/tests/Templates/Functional-Groups/functional-groups.spec.ts-snapshots/Functional-Groups-Selection-highlight-appears-immediately-after-hover-over-text-1-chromium-linux.png index c507f436f5..5b0a52b4ab 100644 Binary files a/ketcher-autotests/tests/Templates/Functional-Groups/functional-groups.spec.ts-snapshots/Functional-Groups-Selection-highlight-appears-immediately-after-hover-over-text-1-chromium-linux.png and b/ketcher-autotests/tests/Templates/Functional-Groups/functional-groups.spec.ts-snapshots/Functional-Groups-Selection-highlight-appears-immediately-after-hover-over-text-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Templates/Functional-Groups/functional-groups.spec.ts-snapshots/Functional-Groups-Selection-highlight-is-displ-4c9cb-ectly-for-functional-groups-with-longer-names-1-chromium-linux.png b/ketcher-autotests/tests/Templates/Functional-Groups/functional-groups.spec.ts-snapshots/Functional-Groups-Selection-highlight-is-displ-4c9cb-ectly-for-functional-groups-with-longer-names-1-chromium-linux.png index aa3d35ccb5..a9ed6f6ff1 100644 Binary files a/ketcher-autotests/tests/Templates/Functional-Groups/functional-groups.spec.ts-snapshots/Functional-Groups-Selection-highlight-is-displ-4c9cb-ectly-for-functional-groups-with-longer-names-1-chromium-linux.png and b/ketcher-autotests/tests/Templates/Functional-Groups/functional-groups.spec.ts-snapshots/Functional-Groups-Selection-highlight-is-displ-4c9cb-ectly-for-functional-groups-with-longer-names-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Templates/Functional-Groups/lookup-abbreviations.spec.ts-snapshots/Lookup-Abbreviations-tests-Lookup-Abbreviation-selecting-template-1-chromium-linux.png b/ketcher-autotests/tests/Templates/Functional-Groups/lookup-abbreviations.spec.ts-snapshots/Lookup-Abbreviations-tests-Lookup-Abbreviation-selecting-template-1-chromium-linux.png index 3434ef8445..57bf588fd8 100644 Binary files a/ketcher-autotests/tests/Templates/Functional-Groups/lookup-abbreviations.spec.ts-snapshots/Lookup-Abbreviations-tests-Lookup-Abbreviation-selecting-template-1-chromium-linux.png and b/ketcher-autotests/tests/Templates/Functional-Groups/lookup-abbreviations.spec.ts-snapshots/Lookup-Abbreviations-tests-Lookup-Abbreviation-selecting-template-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Templates/Salts-and-Solvents/check-new-salt-or-solvent-is-replacing.spec.ts-snapshots/Salts-and-Solvents-replacement-Salts-and-Solve-08eef-ms-Functional-Groups-and-Salts-and-Solvents-2-chromium-linux.png b/ketcher-autotests/tests/Templates/Salts-and-Solvents/check-new-salt-or-solvent-is-replacing.spec.ts-snapshots/Salts-and-Solvents-replacement-Salts-and-Solve-08eef-ms-Functional-Groups-and-Salts-and-Solvents-2-chromium-linux.png index 172c5bace6..e90260b357 100644 Binary files a/ketcher-autotests/tests/Templates/Salts-and-Solvents/check-new-salt-or-solvent-is-replacing.spec.ts-snapshots/Salts-and-Solvents-replacement-Salts-and-Solve-08eef-ms-Functional-Groups-and-Salts-and-Solvents-2-chromium-linux.png and b/ketcher-autotests/tests/Templates/Salts-and-Solvents/check-new-salt-or-solvent-is-replacing.spec.ts-snapshots/Salts-and-Solvents-replacement-Salts-and-Solve-08eef-ms-Functional-Groups-and-Salts-and-Solvents-2-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Templates/Salts-and-Solvents/check-new-salt-or-solvent-is-replacing.spec.ts-snapshots/Salts-and-Solvents-replacement-Salts-and-Solve-8551e-ms-Functional-Groups-and-Salts-and-Solvents-4-chromium-linux.png b/ketcher-autotests/tests/Templates/Salts-and-Solvents/check-new-salt-or-solvent-is-replacing.spec.ts-snapshots/Salts-and-Solvents-replacement-Salts-and-Solve-8551e-ms-Functional-Groups-and-Salts-and-Solvents-4-chromium-linux.png index 505b0e0928..98c2ff82ae 100644 Binary files a/ketcher-autotests/tests/Templates/Salts-and-Solvents/check-new-salt-or-solvent-is-replacing.spec.ts-snapshots/Salts-and-Solvents-replacement-Salts-and-Solve-8551e-ms-Functional-Groups-and-Salts-and-Solvents-4-chromium-linux.png and b/ketcher-autotests/tests/Templates/Salts-and-Solvents/check-new-salt-or-solvent-is-replacing.spec.ts-snapshots/Salts-and-Solvents-replacement-Salts-and-Solve-8551e-ms-Functional-Groups-and-Salts-and-Solvents-4-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Templates/Salts-and-Solvents/check-new-salt-or-solvent-is-replacing.spec.ts-snapshots/Salts-and-Solvents-replacement-Salts-and-Solve-8cf8c-ms-Functional-Groups-and-Salts-and-Solvents-1-chromium-linux.png b/ketcher-autotests/tests/Templates/Salts-and-Solvents/check-new-salt-or-solvent-is-replacing.spec.ts-snapshots/Salts-and-Solvents-replacement-Salts-and-Solve-8cf8c-ms-Functional-Groups-and-Salts-and-Solvents-1-chromium-linux.png index 505b0e0928..98c2ff82ae 100644 Binary files a/ketcher-autotests/tests/Templates/Salts-and-Solvents/check-new-salt-or-solvent-is-replacing.spec.ts-snapshots/Salts-and-Solvents-replacement-Salts-and-Solve-8cf8c-ms-Functional-Groups-and-Salts-and-Solvents-1-chromium-linux.png and b/ketcher-autotests/tests/Templates/Salts-and-Solvents/check-new-salt-or-solvent-is-replacing.spec.ts-snapshots/Salts-and-Solvents-replacement-Salts-and-Solve-8cf8c-ms-Functional-Groups-and-Salts-and-Solvents-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Templates/Salts-and-Solvents/check-new-salt-or-solvent-is-replacing.spec.ts-snapshots/Salts-and-Solvents-replacement-Salts-and-Solve-b0f4b-ms-Functional-Groups-and-Salts-and-Solvents-3-chromium-linux.png b/ketcher-autotests/tests/Templates/Salts-and-Solvents/check-new-salt-or-solvent-is-replacing.spec.ts-snapshots/Salts-and-Solvents-replacement-Salts-and-Solve-b0f4b-ms-Functional-Groups-and-Salts-and-Solvents-3-chromium-linux.png index 3e2d8b295c..da1994794a 100644 Binary files a/ketcher-autotests/tests/Templates/Salts-and-Solvents/check-new-salt-or-solvent-is-replacing.spec.ts-snapshots/Salts-and-Solvents-replacement-Salts-and-Solve-b0f4b-ms-Functional-Groups-and-Salts-and-Solvents-3-chromium-linux.png and b/ketcher-autotests/tests/Templates/Salts-and-Solvents/check-new-salt-or-solvent-is-replacing.spec.ts-snapshots/Salts-and-Solvents-replacement-Salts-and-Solve-b0f4b-ms-Functional-Groups-and-Salts-and-Solvents-3-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Templates/Salts-and-Solvents/check-new-salt-or-solvent-is-replacing.spec.ts-snapshots/Salts-and-Solvents-replacement-Verify-if-Methan-Sulphonic-Acid-replace-the-Nitrogen-atom-1-chromium-linux.png b/ketcher-autotests/tests/Templates/Salts-and-Solvents/check-new-salt-or-solvent-is-replacing.spec.ts-snapshots/Salts-and-Solvents-replacement-Verify-if-Methan-Sulphonic-Acid-replace-the-Nitrogen-atom-1-chromium-linux.png index e899c62a50..dbb51d8dad 100644 Binary files a/ketcher-autotests/tests/Templates/Salts-and-Solvents/check-new-salt-or-solvent-is-replacing.spec.ts-snapshots/Salts-and-Solvents-replacement-Verify-if-Methan-Sulphonic-Acid-replace-the-Nitrogen-atom-1-chromium-linux.png and b/ketcher-autotests/tests/Templates/Salts-and-Solvents/check-new-salt-or-solvent-is-replacing.spec.ts-snapshots/Salts-and-Solvents-replacement-Verify-if-Methan-Sulphonic-Acid-replace-the-Nitrogen-atom-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Templates/Salts-and-Solvents/check-new-salt-or-solvent-is-replacing.spec.ts-snapshots/Salts-and-Solvents-replacement-Verify-if-the-new-Salt-or-Solvent-is-replacing-old-one-1-chromium-linux.png b/ketcher-autotests/tests/Templates/Salts-and-Solvents/check-new-salt-or-solvent-is-replacing.spec.ts-snapshots/Salts-and-Solvents-replacement-Verify-if-the-new-Salt-or-Solvent-is-replacing-old-one-1-chromium-linux.png index 787985e899..4ee3b389f8 100644 Binary files a/ketcher-autotests/tests/Templates/Salts-and-Solvents/check-new-salt-or-solvent-is-replacing.spec.ts-snapshots/Salts-and-Solvents-replacement-Verify-if-the-new-Salt-or-Solvent-is-replacing-old-one-1-chromium-linux.png and b/ketcher-autotests/tests/Templates/Salts-and-Solvents/check-new-salt-or-solvent-is-replacing.spec.ts-snapshots/Salts-and-Solvents-replacement-Verify-if-the-new-Salt-or-Solvent-is-replacing-old-one-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Templates/Salts-and-Solvents/check-new-salt-or-solvent-is-replacing.spec.ts-snapshots/Salts-and-Solvents-replacement-Verify-if-the-new-Salt-or-Solvent-is-replacing-old-one-2-chromium-linux.png b/ketcher-autotests/tests/Templates/Salts-and-Solvents/check-new-salt-or-solvent-is-replacing.spec.ts-snapshots/Salts-and-Solvents-replacement-Verify-if-the-new-Salt-or-Solvent-is-replacing-old-one-2-chromium-linux.png index 505b0e0928..98c2ff82ae 100644 Binary files a/ketcher-autotests/tests/Templates/Salts-and-Solvents/check-new-salt-or-solvent-is-replacing.spec.ts-snapshots/Salts-and-Solvents-replacement-Verify-if-the-new-Salt-or-Solvent-is-replacing-old-one-2-chromium-linux.png and b/ketcher-autotests/tests/Templates/Salts-and-Solvents/check-new-salt-or-solvent-is-replacing.spec.ts-snapshots/Salts-and-Solvents-replacement-Verify-if-the-new-Salt-or-Solvent-is-replacing-old-one-2-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Templates/Template-Library/template-library.spec.ts-snapshots/Templates---Template-Library-Functional-groups---adding-structure-1-chromium-linux.png b/ketcher-autotests/tests/Templates/Template-Library/template-library.spec.ts-snapshots/Templates---Template-Library-Functional-groups---adding-structure-1-chromium-linux.png index 2fcdcc184b..dbd9329cd5 100644 Binary files a/ketcher-autotests/tests/Templates/Template-Library/template-library.spec.ts-snapshots/Templates---Template-Library-Functional-groups---adding-structure-1-chromium-linux.png and b/ketcher-autotests/tests/Templates/Template-Library/template-library.spec.ts-snapshots/Templates---Template-Library-Functional-groups---adding-structure-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/Templates/Template-Manipulations/Template-manipulations.spec.ts b/ketcher-autotests/tests/Templates/Template-Manipulations/Template-manipulations.spec.ts index e0d9621952..dba5473e96 100644 --- a/ketcher-autotests/tests/Templates/Template-Manipulations/Template-manipulations.spec.ts +++ b/ketcher-autotests/tests/Templates/Template-Manipulations/Template-manipulations.spec.ts @@ -148,9 +148,7 @@ test.describe('Template Manupulations', () => { await dragMouseTo(rotationHandleX, rotationHandleY - shift, page); }); - test('Place template on the Canvas', async ({ - page, - }) => { + test('Place template on the Canvas', async ({ page }) => { /* Test case: 1678 Description: Choose any template and click on the canvas. diff --git a/ketcher-autotests/tests/Templates/Template-Manipulations/Template-manipulations.spec.ts-snapshots/Open-Ketcher-The-different-templates-are-attached-to-the-atoms-of-existing-benzene-2-1-chromium-linux.png b/ketcher-autotests/tests/Templates/Template-Manipulations/Template-manipulations.spec.ts-snapshots/Open-Ketcher-The-different-templates-are-attached-to-the-atoms-of-existing-benzene-2-1-chromium-linux.png index 35c910a320..39e311cc87 100644 Binary files a/ketcher-autotests/tests/Templates/Template-Manipulations/Template-manipulations.spec.ts-snapshots/Open-Ketcher-The-different-templates-are-attached-to-the-atoms-of-existing-benzene-2-1-chromium-linux.png and b/ketcher-autotests/tests/Templates/Template-Manipulations/Template-manipulations.spec.ts-snapshots/Open-Ketcher-The-different-templates-are-attached-to-the-atoms-of-existing-benzene-2-1-chromium-linux.png differ diff --git a/ketcher-autotests/tests/test-data/KET/eight-micromolecules.ket b/ketcher-autotests/tests/test-data/KET/eight-micromolecules.ket index 21859b4862..d496985e70 100644 --- a/ketcher-autotests/tests/test-data/KET/eight-micromolecules.ket +++ b/ketcher-autotests/tests/test-data/KET/eight-micromolecules.ket @@ -33,103 +33,89 @@ "type": "molecule", "atoms": [ { - "label": "O", - "location": [ - 6.5683866462824865, - -5.46720847428936, - 0 - ] - }, - { - "label": "O", + "label": "C", "location": [ - 6.5683866462824865, - -7.342297187075283, + 2.3388328099416444, + -2.437423026906677, 0 ] }, { - "label": "O", + "label": "C", "location": [ - 4.748997598208939, - -8.28279152571064, + 1.4727691996503154, + -2.9374097915976103, 0 ] }, { "label": "O", "location": [ - 2.9295085507373466, - -7.342397186473329, + 2.3388328099416444, + -1.4374494975248098, 0 ] - }, + } + ], + "bonds": [ { - "label": "O", - "location": [ - 4.743397631918288, - -5.46720847428936, + "type": 1, + "atoms": [ + 1, 0 ] }, { - "label": "O", - "location": [ - 2.1316133537175137, - -6.061504896884781, - 0 + "type": 2, + "atoms": [ + 0, + 2 ] - }, - { - "label": "C", - "location": [ - 5.658592122847666, - -5.926305710724759, - 0 - ], - "stereoLabel": "abs" - }, - { - "label": "C", - "location": [ - 5.658592122847666, - -6.877699983747279, - 0 - ], - "stereoLabel": "abs" - }, + } + ], + "sgroups": [ { - "label": "C", - "location": [ - 4.743397631918288, - -7.342397186473329, - 0 + "type": "SUP", + "atoms": [ + 0, + 1, + 2 ], - "stereoLabel": "abs" - }, + "name": "Ac", + "id": 0, + "attachmentPoints": [ + { + "attachmentAtom": 0, + "attachmentId": "" + } + ] + } + ] + }, + "mol1": { + "type": "molecule", + "atoms": [ { "label": "C", "location": [ - 3.8338031072795626, - -6.877899982543374, + 3.1888328099416454, + -2.4374230269066763, 0 - ], - "stereoLabel": "abs" + ] }, { "label": "C", "location": [ - 3.8338031072795626, - -5.926405710122807, + 2.3227691996503164, + -2.93740979159761, 0 - ], - "stereoLabel": "abs" + ] }, { - "label": "C", + "label": "O", "location": [ - 2.9295085507373466, - -5.467408473085454, + 3.1888328099416454, + -1.4374494975248093, 0 ] } @@ -138,332 +124,143 @@ { "type": 1, "atoms": [ - 5, - 11 - ] - }, - { - "type": 1, - "atoms": [ - 10, - 4 - ] - }, - { - "type": 1, - "atoms": [ - 4, - 6 - ] - }, - { - "type": 1, - "atoms": [ - 6, - 7 - ] - }, - { - "type": 1, - "atoms": [ - 7, - 8 - ] - }, - { - "type": 1, - "atoms": [ - 8, - 9 + 1, + 0 ] }, { - "type": 1, + "type": 2, "atoms": [ - 9, - 10 + 0, + 2 ] - }, - { - "type": 1, - "atoms": [ - 10, - 11 - ], - "stereo": 1 - }, - { - "type": 1, - "atoms": [ - 6, - 0 - ], - "stereo": 6 - }, - { - "type": 1, - "atoms": [ - 7, - 1 - ], - "stereo": 6 - }, + } + ], + "sgroups": [ { - "type": 1, + "type": "SUP", "atoms": [ - 8, + 0, + 1, 2 ], - "stereo": 6 - }, - { - "type": 1, - "atoms": [ - 9, - 3 - ], - "stereo": 6 + "name": "Ac", + "id": 0, + "attachmentPoints": [ + { + "attachmentAtom": 0, + "attachmentId": "" + } + ] } - ] + ], + "stereoFlagPosition": { + "x": 3.1888328099416454, + "y": 0.4374494975248093, + "z": 0 + } }, - "mol1": { + "mol2": { "type": "molecule", "atoms": [ { - "label": "O", - "location": [ - 6.485296128836603, - -10.698407125110593, - 0 - ] - }, - { - "label": "O", - "location": [ - 6.485296128836603, - -12.700486369551355, - 0 - ] - }, - { - "label": "O", - "location": [ - 4.751016887560832, - -13.701592874889409, - 0 - ] - }, - { - "label": "O", + "label": "C", "location": [ - 3.0222220619342943, - -12.700620135786702, + 4.538832809941641, + -2.437423026906677, 0 ] }, { "label": "O", "location": [ - 4.756501303210065, - -10.698407125110593, + 4.797723598381448, + -1.4714593502256887, 0 ] }, { "label": "O", "location": [ - 2.2647038711633973, - -11.345969470426136, + 5.2460261125030305, + -3.1444959151478606, 0 ] }, { "label": "C", "location": [ - 5.620898716023334, - -11.19896037777962, + 6.211989789184016, + -2.8857255410282576, 0 - ], - "stereoLabel": "abs" - }, - { - "label": "C", - "location": [ - 5.620898716023334, - -12.199933116882328, - 0 - ], - "stereoLabel": "abs" - }, - { - "label": "C", - "location": [ - 4.756501303210065, - -12.700620135786702, - 0 - ], - "stereoLabel": "abs" + ] }, { "label": "C", "location": [ - 3.8866194747475635, - -12.200066883117675, + 6.470760163303619, + -1.9197618643472696, 0 - ], - "stereoLabel": "abs" + ] }, { "label": "C", "location": [ - 3.8866194747475635, - -11.199094144014968, + 7.1778330515448046, + -2.6269551669086564, 0 - ], - "stereoLabel": "abs" + ] }, { "label": "C", "location": [ - 3.0222220619342943, - -10.69854089134594, + 6.9190626774252, + -3.5927984292694397, 0 ] } ], "bonds": [ { - "type": 1, - "atoms": [ - 5, - 11 - ] - }, - { - "type": 1, - "atoms": [ - 10, - 4 - ] - }, - { - "type": 1, - "atoms": [ - 4, - 6 - ] - }, - { - "type": 1, + "type": 2, "atoms": [ - 6, - 7 + 0, + 1 ] }, { "type": 1, "atoms": [ - 7, - 8 + 0, + 2 ] }, { "type": 1, "atoms": [ - 8, - 9 + 2, + 3 ] }, { "type": 1, "atoms": [ - 9, - 10 + 3, + 4 ] }, { "type": 1, "atoms": [ - 10, - 11 - ], - "stereo": 1 - }, - { - "type": 1, - "atoms": [ - 6, - 0 - ], - "stereo": 1 - }, - { - "type": 1, - "atoms": [ - 7, - 1 - ], - "stereo": 1 - }, - { - "type": 1, - "atoms": [ - 8, - 2 - ], - "stereo": 6 - }, - { - "type": 1, - "atoms": [ - 9, - 3 - ], - "stereo": 6 - } - ] - }, - "mol2": { - "type": "molecule", - "atoms": [ - { - "label": "C", - "location": [ - 9.55, - -6.4750000000000005, - 0 - ] - }, - { - "label": "C", - "location": [ - 8.683936389708672, - -6.974986764690934, - 0 + 3, + 5 ] }, - { - "label": "O", - "location": [ - 9.55, - -5.475026470618133, - 0 - ] - } - ], - "bonds": [ { "type": 1, "atoms": [ - 1, - 0 - ] - }, - { - "type": 2, - "atoms": [ - 0, - 2 + 3, + 6 ] } ], @@ -473,9 +270,13 @@ "atoms": [ 0, 1, - 2 + 2, + 3, + 4, + 5, + 6 ], - "name": "Ac", + "name": "CO2tBu", "id": 0, "attachmentPoints": [ { @@ -486,8 +287,8 @@ } ], "stereoFlagPosition": { - "x": 9.55, - "y": 4.475026470618133, + "x": 7.1778330515448046, + "y": 0.47145935022568874, "z": 0 } }, @@ -497,39 +298,63 @@ { "label": "C", "location": [ - 13.175, - -6.5, + 6.338832809941643, + -2.4624230269066767, + 0 + ] + }, + { + "label": "O", + "location": [ + 6.597723598381448, + -1.4964593502256887, + 0 + ] + }, + { + "label": "O", + "location": [ + 7.046026112503027, + -3.1694959151478606, + 0 + ] + }, + { + "label": "C", + "location": [ + 8.011989789184012, + -2.9107255410282575, 0 ] }, { - "label": "H", + "label": "C", "location": [ - 12.308937298363263, - -6.99999771089797, + 8.270760163303619, + -1.9447618643472695, 0 ] }, { - "label": "O", + "label": "C", "location": [ - 14.040996035275285, - -6.99999771089797, + 8.977833051544797, + -2.6519551669086563, 0 ] }, { - "label": "O", + "label": "C", "location": [ - 13.175, - -5.500004578204059, + 8.719062677425198, + -3.6177984292694396, 0 ] } ], "bonds": [ { - "type": 1, + "type": 2, "atoms": [ 0, 1 @@ -543,11 +368,32 @@ ] }, { - "type": 2, + "type": 1, "atoms": [ - 0, + 2, 3 ] + }, + { + "type": 1, + "atoms": [ + 3, + 4 + ] + }, + { + "type": 1, + "atoms": [ + 3, + 5 + ] + }, + { + "type": 1, + "atoms": [ + 3, + 6 + ] } ], "sgroups": [ @@ -557,15 +403,24 @@ 0, 1, 2, - 3 + 3, + 4, + 5, + 6 ], - "name": "formic acid", - "id": 0 + "name": "CO2tBu", + "id": 0, + "attachmentPoints": [ + { + "attachmentAtom": 0, + "attachmentId": "" + } + ] } ], "stereoFlagPosition": { - "x": 14.040996035275285, - "y": 4.500004578204059, + "x": 8.977833051544797, + "y": 0.49645935022568866, "z": 0 } }, @@ -575,32 +430,64 @@ { "label": "C", "location": [ - 9.225, - -11.825000000000001, + 2.238832809941645, + -3.312423026906677, 0 ] }, { - "label": "O", + "label": "C", + "location": [ + 2.238832809941645, + -4.312868712929626, + 0 + ] + }, + { + "label": "C", + "location": [ + 1.372166948455197, + -4.81291011856605, + 0 + ] + }, + { + "label": "C", + "location": [ + 1.372166948455197, + -5.817710301590184, + 0 + ] + }, + { + "label": "C", + "location": [ + 2.2410100584422388, + -6.3125505024751885, + 0 + ] + }, + { + "label": "C", "location": [ - 10.090939512868808, - -11.324950422146182, + 3.1022327986772007, + -5.813234846338963, 0 ] }, { "label": "C", "location": [ - 10.956999781491746, - -11.82487924424587, + 3.1022327986772007, + -4.812426285565918, 0 ] }, { "label": "O", "location": [ - 8.35893973137706, - -11.324950422146182, + 3.105256754928029, + -2.8121397047701873, 0 ] } @@ -609,22 +496,57 @@ { "type": 1, "atoms": [ - 0, - 1 + 1, + 0 ] }, { - "type": 1, + "type": 2, "atoms": [ 1, 2 ] }, + { + "type": 1, + "atoms": [ + 2, + 3 + ] + }, + { + "type": 2, + "atoms": [ + 3, + 4 + ] + }, + { + "type": 1, + "atoms": [ + 4, + 5 + ] + }, + { + "type": 2, + "atoms": [ + 5, + 6 + ] + }, + { + "type": 1, + "atoms": [ + 6, + 1 + ] + }, { "type": 2, "atoms": [ 0, - 3 + 7 ] } ], @@ -635,9 +557,13 @@ 0, 1, 2, - 3 + 3, + 4, + 5, + 6, + 7 ], - "name": "CO2Me", + "name": "Bz", "id": 0, "attachmentPoints": [ { @@ -648,8 +574,8 @@ } ], "stereoFlagPosition": { - "x": 10.956999781491746, - "y": 10.324950422146182, + "x": 3.105256754928029, + "y": 1.8121397047701873, "z": 0 } }, @@ -659,72 +585,80 @@ { "label": "C", "location": [ - 13.499999999999998, - -11.8, + 3.1638328099416455, + -3.362423026906677, 0 ] }, { - "label": "O", + "label": "C", "location": [ - 13.758890788439805, - -10.834036323319012, + 3.1638328099416455, + -4.362868712929627, 0 ] }, { - "label": "O", + "label": "C", "location": [ - 14.207193302561384, - -12.507072888241185, + 2.2971669484551978, + -4.862910118566049, 0 ] }, { "label": "C", "location": [ - 15.173156979242377, - -12.248302514121582, + 2.2971669484551978, + -5.867710301590185, 0 ] }, { "label": "C", "location": [ - 15.431927353361976, - -11.282338837440593, + 3.1660100584422395, + -6.362550502475189, 0 ] }, { "label": "C", "location": [ - 16.139000241603163, - -11.98953214000198, + 4.027232798677201, + -5.863234846338964, 0 ] }, { "label": "C", "location": [ - 15.880229867483555, - -12.955375402362764, + 4.027232798677201, + -4.862426285565917, + 0 + ] + }, + { + "label": "O", + "location": [ + 4.030256754928028, + -2.8621397047701875, 0 ] } ], "bonds": [ { - "type": 2, + "type": 1, "atoms": [ - 0, - 1 + 1, + 0 ] }, { - "type": 1, + "type": 2, "atoms": [ - 0, + 1, 2 ] }, @@ -736,7 +670,7 @@ ] }, { - "type": 1, + "type": 2, "atoms": [ 3, 4 @@ -745,16 +679,30 @@ { "type": 1, "atoms": [ - 3, + 4, 5 ] }, { - "type": 1, + "type": 2, "atoms": [ - 3, + 5, 6 ] + }, + { + "type": 1, + "atoms": [ + 6, + 1 + ] + }, + { + "type": 2, + "atoms": [ + 0, + 7 + ] } ], "sgroups": [ @@ -767,9 +715,10 @@ 3, 4, 5, - 6 + 6, + 7 ], - "name": "CO2tBu", + "name": "Bz", "id": 0, "attachmentPoints": [ { @@ -780,8 +729,8 @@ } ], "stereoFlagPosition": { - "x": 16.139000241603163, - "y": 9.834036323319012, + "x": 4.030256754928028, + "y": 1.8621397047701875, "z": 0 } }, @@ -789,73 +738,125 @@ "type": "molecule", "atoms": [ { - "label": "S", + "label": "C", "location": [ - 18.225, - -6.5, + 4.438832809941642, + -3.287423026906678, 0 ] }, { - "label": "O", + "label": "C", "location": [ - 18.225, - -5.5, + 4.438832809941642, + -4.287868712929627, 0 ] }, { - "label": "O", + "label": "C", "location": [ - 18.225, - -7.5, + 3.5721669484551946, + -4.787910118566049, 0 ] }, { - "label": "O", + "label": "C", + "location": [ + 3.5721669484551946, + -5.792710301590184, + 0 + ] + }, + { + "label": "C", + "location": [ + 4.441010058442236, + -6.287550502475191, + 0 + ] + }, + { + "label": "C", "location": [ - 19.225, - -6.5, + 5.302232798677201, + -5.7882348463389635, 0 ] }, { "label": "C", "location": [ - 17.225, - -6.5, + 5.302232798677201, + -4.787426285565917, + 0 + ] + }, + { + "label": "O", + "location": [ + 5.305256754928026, + -2.787139704770188, 0 ] } ], "bonds": [ { - "type": 2, + "type": 1, "atoms": [ - 0, - 1 + 1, + 0 ] }, { "type": 2, "atoms": [ - 0, + 1, 2 ] }, { "type": 1, "atoms": [ - 0, + 2, 3 ] }, + { + "type": 2, + "atoms": [ + 3, + 4 + ] + }, + { + "type": 1, + "atoms": [ + 4, + 5 + ] + }, + { + "type": 2, + "atoms": [ + 5, + 6 + ] + }, { "type": 1, + "atoms": [ + 6, + 1 + ] + }, + { + "type": 2, "atoms": [ 0, - 4 + 7 ] } ], @@ -867,15 +868,24 @@ 1, 2, 3, - 4 + 4, + 5, + 6, + 7 ], - "name": "methane sulphonic acid", - "id": 0 + "name": "Bz", + "id": 0, + "attachmentPoints": [ + { + "attachmentAtom": 0, + "attachmentId": "" + } + ] } ], "stereoFlagPosition": { - "x": 19.225, - "y": 4.5, + "x": 5.305256754928026, + "y": 1.7871397047701878, "z": 0 } }, @@ -885,32 +895,32 @@ { "label": "C", "location": [ - 17.65, - -11.8, + 6.238832809941643, + -3.3624230269066766, 0 ] }, { - "label": "C", + "label": "Cl", "location": [ - 16.78393729836326, - -12.299997710897971, + 6.238832809941643, + -2.43852349942595, 0 ] }, { - "label": "O", + "label": "Cl", "location": [ - 18.515996035275283, - -12.299997710897971, + 7.286582126032168, + -3.3624230269066766, 0 ] }, { - "label": "O", + "label": "Cl", "location": [ - 17.65, - -10.80000457820406, + 5.210481653512895, + -3.3624230269066766, 0 ] } @@ -931,7 +941,7 @@ ] }, { - "type": 2, + "type": 1, "atoms": [ 0, 3 @@ -947,13 +957,19 @@ 2, 3 ], - "name": "acetic acid", - "id": 0 + "name": "CCl3", + "id": 0, + "attachmentPoints": [ + { + "attachmentAtom": 0, + "attachmentId": "" + } + ] } ], "stereoFlagPosition": { - "x": 18.515996035275283, - "y": 9.80000457820406, + "x": 7.286582126032168, + "y": 1.43852349942595, "z": 0 } } diff --git a/ketcher-autotests/tests/test-data/KET/five-monomers.ket b/ketcher-autotests/tests/test-data/KET/five-monomers.ket index 4a53081088..f9e1dc217c 100644 --- a/ketcher-autotests/tests/test-data/KET/five-monomers.ket +++ b/ketcher-autotests/tests/test-data/KET/five-monomers.ket @@ -2,19 +2,19 @@ "root": { "nodes": [ { - "$ref": "monomer45" + "$ref": "monomer0" }, { - "$ref": "monomer46" + "$ref": "monomer1" }, { - "$ref": "monomer47" + "$ref": "monomer2" }, { - "$ref": "monomer49" + "$ref": "monomer3" }, { - "$ref": "monomer51" + "$ref": "monomer4" } ], "connections": [], @@ -36,12 +36,12 @@ } ] }, - "monomer45": { + "monomer0": { "type": "monomer", - "id": "45", + "id": "0", "position": { - "x": 7.325, - "y": -6.925000000000001 + "x": 1.6091666666666653, + "y": -3.5400000000000005 }, "alias": "A", "templateId": "A___Alanine" @@ -91,25 +91,19 @@ ] }, { - "type": "rg-label", + "label": "R#", "location": [ 1.5903092126145781, 0.20573302003705518, 0 - ], - "$refs": [ - "rg-2" ] }, { - "type": "rg-label", + "label": "R#", "location": [ -1.8232336838376932, 0.07071340035455183, 0 - ], - "$refs": [ - "rg-1" ] } ], @@ -159,7 +153,6 @@ } ], "classHELM": "PEPTIDE", - "naturalAnalogShort": "A", "id": "A___Alanine", "alias": "A", "attachmentPoints": [ @@ -177,14 +170,15 @@ }, "type": "right" } - ] + ], + "naturalAnalogShort": "A" }, - "monomer46": { + "monomer1": { "type": "monomer", - "id": "46", + "id": "1", "position": { - "x": 12.4, - "y": -6.775 + "x": 2.8975000000000035, + "y": -3.55 }, "alias": "25R", "templateId": "25R___2,5-Ribose" @@ -261,14 +255,11 @@ ] }, { - "type": "rg-label", + "label": "R#", "location": [ 0.99887855192617, -1.7441439684398161, 0 - ], - "$refs": [ - "rg-3" ] }, { @@ -280,25 +271,19 @@ ] }, { - "type": "rg-label", + "label": "R#", "location": [ -3.2364608094629723, 0.5275867619778833, 0 - ], - "$refs": [ - "rg-1" ] }, { - "type": "rg-label", + "label": "R#", "location": [ 2.690942527206626, -0.525586433022517, 0 - ], - "$refs": [ - "rg-2" ] } ], @@ -393,7 +378,6 @@ } ], "classHELM": "RNA", - "naturalAnalogShort": "R", "id": "25R___2,5-Ribose", "alias": "25R", "attachmentPoints": [ @@ -418,14 +402,15 @@ }, "type": "side" } - ] + ], + "naturalAnalogShort": "R" }, - "monomer47": { + "monomer2": { "type": "monomer", - "id": "47", + "id": "2", "position": { - "x": 15.8, - "y": -6.675000000000001 + "x": 4.410833333333336, + "y": -3.5233333333333348 }, "alias": "baA", "templateId": "baA___N-benzyl-adenine" @@ -514,14 +499,11 @@ ] }, { - "type": "rg-label", + "label": "R#", "location": [ -3.5871, -1.5034, 0 - ], - "$refs": [ - "rg-1" ] }, { @@ -724,7 +706,6 @@ } ], "classHELM": "RNA", - "naturalAnalogShort": "A", "id": "baA___N-benzyl-adenine", "alias": "baA", "attachmentPoints": [ @@ -735,14 +716,15 @@ }, "type": "left" } - ] + ], + "naturalAnalogShort": "A" }, - "monomer49": { + "monomer3": { "type": "monomer", - "id": "49", + "id": "3", "position": { - "x": 22.6, - "y": -6.8500000000000005 + "x": 8.23083333333332, + "y": -3.5383333333333327 }, "alias": "Test-6-Ch", "templateId": "Test-6-Ch___Test-6-AP-Chem" @@ -815,25 +797,19 @@ ] }, { - "type": "rg-label", + "label": "R#", "location": [ 12.771843848116424, -6.07362085187052, 0 - ], - "$refs": [ - "rg-2" ] }, { - "type": "rg-label", + "label": "R#", "location": [ 5.0282172628054775, -7.026424123021441, 0 - ], - "$refs": [ - "rg-1" ] }, { @@ -885,36 +861,27 @@ ] }, { - "type": "rg-label", + "label": "R#", "location": [ 4.8679167124638605, -1.6373056211748553, 0 - ], - "$refs": [ - "rg-3" ] }, { - "type": "rg-label", + "label": "R#", "location": [ 10.276735281944443, -7.698926431847001, 0 - ], - "$refs": [ - "rg-5" ] }, { - "type": "rg-label", + "label": "R#", "location": [ 7.575026006473786, -2.8621098261555935, 0 - ], - "$refs": [ - "rg-4" ] }, { @@ -934,14 +901,11 @@ ] }, { - "type": "rg-label", + "label": "R#", "location": [ 7.969727361556981, -9.713933349740689, 0 - ], - "$refs": [ - "rg-6" ] } ], @@ -1095,7 +1059,6 @@ } ], "classHELM": "CHEM", - "naturalAnalogShort": ".", "id": "Test-6-Ch___Test-6-AP-Chem", "alias": "Test-6-Ch", "attachmentPoints": [ @@ -1143,12 +1106,12 @@ } ] }, - "monomer51": { + "monomer4": { "type": "monomer", - "id": "51", + "id": "4", "position": { - "x": 19.35, - "y": -6.7250000000000005 + "x": 6.08083333333334, + "y": -3.546666666666667 }, "alias": "Test-6-Ph", "templateId": "Test-6-Ph___Test-6-AP-Phosphate" @@ -1173,14 +1136,11 @@ ] }, { - "type": "rg-label", + "label": "R#", "location": [ 9.52498354857537, -7.049987823354996, 0 - ], - "$refs": [ - "rg-2" ] }, { @@ -1224,58 +1184,43 @@ ] }, { - "type": "rg-label", + "label": "R#", "location": [ 7.783786555947607, -8.015886155068273, 0 - ], - "$refs": [ - "rg-6" ] }, { - "type": "rg-label", + "label": "R#", "location": [ 6.524988730126434, -8.04998609617131, 0 - ], - "$refs": [ - "rg-5" ] }, { - "type": "rg-label", + "label": "R#", "location": [ 5.524990457310123, -8.04998609617131, 0 - ], - "$refs": [ - "rg-4" ] }, { - "type": "rg-label", + "label": "R#", "location": [ 4.266192631488949, -8.015886155068273, 0 - ], - "$refs": [ - "rg-3" ] }, { - "type": "rg-label", + "label": "R#", "location": [ 3.658993680234884, -6.5499886869468416, 0 - ], - "$refs": [ - "rg-1" ] } ], @@ -1366,7 +1311,6 @@ } ], "classHELM": "RNA", - "naturalAnalogShort": "P", "id": "Test-6-Ph___Test-6-AP-Phosphate", "alias": "Test-6-Ph", "attachmentPoints": [ @@ -1412,6 +1356,7 @@ }, "type": "side" } - ] + ], + "naturalAnalogShort": "P" } } \ No newline at end of file diff --git a/ketcher-autotests/tests/test-data/KET/monomers-and-chem.ket b/ketcher-autotests/tests/test-data/KET/monomers-and-chem.ket index c519484716..b2280a7c99 100644 --- a/ketcher-autotests/tests/test-data/KET/monomers-and-chem.ket +++ b/ketcher-autotests/tests/test-data/KET/monomers-and-chem.ket @@ -2,35 +2,35 @@ "root": { "nodes": [ { - "$ref": "monomer1" + "$ref": "monomer10" }, { - "$ref": "monomer3" + "$ref": "monomer11" }, { - "$ref": "monomer6" + "$ref": "monomer12" } ], "connections": [ { "connectionType": "single", "endpoint1": { - "monomerId": "monomer1", + "monomerId": "monomer10", "attachmentPointId": "R2" }, "endpoint2": { - "monomerId": "monomer3", + "monomerId": "monomer11", "attachmentPointId": "R1" } }, { "connectionType": "single", "endpoint1": { - "monomerId": "monomer1", + "monomerId": "monomer10", "attachmentPointId": "R1" }, "endpoint2": { - "monomerId": "monomer6", + "monomerId": "monomer12", "attachmentPointId": "R1" } } @@ -47,12 +47,12 @@ } ] }, - "monomer1": { + "monomer10": { "type": "monomer", - "id": "1", + "id": "10", "position": { - "x": 7.9750000000000005, - "y": -5.9 + "x": 1.1050000000000004, + "y": -1.0191666666666643 }, "alias": "A", "templateId": "A___Alanine" @@ -164,32 +164,36 @@ } ], "classHELM": "PEPTIDE", - "naturalAnalogShort": "A", "id": "A___Alanine", "alias": "A", "attachmentPoints": [ { "attachmentAtom": 0, "leavingGroup": { - "atoms": [6] + "atoms": [ + 6 + ] }, "type": "left" }, { "attachmentAtom": 3, "leavingGroup": { - "atoms": [5] + "atoms": [ + 5 + ] }, "type": "right" } - ] + ], + "naturalAnalogShort": "A" }, - "monomer3": { + "monomer11": { "type": "monomer", - "id": "3", + "id": "11", "position": { - "x": 13.325000000000001, - "y": -5.825000000000005 + "x": 2.461666666666667, + "y": -1.0041666666666689 }, "alias": "Bal", "templateId": "Bal___beta-Alanine" @@ -299,32 +303,36 @@ } ], "classHELM": "PEPTIDE", - "naturalAnalogShort": "A", "id": "Bal___beta-Alanine", "alias": "Bal", "attachmentPoints": [ { "attachmentAtom": 5, "leavingGroup": { - "atoms": [6] + "atoms": [ + 6 + ] }, "type": "left" }, { "attachmentAtom": 1, "leavingGroup": { - "atoms": [3] + "atoms": [ + 3 + ] }, "type": "right" } - ] + ], + "naturalAnalogShort": "A" }, - "monomer6": { + "monomer12": { "type": "monomer", - "id": "6", + "id": "12", "position": { - "x": 8.075000000000003, - "y": -10.05 + "x": 1.1383333333333365, + "y": -2.135833333333331 }, "alias": "Az", "templateId": "Az___Azide" @@ -466,14 +474,15 @@ } ], "classHELM": "CHEM", - "naturalAnalogShort": ".", "id": "Az___Azide", "alias": "Az", "attachmentPoints": [ { "attachmentAtom": 1, "leavingGroup": { - "atoms": [8] + "atoms": [ + 8 + ] }, "type": "left" } diff --git a/ketcher-autotests/tests/test-data/KET/monomers-connected-with-bonds-expected.ket b/ketcher-autotests/tests/test-data/KET/monomers-connected-with-bonds-expected.ket index f3da730270..f5feba8da3 100644 --- a/ketcher-autotests/tests/test-data/KET/monomers-connected-with-bonds-expected.ket +++ b/ketcher-autotests/tests/test-data/KET/monomers-connected-with-bonds-expected.ket @@ -51,8 +51,8 @@ "type": "monomer", "id": "5", "position": { - "x": 10.625000000000002, - "y": -9.600000000000001 + "x": 2.7466666666666666, + "y": -1.849999999999996 }, "alias": "baA", "templateId": "baA___N-benzyl-adenine" @@ -63,144 +63,144 @@ { "label": "C", "location": [ - 0.697214131767731, - 0.16820947471081626, + 0.6972141317677306, + 0.16820947471081618, 0 ] }, { "label": "C", "location": [ - -0.05333142672977041, - -0.5077259564930163, + -0.05333142672977039, + -0.5077259564930161, 0 ] }, { "label": "C", "location": [ - -1.013903146805749, - -0.19568323999584952, + -1.0139031468057484, + -0.19568323999584944, 0 ] }, { "label": "N", "location": [ - -1.2239966460442384, - 0.7922949077051499, + -1.223996646044238, + 0.7922949077051495, 0 ] }, { "label": "C", "location": [ - -0.47345108754673704, - 1.4682303389089824, + -0.4734510875467368, + 1.4682303389089817, 0 ] }, { "label": "N", "location": [ - 0.4871879701892537, - 1.1561876224118157, + 0.48718797018925347, + 1.1561876224118153, 0 ] }, { "label": "N", "location": [ - -1.6074172821544819, - -1.0123543806254651, + -1.6074172821544812, + -1.0123543806254647, 0 ] }, { "label": "C", "location": [ - -1.0136337961656996, - -1.8294295472151547, + -1.0136337961656992, + -1.8294295472151538, 0 ] }, { "label": "N", "location": [ - -0.05299473842970873, - -1.5172521553979632, + -0.05299473842970871, + -1.5172521553979625, 0 ] }, { "label": "N", "location": [ - 1.6590652673839437, - -0.14201512496601743, + 1.659065267383943, + -0.14201512496601737, 0 ] }, { - "label": "H", + "label": "R#", "location": [ - -2.415469202302518, - -1.0123543806254651, + -2.4154692023025173, + -1.0123543806254647, 0 ] }, { "label": "C", "location": [ - 2.4090721246013462, - 0.5353343970980742, + 2.4090721246013453, + 0.535334397098074, 0 ] }, { "label": "C", "location": [ - 3.370923260217559, - 0.2251097974212405, + 3.3709232602175576, + 0.22510979742124038, 0 ] }, { "label": "C", "location": [ - 5.292336051009565, - -0.39897563557309307, + 5.2923360510095625, + -0.3989756355730929, 0 ] }, { "label": "C", "location": [ - 5.082242551771075, - 0.5890025121279063, + 5.082242551771072, + 0.5890025121279061, 0 ] }, { "label": "C", "location": [ - 4.121536156375073, - 0.9010452286250731, + 4.121536156375071, + 0.9010452286250726, 0 ] }, { "label": "C", "location": [ - 3.581084097116061, - -0.7629356879397712, + 3.5810840971160594, + -0.7629356879397708, 0 ] }, { "label": "C", "location": [ - 4.541790492512064, - -1.0749110667769255, + 4.541790492512062, + -1.074911066776925, 0 ] } @@ -352,11 +352,9 @@ "alias": "baA", "attachmentPoints": [ { - "attachmentAtom": 6, + "attachmentAtom": 10, "leavingGroup": { - "atoms": [ - 10 - ] + "atoms": [] }, "type": "left" } @@ -367,8 +365,8 @@ "type": "monomer", "id": "6", "position": { - "x": 10.625000000000002, - "y": -7.050000000000001 + "x": 2.7533333333333316, + "y": -2.574999999999998 }, "alias": "12ddR", "templateId": "12ddR___1',2'-Di-Deoxy-Ribose" @@ -379,16 +377,16 @@ { "label": "O", "location": [ - -0.5921963143298199, - 1.0703430921677837, + -0.5921963143298201, + 1.0703430921677841, 0 ] }, { "label": "C", "location": [ - -0.2365034541746466, - 0.09098958148863055, + -0.23650345417464672, + 0.0909895814886306, 0 ], "stereoLabel": "abs" @@ -396,16 +394,16 @@ { "label": "C", "location": [ - 0.2292798538121904, - 1.711159793552597, + 0.22927985381219051, + 1.7111597935525977, 0 ] }, { "label": "C", "location": [ - 0.804736863455934, - 0.12662137943036145, + 0.8047368634559343, + 0.1266213794303615, 0 ], "stereoLabel": "abs" @@ -413,48 +411,48 @@ { "label": "C", "location": [ - 1.0926390125172878, - 1.1279235219800545, + 1.0926390125172882, + 1.127923521980055, 0 ] }, { "label": "O", "location": [ - 1.443122545487998, - -0.6951326194948202, + 1.4431225454879986, + -0.6951326194948205, 0 ] }, { "label": "C", "location": [ - -0.8208510488798746, - -0.770077473255303, + -0.8208510488798749, + -0.7700774732553033, 0 ] }, { "label": "O", "location": [ - -1.8605632972030126, - -0.6951326194948202, + -1.8605632972030135, + -0.6951326194948205, 0 ] }, { - "label": "H", + "label": "R#", "location": [ - -2.328569251455221, - -1.3847780810220056, + -2.328569251455222, + -1.3847780810220063, 0 ] }, { - "label": "H", + "label": "R#", "location": [ - 2.2689050907691644, - -0.5819165753524784, + 2.2689050907691652, + -0.5819165753524786, 0 ] } @@ -538,20 +536,16 @@ "alias": "12ddR", "attachmentPoints": [ { - "attachmentAtom": 7, + "attachmentAtom": 8, "leavingGroup": { - "atoms": [ - 8 - ] + "atoms": [] }, "type": "left" }, { - "attachmentAtom": 5, + "attachmentAtom": 9, "leavingGroup": { - "atoms": [ - 9 - ] + "atoms": [] }, "type": "right" } @@ -562,8 +556,8 @@ "type": "monomer", "id": "7", "position": { - "x": 13.175, - "y": -7.050000000000001 + "x": 3.6000000000000005, + "y": -2.5900000000000043 }, "alias": "P", "templateId": "P___Phosphate" @@ -580,7 +574,7 @@ ] }, { - "label": "O", + "label": "R#", "location": [ -1.4399, 0, @@ -596,7 +590,7 @@ ] }, { - "label": "O", + "label": "R#", "location": [ 0.9601, 0, @@ -647,20 +641,16 @@ "alias": "P", "attachmentPoints": [ { - "attachmentAtom": 0, + "attachmentAtom": 1, "leavingGroup": { - "atoms": [ - 1 - ] + "atoms": [] }, "type": "left" }, { - "attachmentAtom": 0, + "attachmentAtom": 3, "leavingGroup": { - "atoms": [ - 3 - ] + "atoms": [] }, "type": "right" } diff --git a/ketcher-autotests/tests/test-data/KET/monomers-connected-with-bonds.ket b/ketcher-autotests/tests/test-data/KET/monomers-connected-with-bonds.ket index 7f1dfc9792..f56bc723c7 100644 --- a/ketcher-autotests/tests/test-data/KET/monomers-connected-with-bonds.ket +++ b/ketcher-autotests/tests/test-data/KET/monomers-connected-with-bonds.ket @@ -1,660 +1,675 @@ { - "root": { - "nodes": [ - { - "$ref": "monomer373" - }, - { - "$ref": "monomer374" - }, - { - "$ref": "monomer376" - } - ], - "connections": [ - { - "connectionType": "single", - "endpoint1": { - "monomerId": "monomer373", - "attachmentPointId": "R1" - }, - "endpoint2": { - "monomerId": "monomer374", - "attachmentPointId": "R3" - } - }, - { - "connectionType": "single", - "endpoint1": { - "monomerId": "monomer374", - "attachmentPointId": "R1" - }, - "endpoint2": { - "monomerId": "monomer376", - "attachmentPointId": "R2" - } - } - ], - "templates": [ - { - "$ref": "monomerTemplate-baA___N-benzyl-adenine" - }, - { - "$ref": "monomerTemplate-12ddR___1',2'-Di-Deoxy-Ribose" - }, - { - "$ref": "monomerTemplate-P___Phosphate" - } - ] - }, - "monomer373": { - "type": "monomer", - "id": "373", - "position": { - "x": 9.850000000000001, - "y": -11.279999995231629 - }, - "alias": "baA", - "templateId": "baA___N-benzyl-adenine" - }, - "monomerTemplate-baA___N-benzyl-adenine": { - "type": "monomerTemplate", - "atoms": [ - { - "label": "C", - "location": [ - 0.697214131767731, - 0.16820947471081626, - 0 - ] - }, - { - "label": "C", - "location": [ - -0.05333142672977041, - -0.5077259564930163, - 0 - ] - }, - { - "label": "C", - "location": [ - -1.013903146805749, - -0.19568323999584952, - 0 - ] - }, - { - "label": "N", - "location": [ - -1.2239966460442384, - 0.7922949077051499, - 0 - ] - }, - { - "label": "C", - "location": [ - -0.47345108754673704, - 1.4682303389089824, - 0 - ] - }, - { - "label": "N", - "location": [ - 0.4871879701892537, - 1.1561876224118157, - 0 - ] - }, - { - "label": "N", - "location": [ - -1.6074172821544819, - -1.0123543806254651, - 0 - ] - }, - { - "label": "C", - "location": [ - -1.0136337961656996, - -1.8294295472151547, - 0 - ] - }, - { - "label": "N", - "location": [ - -0.05299473842970873, - -1.5172521553979632, - 0 - ] - }, - { - "label": "N", - "location": [ - 1.6590652673839437, - -0.14201512496601743, - 0 - ] - }, - { - "label": "H", - "location": [ - -2.415469202302518, - -1.0123543806254651, - 0 - ] - }, - { - "label": "C", - "location": [ - 2.4090721246013462, - 0.5353343970980742, - 0 - ] - }, - { - "label": "C", - "location": [ - 3.370923260217559, - 0.2251097974212405, - 0 - ] - }, - { - "label": "C", - "location": [ - 5.292336051009565, - -0.39897563557309307, - 0 - ] - }, - { - "label": "C", - "location": [ - 5.082242551771075, - 0.5890025121279063, - 0 - ] - }, - { - "label": "C", - "location": [ - 4.121536156375073, - 0.9010452286250731, - 0 - ] - }, - { - "label": "C", - "location": [ - 3.581084097116061, - -0.7629356879397712, - 0 - ] - }, - { - "label": "C", - "location": [ - 4.541790492512064, - -1.0749110667769255, - 0 - ] - } - ], - "bonds": [ - { - "type": 1, - "atoms": [ - 0, - 9 - ] - }, - { - "type": 2, - "atoms": [ - 0, - 5 - ] - }, - { - "type": 1, - "atoms": [ - 0, - 1 - ] - }, - { - "type": 1, - "atoms": [ - 8, - 1 - ] - }, - { - "type": 2, - "atoms": [ - 1, - 2 - ] - }, - { - "type": 1, - "atoms": [ - 6, - 2 - ] - }, - { - "type": 1, - "atoms": [ - 2, - 3 - ] - }, - { - "type": 2, - "atoms": [ - 3, - 4 - ] - }, - { - "type": 1, - "atoms": [ - 4, - 5 - ] - }, - { - "type": 1, - "atoms": [ - 6, - 7 - ] - }, - { - "type": 1, - "atoms": [ - 6, - 10 - ] - }, - { - "type": 2, - "atoms": [ - 7, - 8 - ] - }, - { - "type": 1, - "atoms": [ - 9, - 11 - ] - }, - { - "type": 1, - "atoms": [ - 11, - 12 - ] - }, - { - "type": 2, - "atoms": [ - 15, - 12 - ] - }, - { - "type": 1, - "atoms": [ - 12, - 16 - ] - }, - { - "type": 2, - "atoms": [ - 13, - 14 - ] - }, - { - "type": 1, - "atoms": [ - 14, - 15 - ] - }, - { - "type": 2, - "atoms": [ - 16, - 17 - ] - }, - { - "type": 1, - "atoms": [ - 13, - 17 - ] - } - ], - "classHELM": "RNA", - "naturalAnalogShort": "A", - "id": "baA___N-benzyl-adenine", - "alias": "baA", - "attachmentPoints": [ - { - "attachmentAtom": 6, - "leavingGroup": { - "atoms": [10] - }, - "type": "left" - } - ] - }, - "monomer374": { - "type": "monomer", - "id": "374", - "position": { - "x": 9.850000000000001, - "y": -8.729999995231628 - }, - "alias": "12ddR", - "templateId": "12ddR___1',2'-Di-Deoxy-Ribose" - }, - "monomerTemplate-12ddR___1',2'-Di-Deoxy-Ribose": { - "type": "monomerTemplate", - "atoms": [ - { - "label": "O", - "location": [ - -0.5921963143298199, - 1.0703430921677837, - 0 - ] - }, - { - "label": "C", - "location": [ - -0.2365034541746466, - 0.09098958148863055, - 0 - ], - "stereoLabel": "abs" - }, - { - "label": "C", - "location": [ - 0.2292798538121904, - 1.711159793552597, - 0 - ] - }, - { - "label": "C", - "location": [ - 0.804736863455934, - 0.12662137943036145, - 0 - ], - "stereoLabel": "abs" - }, - { - "label": "C", - "location": [ - 1.0926390125172878, - 1.1279235219800545, - 0 - ] - }, - { - "label": "O", - "location": [ - 1.443122545487998, - -0.6951326194948202, - 0 - ] - }, - { - "label": "C", - "location": [ - -0.8208510488798746, - -0.770077473255303, - 0 - ] - }, - { - "label": "O", - "location": [ - -1.8605632972030126, - -0.6951326194948202, - 0 - ] - }, - { - "label": "H", - "location": [ - -2.328569251455221, - -1.3847780810220056, - 0 - ] - }, - { - "label": "H", - "location": [ - 2.2689050907691644, - -0.5819165753524784, - 0 - ] - } - ], - "bonds": [ - { - "type": 1, - "atoms": [ - 0, - 1 - ] - }, - { - "type": 1, - "atoms": [ - 0, - 2 - ] - }, - { - "type": 1, - "atoms": [ - 1, - 3 - ] - }, - { - "type": 1, - "atoms": [ - 1, - 6 - ], - "stereo": 1 - }, - { - "type": 1, - "atoms": [ - 2, - 4 - ] - }, - { - "type": 1, - "atoms": [ - 3, - 4 - ] - }, - { - "type": 1, - "atoms": [ - 3, - 5 - ], - "stereo": 6 - }, - { - "type": 1, - "atoms": [ - 5, - 9 - ] - }, - { - "type": 1, - "atoms": [ - 6, - 7 - ] - }, - { - "type": 1, - "atoms": [ - 7, - 8 - ] - } - ], - "classHELM": "RNA", - "naturalAnalogShort": "R", - "id": "12ddR___1',2'-Di-Deoxy-Ribose", - "alias": "12ddR", - "attachmentPoints": [ - { - "attachmentAtom": 7, - "leavingGroup": { - "atoms": [8] - }, - "type": "left" - }, - { - "attachmentAtom": 5, - "leavingGroup": { - "atoms": [9] - }, - "type": "right" - } - ] - }, - "monomer376": { - "type": "monomer", - "id": "376", - "position": { - "x": 12.4, - "y": -8.729999995231628 - }, - "alias": "P", - "templateId": "P___Phosphate" - }, - "monomerTemplate-P___Phosphate": { - "type": "monomerTemplate", - "atoms": [ - { - "label": "P", - "location": [ - -0.2399, - 0, - 0 - ] - }, - { - "label": "O", - "location": [ - -1.4399, - 0, - 0 - ] - }, - { - "label": "O", - "location": [ - 0.3598, - -1.0394, - 0 - ] - }, - { - "label": "O", - "location": [ - 0.9601, - 0, - 0 - ] - }, - { - "label": "O", - "location": [ - 0.3598, - 1.0394, - 0 - ] - } - ], - "bonds": [ - { - "type": 1, - "atoms": [ - 0, - 1 - ] - }, - { - "type": 2, - "atoms": [ - 0, - 2 - ] - }, - { - "type": 1, - "atoms": [ - 0, - 3 - ] - }, - { - "type": 1, - "atoms": [ - 0, - 4 - ] - } - ], - "classHELM": "RNA", - "naturalAnalogShort": "P", - "id": "P___Phosphate", - "alias": "P", - "attachmentPoints": [ - { - "attachmentAtom": 0, - "leavingGroup": { - "atoms": [1] - }, - "type": "left" - }, - { - "attachmentAtom": 0, - "leavingGroup": { - "atoms": [3] - }, - "type": "right" - } - ] - } + "root": { + "nodes": [ + { + "$ref": "monomer0" + }, + { + "$ref": "monomer1" + }, + { + "$ref": "monomer2" + } + ], + "connections": [ + { + "connectionType": "single", + "endpoint1": { + "monomerId": "monomer0", + "attachmentPointId": "R1" + }, + "endpoint2": { + "monomerId": "monomer1", + "attachmentPointId": "R3" + } + }, + { + "connectionType": "single", + "endpoint1": { + "monomerId": "monomer1", + "attachmentPointId": "R1" + }, + "endpoint2": { + "monomerId": "monomer2", + "attachmentPointId": "R2" + } + } + ], + "templates": [ + { + "$ref": "monomerTemplate-baA___N-benzyl-adenine" + }, + { + "$ref": "monomerTemplate-12ddR___1',2'-Di-Deoxy-Ribose" + }, + { + "$ref": "monomerTemplate-P___Phosphate" + } + ] + }, + "monomer0": { + "type": "monomer", + "id": "0", + "position": { + "x": 0.7566666666666708, + "y": 2.2016666618982947 + }, + "alias": "baA", + "templateId": "baA___N-benzyl-adenine" + }, + "monomerTemplate-baA___N-benzyl-adenine": { + "type": "monomerTemplate", + "atoms": [ + { + "label": "C", + "location": [ + 0.6972141317677306, + 0.16820947471081618, + 0 + ] + }, + { + "label": "C", + "location": [ + -0.05333142672977039, + -0.5077259564930161, + 0 + ] + }, + { + "label": "C", + "location": [ + -1.0139031468057484, + -0.19568323999584944, + 0 + ] + }, + { + "label": "N", + "location": [ + -1.223996646044238, + 0.7922949077051495, + 0 + ] + }, + { + "label": "C", + "location": [ + -0.4734510875467368, + 1.4682303389089817, + 0 + ] + }, + { + "label": "N", + "location": [ + 0.48718797018925347, + 1.1561876224118153, + 0 + ] + }, + { + "label": "N", + "location": [ + -1.6074172821544812, + -1.0123543806254647, + 0 + ] + }, + { + "label": "C", + "location": [ + -1.0136337961656992, + -1.8294295472151538, + 0 + ] + }, + { + "label": "N", + "location": [ + -0.05299473842970871, + -1.5172521553979625, + 0 + ] + }, + { + "label": "N", + "location": [ + 1.659065267383943, + -0.14201512496601737, + 0 + ] + }, + { + "type": "rg-label", + "location": [ + -2.4154692023025173, + -1.0123543806254647, + 0 + ], + "$refs": [ + "rg-1" + ] + }, + { + "label": "C", + "location": [ + 2.4090721246013453, + 0.535334397098074, + 0 + ] + }, + { + "label": "C", + "location": [ + 3.3709232602175576, + 0.22510979742124038, + 0 + ] + }, + { + "label": "C", + "location": [ + 5.2923360510095625, + -0.3989756355730929, + 0 + ] + }, + { + "label": "C", + "location": [ + 5.082242551771072, + 0.5890025121279061, + 0 + ] + }, + { + "label": "C", + "location": [ + 4.121536156375071, + 0.9010452286250726, + 0 + ] + }, + { + "label": "C", + "location": [ + 3.5810840971160594, + -0.7629356879397708, + 0 + ] + }, + { + "label": "C", + "location": [ + 4.541790492512062, + -1.074911066776925, + 0 + ] + } + ], + "bonds": [ + { + "type": 1, + "atoms": [ + 0, + 9 + ] + }, + { + "type": 2, + "atoms": [ + 0, + 5 + ] + }, + { + "type": 1, + "atoms": [ + 0, + 1 + ] + }, + { + "type": 1, + "atoms": [ + 8, + 1 + ] + }, + { + "type": 2, + "atoms": [ + 1, + 2 + ] + }, + { + "type": 1, + "atoms": [ + 6, + 2 + ] + }, + { + "type": 1, + "atoms": [ + 2, + 3 + ] + }, + { + "type": 2, + "atoms": [ + 3, + 4 + ] + }, + { + "type": 1, + "atoms": [ + 4, + 5 + ] + }, + { + "type": 1, + "atoms": [ + 6, + 7 + ] + }, + { + "type": 1, + "atoms": [ + 6, + 10 + ] + }, + { + "type": 2, + "atoms": [ + 7, + 8 + ] + }, + { + "type": 1, + "atoms": [ + 9, + 11 + ] + }, + { + "type": 1, + "atoms": [ + 11, + 12 + ] + }, + { + "type": 2, + "atoms": [ + 15, + 12 + ] + }, + { + "type": 1, + "atoms": [ + 12, + 16 + ] + }, + { + "type": 2, + "atoms": [ + 13, + 14 + ] + }, + { + "type": 1, + "atoms": [ + 14, + 15 + ] + }, + { + "type": 2, + "atoms": [ + 16, + 17 + ] + }, + { + "type": 1, + "atoms": [ + 13, + 17 + ] + } + ], + "classHELM": "RNA", + "naturalAnalogShort": "A", + "id": "baA___N-benzyl-adenine", + "alias": "baA", + "attachmentPoints": [ + { + "attachmentAtom": 10, + "leavingGroup": { + "atoms": [] + }, + "type": "left" + } + ] + }, + "monomer1": { + "type": "monomer", + "id": "1", + "position": { + "x": 0.763333333333336, + "y": 1.4766666618982929 + }, + "alias": "12ddR", + "templateId": "12ddR___1',2'-Di-Deoxy-Ribose" + }, + "monomerTemplate-12ddR___1',2'-Di-Deoxy-Ribose": { + "type": "monomerTemplate", + "atoms": [ + { + "label": "O", + "location": [ + -0.5921963143298201, + 1.0703430921677841, + 0 + ] + }, + { + "label": "C", + "location": [ + -0.23650345417464672, + 0.0909895814886306, + 0 + ], + "stereoLabel": "abs" + }, + { + "label": "C", + "location": [ + 0.22927985381219051, + 1.7111597935525977, + 0 + ] + }, + { + "label": "C", + "location": [ + 0.8047368634559343, + 0.1266213794303615, + 0 + ], + "stereoLabel": "abs" + }, + { + "label": "C", + "location": [ + 1.0926390125172882, + 1.127923521980055, + 0 + ] + }, + { + "label": "O", + "location": [ + 1.4431225454879986, + -0.6951326194948205, + 0 + ] + }, + { + "label": "C", + "location": [ + -0.8208510488798749, + -0.7700774732553033, + 0 + ] + }, + { + "label": "O", + "location": [ + -1.8605632972030135, + -0.6951326194948205, + 0 + ] + }, + { + "type": "rg-label", + "location": [ + -2.328569251455222, + -1.3847780810220063, + 0 + ], + "$refs": [ + "rg-1" + ] + }, + { + "type": "rg-label", + "location": [ + 2.2689050907691652, + -0.5819165753524786, + 0 + ], + "$refs": [ + "rg-2" + ] + } + ], + "bonds": [ + { + "type": 1, + "atoms": [ + 0, + 1 + ] + }, + { + "type": 1, + "atoms": [ + 0, + 2 + ] + }, + { + "type": 1, + "atoms": [ + 1, + 3 + ] + }, + { + "type": 1, + "atoms": [ + 1, + 6 + ], + "stereo": 1 + }, + { + "type": 1, + "atoms": [ + 2, + 4 + ] + }, + { + "type": 1, + "atoms": [ + 3, + 4 + ] + }, + { + "type": 1, + "atoms": [ + 3, + 5 + ], + "stereo": 6 + }, + { + "type": 1, + "atoms": [ + 5, + 9 + ] + }, + { + "type": 1, + "atoms": [ + 6, + 7 + ] + }, + { + "type": 1, + "atoms": [ + 7, + 8 + ] + } + ], + "classHELM": "RNA", + "naturalAnalogShort": "R", + "id": "12ddR___1',2'-Di-Deoxy-Ribose", + "alias": "12ddR", + "attachmentPoints": [ + { + "attachmentAtom": 8, + "leavingGroup": { + "atoms": [] + }, + "type": "left" + }, + { + "attachmentAtom": 9, + "leavingGroup": { + "atoms": [] + }, + "type": "right" + } + ] + }, + "monomer2": { + "type": "monomer", + "id": "2", + "position": { + "x": 1.6100000000000045, + "y": 1.4616666618982863 + }, + "alias": "P", + "templateId": "P___Phosphate" + }, + "monomerTemplate-P___Phosphate": { + "type": "monomerTemplate", + "atoms": [ + { + "label": "P", + "location": [ + -0.2399, + 0, + 0 + ] + }, + { + "type": "rg-label", + "location": [ + -1.4399, + 0, + 0 + ], + "$refs": [ + "rg-1" + ] + }, + { + "label": "O", + "location": [ + 0.3598, + -1.0394, + 0 + ] + }, + { + "type": "rg-label", + "location": [ + 0.9601, + 0, + 0 + ], + "$refs": [ + "rg-2" + ] + }, + { + "label": "O", + "location": [ + 0.3598, + 1.0394, + 0 + ] + } + ], + "bonds": [ + { + "type": 1, + "atoms": [ + 0, + 1 + ] + }, + { + "type": 2, + "atoms": [ + 0, + 2 + ] + }, + { + "type": 1, + "atoms": [ + 0, + 3 + ] + }, + { + "type": 1, + "atoms": [ + 0, + 4 + ] + } + ], + "classHELM": "RNA", + "naturalAnalogShort": "P", + "id": "P___Phosphate", + "alias": "P", + "attachmentPoints": [ + { + "attachmentAtom": 1, + "leavingGroup": { + "atoms": [] + }, + "type": "left" + }, + { + "attachmentAtom": 3, + "leavingGroup": { + "atoms": [] + }, + "type": "right" + } + ] + } } \ No newline at end of file diff --git a/ketcher-autotests/tests/test-data/KET/monomers-with-bonds.ket b/ketcher-autotests/tests/test-data/KET/monomers-with-bonds.ket index b1542b397c..aa50a86ec3 100644 --- a/ketcher-autotests/tests/test-data/KET/monomers-with-bonds.ket +++ b/ketcher-autotests/tests/test-data/KET/monomers-with-bonds.ket @@ -1,6 +1,15 @@ { "root": { "nodes": [ + { + "$ref": "monomer0" + }, + { + "$ref": "monomer1" + }, + { + "$ref": "monomer2" + }, { "$ref": "monomer3" }, @@ -22,15 +31,6 @@ { "$ref": "monomer9" }, - { - "$ref": "monomer19" - }, - { - "$ref": "monomer20" - }, - { - "$ref": "monomer22" - }, { "$ref": "mol0" }, @@ -42,88 +42,88 @@ { "connectionType": "single", "endpoint1": { - "monomerId": "monomer9", + "monomerId": "monomer6", "attachmentPointId": "R2" }, "endpoint2": { - "monomerId": "monomer3", + "monomerId": "monomer0", "attachmentPointId": "R1" } }, { "connectionType": "single", "endpoint1": { - "monomerId": "monomer9", + "monomerId": "monomer6", "attachmentPointId": "R1" }, "endpoint2": { - "monomerId": "monomer4", + "monomerId": "monomer1", "attachmentPointId": "R2" } }, { "connectionType": "single", "endpoint1": { - "monomerId": "monomer9", + "monomerId": "monomer6", "attachmentPointId": "R3" }, "endpoint2": { - "monomerId": "monomer5", + "monomerId": "monomer2", "attachmentPointId": "R1" } }, { "connectionType": "single", "endpoint1": { - "monomerId": "monomer9", + "monomerId": "monomer6", "attachmentPointId": "R4" }, "endpoint2": { - "monomerId": "monomer8", + "monomerId": "monomer5", "attachmentPointId": "R1" } }, { "connectionType": "single", "endpoint1": { - "monomerId": "monomer9", + "monomerId": "monomer6", "attachmentPointId": "R5" }, "endpoint2": { - "monomerId": "monomer7", + "monomerId": "monomer4", "attachmentPointId": "R1" } }, { "connectionType": "single", "endpoint1": { - "monomerId": "monomer9", + "monomerId": "monomer6", "attachmentPointId": "R6" }, "endpoint2": { - "monomerId": "monomer6", + "monomerId": "monomer3", "attachmentPointId": "R1" } }, { "connectionType": "single", "endpoint1": { - "monomerId": "monomer19", + "monomerId": "monomer7", "attachmentPointId": "R1" }, "endpoint2": { - "monomerId": "monomer20", + "monomerId": "monomer8", "attachmentPointId": "R3" } }, { "connectionType": "single", "endpoint1": { - "monomerId": "monomer20", + "monomerId": "monomer8", "attachmentPointId": "R1" }, "endpoint2": { - "monomerId": "monomer22", + "monomerId": "monomer9", "attachmentPointId": "R2" } } @@ -303,12 +303,12 @@ } ] }, - "monomer3": { + "monomer0": { "type": "monomer", - "id": "3", + "id": "0", "position": { - "x": 8.200000000000001, - "y": -2.475 + "x": 5.6829166666666575, + "y": -1.6658333333333395 }, "alias": "Test-6-P", "templateId": "Test-6-P___Test-6-AP-Peptide" @@ -350,14 +350,11 @@ ] }, { - "type": "rg-label", + "label": "R#", "location": [ 14.370094318903023, -9.087139126886763, 0 - ], - "$refs": [ - "rg-2" ] }, { @@ -393,14 +390,11 @@ ] }, { - "type": "rg-label", + "label": "R#", "location": [ 10.026507468894986, -6.135943695987198, 0 - ], - "$refs": [ - "rg-3" ] }, { @@ -412,14 +406,11 @@ ] }, { - "type": "rg-label", + "label": "R#", "location": [ 10.969148525777182, -9.087932512310758, 0 - ], - "$refs": [ - "rg-1" ] }, { @@ -447,25 +438,19 @@ ] }, { - "type": "rg-label", + "label": "R#", "location": [ 15.130256728266728, -5.388177933873388, 0 - ], - "$refs": [ - "rg-5" ] }, { - "type": "rg-label", + "label": "R#", "location": [ 12.684646158806977, -4.750692745694667, 0 - ], - "$refs": [ - "rg-4" ] }, { @@ -509,14 +494,11 @@ ] }, { - "type": "rg-label", + "label": "R#", "location": [ 17.210910002689502, -9.718078885317539, 0 - ], - "$refs": [ - "rg-6" ] } ], @@ -678,7 +660,6 @@ } ], "classHELM": "PEPTIDE", - "naturalAnalogShort": "X", "id": "Test-6-P___Test-6-AP-Peptide", "alias": "Test-6-P", "attachmentPoints": [ @@ -724,74 +705,75 @@ }, "type": "side" } - ] + ], + "naturalAnalogShort": "X" }, - "monomer4": { + "monomer1": { "type": "monomer", - "id": "4", + "id": "1", "position": { - "x": 10.9, - "y": -2.375 + "x": 6.436249999999995, + "y": -1.8925000000000045 }, "alias": "Test-6-P", "templateId": "Test-6-P___Test-6-AP-Peptide" }, - "monomer5": { + "monomer2": { "type": "monomer", - "id": "5", + "id": "2", "position": { - "x": 13.725000000000001, - "y": -2.275 + "x": 7.234583333333336, + "y": -1.7725000000000066 }, "alias": "Test-6-P", "templateId": "Test-6-P___Test-6-AP-Peptide" }, - "monomer6": { + "monomer3": { "type": "monomer", - "id": "6", + "id": "3", "position": { - "x": 7.8500000000000005, - "y": -7.300000000000001 + "x": 5.7262499999999905, + "y": -0.6341666666666611 }, "alias": "Test-6-P", "templateId": "Test-6-P___Test-6-AP-Peptide" }, - "monomer7": { + "monomer4": { "type": "monomer", - "id": "7", + "id": "4", "position": { - "x": 10.65, - "y": -7.1000000000000005 + "x": 6.512916666666661, + "y": -0.5674999999999963 }, "alias": "Test-6-P", "templateId": "Test-6-P___Test-6-AP-Peptide" }, - "monomer8": { + "monomer5": { "type": "monomer", - "id": "8", + "id": "5", "position": { - "x": 13.725000000000001, - "y": -7.1000000000000005 + "x": 7.507916666666671, + "y": -0.6941666666666598 }, "alias": "Test-6-P", "templateId": "Test-6-P___Test-6-AP-Peptide" }, - "monomer9": { + "monomer6": { "type": "monomer", - "id": "9", + "id": "6", "position": { - "x": 10.825000000000001, - "y": -4.7250000000000005 + "x": 6.461249999999995, + "y": -1.2425000000000015 }, "alias": "Test-6-P", "templateId": "Test-6-P___Test-6-AP-Peptide" }, - "monomer19": { + "monomer7": { "type": "monomer", - "id": "19", + "id": "7", "position": { - "x": 2.2, - "y": -8.9 + "x": 2.896249999999987, + "y": -0.6408333333333339 }, "alias": "A", "templateId": "A___Adenine" @@ -880,14 +862,11 @@ ] }, { - "type": "rg-label", + "label": "R#", "location": [ -3.5871, -1.5034, 0 - ], - "$refs": [ - "rg-1" ] } ], @@ -978,7 +957,6 @@ } ], "classHELM": "RNA", - "naturalAnalogShort": "A", "id": "A___Adenine", "alias": "A", "attachmentPoints": [ @@ -989,14 +967,15 @@ }, "type": "left" } - ] + ], + "naturalAnalogShort": "A" }, - "monomer20": { + "monomer8": { "type": "monomer", - "id": "20", + "id": "8", "position": { - "x": 2.2, - "y": -6.3500000000000005 + "x": 2.9162499999999874, + "y": -1.3775000000000024 }, "alias": "R", "templateId": "R___Ribose" @@ -1073,14 +1052,11 @@ ] }, { - "type": "rg-label", + "label": "R#", "location": [ 0.028505008862309486, -2.2776145051109995, 0 - ], - "$refs": [ - "rg-3" ] }, { @@ -1092,25 +1068,19 @@ ] }, { - "type": "rg-label", + "label": "R#", "location": [ -2.573094997979451, 1.7634527287149055, 0 - ], - "$refs": [ - "rg-1" ] }, { - "type": "rg-label", + "label": "R#", "location": [ 2.1556645047902916, 0.9376647652075489, 0 - ], - "$refs": [ - "rg-2" ] } ], @@ -1205,7 +1175,6 @@ } ], "classHELM": "RNA", - "naturalAnalogShort": "R", "id": "R___Ribose", "alias": "R", "attachmentPoints": [ @@ -1230,14 +1199,15 @@ }, "type": "side" } - ] + ], + "naturalAnalogShort": "R" }, - "monomer22": { + "monomer9": { "type": "monomer", - "id": "22", + "id": "9", "position": { - "x": 4.75, - "y": -6.3500000000000005 + "x": 3.8195833333333216, + "y": -1.3908333333333351 }, "alias": "P", "templateId": "P___Phosphate" @@ -1248,46 +1218,40 @@ { "label": "P", "location": [ - -0.2399, + -0.19991692871090108, 0, 0 ] }, { - "type": "rg-label", + "label": "R#", "location": [ - -1.4399, + -1.1999182394782262, 0, 0 - ], - "$refs": [ - "rg-1" ] }, { "label": "O", "location": [ - 0.3598, - -1.0394, + 0.29983372634506966, + -0.8661678020096315, 0 ] }, { - "type": "rg-label", + "label": "R#", "location": [ - 0.9601, + 0.800084382056424, 0, 0 - ], - "$refs": [ - "rg-2" ] }, { "label": "O", "location": [ - 0.3598, - 1.0394, + 0.29983372634506966, + 0.8661678020096315, 0 ] } @@ -1323,7 +1287,6 @@ } ], "classHELM": "RNA", - "naturalAnalogShort": "P", "id": "P___Phosphate", "alias": "P", "attachmentPoints": [ @@ -1341,6 +1304,7 @@ }, "type": "right" } - ] + ], + "naturalAnalogShort": "P" } } \ No newline at end of file diff --git a/ketcher-autotests/tests/test-data/KET/peptide-enumeration-one-two-three.ket b/ketcher-autotests/tests/test-data/KET/peptide-enumeration-one-two-three.ket index 1264c7a455..a4a5b31dde 100644 --- a/ketcher-autotests/tests/test-data/KET/peptide-enumeration-one-two-three.ket +++ b/ketcher-autotests/tests/test-data/KET/peptide-enumeration-one-two-three.ket @@ -2,242 +2,242 @@ "root": { "nodes": [ { - "$ref": "monomer187" + "$ref": "monomer42" }, { - "$ref": "monomer188" + "$ref": "monomer43" }, { - "$ref": "monomer214" + "$ref": "monomer44" }, { - "$ref": "monomer215" + "$ref": "monomer45" }, { - "$ref": "monomer217" + "$ref": "monomer46" }, { - "$ref": "monomer226" + "$ref": "monomer47" }, { - "$ref": "monomer230" + "$ref": "monomer48" }, { - "$ref": "monomer231" + "$ref": "monomer49" }, { - "$ref": "monomer236" + "$ref": "monomer50" }, { - "$ref": "monomer237" + "$ref": "monomer51" }, { - "$ref": "monomer241" + "$ref": "monomer52" }, { - "$ref": "monomer242" + "$ref": "monomer53" }, { - "$ref": "monomer246" + "$ref": "monomer54" }, { - "$ref": "monomer247" + "$ref": "monomer55" }, { - "$ref": "monomer251" + "$ref": "monomer56" }, { - "$ref": "monomer253" + "$ref": "monomer57" }, { - "$ref": "monomer258" + "$ref": "monomer58" }, { - "$ref": "monomer260" + "$ref": "monomer59" }, { - "$ref": "monomer264" + "$ref": "monomer60" }, { - "$ref": "monomer267" + "$ref": "monomer61" }, { - "$ref": "monomer269" + "$ref": "monomer62" }, { - "$ref": "monomer272" + "$ref": "monomer63" }, { - "$ref": "monomer283" + "$ref": "monomer64" }, { - "$ref": "monomer284" + "$ref": "monomer65" }, { - "$ref": "monomer288" + "$ref": "monomer66" }, { - "$ref": "monomer289" + "$ref": "monomer67" }, { - "$ref": "monomer293" + "$ref": "monomer68" }, { - "$ref": "monomer294" + "$ref": "monomer69" } ], "connections": [ { "connectionType": "single", "endpoint1": { - "monomerId": "monomer187", + "monomerId": "monomer42", "attachmentPointId": "R3" }, "endpoint2": { - "monomerId": "monomer188", + "monomerId": "monomer43", "attachmentPointId": "R3" } }, { "connectionType": "single", "endpoint1": { - "monomerId": "monomer214", + "monomerId": "monomer44", "attachmentPointId": "R2" }, "endpoint2": { - "monomerId": "monomer215", + "monomerId": "monomer45", "attachmentPointId": "R2" } }, { "connectionType": "single", "endpoint1": { - "monomerId": "monomer226", + "monomerId": "monomer47", "attachmentPointId": "R1" }, "endpoint2": { - "monomerId": "monomer217", + "monomerId": "monomer46", "attachmentPointId": "R1" } }, { "connectionType": "single", "endpoint1": { - "monomerId": "monomer230", + "monomerId": "monomer48", "attachmentPointId": "R2" }, "endpoint2": { - "monomerId": "monomer231", + "monomerId": "monomer49", "attachmentPointId": "R2" } }, { "connectionType": "single", "endpoint1": { - "monomerId": "monomer236", + "monomerId": "monomer50", "attachmentPointId": "R1" }, "endpoint2": { - "monomerId": "monomer237", + "monomerId": "monomer51", "attachmentPointId": "R1" } }, { "connectionType": "single", "endpoint1": { - "monomerId": "monomer241", + "monomerId": "monomer52", "attachmentPointId": "R3" }, "endpoint2": { - "monomerId": "monomer242", + "monomerId": "monomer53", "attachmentPointId": "R2" } }, { "connectionType": "single", "endpoint1": { - "monomerId": "monomer246", + "monomerId": "monomer54", "attachmentPointId": "R2" }, "endpoint2": { - "monomerId": "monomer247", + "monomerId": "monomer55", "attachmentPointId": "R1" } }, { "connectionType": "single", "endpoint1": { - "monomerId": "monomer251", + "monomerId": "monomer56", "attachmentPointId": "R1" }, "endpoint2": { - "monomerId": "monomer253", + "monomerId": "monomer57", "attachmentPointId": "R1" } }, { "connectionType": "single", "endpoint1": { - "monomerId": "monomer258", + "monomerId": "monomer58", "attachmentPointId": "R2" }, "endpoint2": { - "monomerId": "monomer260", + "monomerId": "monomer59", "attachmentPointId": "R2" } }, { "connectionType": "single", "endpoint1": { - "monomerId": "monomer264", + "monomerId": "monomer60", "attachmentPointId": "R1" }, "endpoint2": { - "monomerId": "monomer267", + "monomerId": "monomer61", "attachmentPointId": "R2" } }, { "connectionType": "single", "endpoint1": { - "monomerId": "monomer269", + "monomerId": "monomer62", "attachmentPointId": "R2" }, "endpoint2": { - "monomerId": "monomer272", + "monomerId": "monomer63", "attachmentPointId": "R1" } }, { "connectionType": "single", "endpoint1": { - "monomerId": "monomer283", + "monomerId": "monomer64", "attachmentPointId": "R2" }, "endpoint2": { - "monomerId": "monomer284", + "monomerId": "monomer65", "attachmentPointId": "R2" } }, { "connectionType": "single", "endpoint1": { - "monomerId": "monomer288", + "monomerId": "monomer66", "attachmentPointId": "R3" }, "endpoint2": { - "monomerId": "monomer289", + "monomerId": "monomer67", "attachmentPointId": "R3" } }, { "connectionType": "single", "endpoint1": { - "monomerId": "monomer293", + "monomerId": "monomer68", "attachmentPointId": "R3" }, "endpoint2": { - "monomerId": "monomer294", + "monomerId": "monomer69", "attachmentPointId": "R2" } } @@ -284,12 +284,12 @@ } ] }, - "monomer187": { + "monomer42": { "type": "monomer", - "id": "187", + "id": "42", "position": { - "x": 15.025000000000002, - "y": 6.75 + "x": 5.970277777777775, + "y": 1.1202777777777755 }, "alias": "Ggu", "templateId": "Ggu___gamma-glutamic acid" @@ -492,22 +492,22 @@ ], "naturalAnalogShort": "E" }, - "monomer188": { + "monomer43": { "type": "monomer", - "id": "188", + "id": "43", "position": { - "x": 18.425, - "y": 6.800000000000001 + "x": 7.059166666666667, + "y": 1.236944444444443 }, "alias": "Ggu", "templateId": "Ggu___gamma-glutamic acid" }, - "monomer214": { + "monomer44": { "type": "monomer", - "id": "214", + "id": "44", "position": { - "x": 1.4999999999999993, - "y": 3.7250000000000005 + "x": 0.9786111111111041, + "y": 1.8508333333333284 }, "alias": "DADip", "templateId": "DADip___3,3-diphenylpropanoic acid" @@ -794,22 +794,22 @@ ], "naturalAnalogShort": "X" }, - "monomer215": { + "monomer45": { "type": "monomer", - "id": "215", + "id": "45", "position": { - "x": 5.0000000000000036, - "y": 3.7749999999999995 + "x": 1.7008333333333312, + "y": 1.900833333333331 }, "alias": "DADip", "templateId": "DADip___3,3-diphenylpropanoic acid" }, - "monomer217": { + "monomer46": { "type": "monomer", - "id": "217", + "id": "46", "position": { - "x": 5.0000000000000036, - "y": 1.7500000000000009 + "x": 1.7008333333333312, + "y": -0.12416666666666926 }, "alias": "Ph", "templateId": "Ph___Phenyl" @@ -820,56 +820,56 @@ { "label": "H", "location": [ - 1.73208844173232, - -1.0000125717249064, + 1.7320884417323203, + -1.0000125717249067, 0 ] }, { "label": "C", "location": [ - 2.732101013457226, - -1.0000125717249064, + 2.7321010134572266, + -1.0000125717249067, 0 ] }, { "label": "C", "location": [ - 3.2321072993196793, - -1.8660234588386755, + 3.23210729931968, + -1.866023458838676, 0 ] }, { "label": "C", "location": [ - 4.232119871044586, - -1.8660234588386755, + 4.232119871044587, + -1.866023458838676, 0 ] }, { "label": "C", "location": [ - 4.732126156907039, - -1.0000125717249064, + 4.73212615690704, + -1.0000125717249067, 0 ] }, { "label": "C", "location": [ - 4.232119871044586, - -0.13400168461113748, + 4.232119871044587, + -0.1340016846111375, 0 ] }, { "label": "C", "location": [ - 3.2321072993196793, - -0.13400168461113748, + 3.23210729931968, + -0.1340016846111375, 0 ] } @@ -939,22 +939,22 @@ ], "naturalAnalogShort": "X" }, - "monomer226": { + "monomer47": { "type": "monomer", - "id": "226", + "id": "47", "position": { - "x": 1.55, - "y": 1.85 + "x": 1.028611111111105, + "y": -0.02416666666667311 }, "alias": "Ph", "templateId": "Ph___Phenyl" }, - "monomer230": { + "monomer48": { "type": "monomer", - "id": "230", + "id": "48", "position": { - "x": 15.350000000000005, - "y": 4.525000000000001 + "x": 6.250833333333332, + "y": 0.20638888888888424 }, "alias": "D-gGlu", "templateId": "D-gGlu___D-Gamma glutamic acid" @@ -1157,82 +1157,82 @@ ], "naturalAnalogShort": "E" }, - "monomer231": { + "monomer49": { "type": "monomer", - "id": "231", + "id": "49", "position": { - "x": 18.350000000000005, - "y": 4.550000000000002 + "x": 6.939722222222227, + "y": 0.29805555555555147 }, "alias": "D-gGlu", "templateId": "D-gGlu___D-Gamma glutamic acid" }, - "monomer236": { + "monomer50": { "type": "monomer", - "id": "236", + "id": "50", "position": { - "x": 15.224999999999994, - "y": 1.9249999999999956 + "x": 6.2369444444444335, + "y": -0.6602777777777838 }, "alias": "D-gGlu", "templateId": "D-gGlu___D-Gamma glutamic acid" }, - "monomer237": { + "monomer51": { "type": "monomer", - "id": "237", + "id": "51", "position": { - "x": 18.250000000000025, - "y": 1.7999999999999956 + "x": 6.950833333333358, + "y": -0.7186111111111172 }, "alias": "D-gGlu", "templateId": "D-gGlu___D-Gamma glutamic acid" }, - "monomer241": { + "monomer52": { "type": "monomer", - "id": "241", + "id": "52", "position": { - "x": 15.525000000000004, - "y": 11.424999999999985 + "x": 6.203611111111106, + "y": 2.884166666666649 }, "alias": "D-gGlu", "templateId": "D-gGlu___D-Gamma glutamic acid" }, - "monomer242": { + "monomer53": { "type": "monomer", - "id": "242", + "id": "53", "position": { - "x": 18.52500000000001, - "y": 11.324999999999987 + "x": 6.8925000000000045, + "y": 2.850833333333317 }, "alias": "D-gGlu", "templateId": "D-gGlu___D-Gamma glutamic acid" }, - "monomer246": { + "monomer54": { "type": "monomer", - "id": "246", + "id": "54", "position": { - "x": 15.27500000000001, - "y": 9.049999999999999 + "x": 6.0647222222222235, + "y": 2.08694444444444 }, "alias": "D-gGlu", "templateId": "D-gGlu___D-Gamma glutamic acid" }, - "monomer247": { + "monomer55": { "type": "monomer", - "id": "247", + "id": "55", "position": { - "x": 18.47499999999999, - "y": 8.949999999999998 + "x": 6.9536111111110985, + "y": 2.053611111111105 }, "alias": "D-gGlu", "templateId": "D-gGlu___D-Gamma glutamic acid" }, - "monomer251": { + "monomer56": { "type": "monomer", - "id": "251", + "id": "56", "position": { - "x": 8.675000000000002, - "y": 1.7999999999999996 + "x": 3.0424999999999955, + "y": -1.5186111111111187 }, "alias": "1Nal", "templateId": "1Nal___3-(1-naphthyl)-alanine" @@ -1530,12 +1530,12 @@ ], "naturalAnalogShort": "A" }, - "monomer253": { + "monomer57": { "type": "monomer", - "id": "253", + "id": "57", "position": { - "x": 12.075000000000003, - "y": 1.7749999999999992 + "x": 3.9758333333333375, + "y": -1.521388888888897 }, "alias": "D-2Nal", "templateId": "D-2Nal___D-3-naphthylalanine" @@ -1833,12 +1833,12 @@ ], "naturalAnalogShort": "A" }, - "monomer258": { + "monomer58": { "type": "monomer", - "id": "258", + "id": "58", "position": { - "x": 8.575000000000001, - "y": 3.7749999999999995 + "x": 3.0313888888888836, + "y": -0.7658333333333399 }, "alias": "D-Cha", "templateId": "D-Cha___D-2-Amino-3-cyclohexyl-propionic acid" @@ -2069,12 +2069,12 @@ ], "naturalAnalogShort": "A" }, - "monomer260": { + "monomer59": { "type": "monomer", - "id": "260", + "id": "59", "position": { - "x": 11.700000000000003, - "y": 3.7749999999999995 + "x": 3.9119444444444476, + "y": -0.654722222222229 }, "alias": "D-1Nal", "templateId": "D-1Nal___D-3-(1-naphthyl)-alanine" @@ -2372,12 +2372,12 @@ ], "naturalAnalogShort": "A" }, - "monomer264": { + "monomer60": { "type": "monomer", - "id": "264", + "id": "60", "position": { - "x": 8.5, - "y": 6.125 + "x": 3.0230555555555494, + "y": 0.028611111111104946 }, "alias": "Cya", "templateId": "Cya___3-sulfoalanine" @@ -2573,12 +2573,12 @@ ], "naturalAnalogShort": "A" }, - "monomer267": { + "monomer61": { "type": "monomer", - "id": "267", + "id": "61", "position": { - "x": 11.525, - "y": 6.15 + "x": 3.8036111111111084, + "y": 0.16472222222221627 }, "alias": "D-Cit", "templateId": "D-Cit___D-Citrullin" @@ -2804,12 +2804,12 @@ ], "naturalAnalogShort": "X" }, - "monomer269": { + "monomer62": { "type": "monomer", - "id": "269", + "id": "62", "position": { - "x": 8.625, - "y": 8.35 + "x": 3.081388888888883, + "y": 0.8313888888888843 }, "alias": "aHyp", "templateId": "aHyp___L-allo-4-hydroxyproline" @@ -2999,12 +2999,12 @@ ], "naturalAnalogShort": "P" }, - "monomer272": { + "monomer63": { "type": "monomer", - "id": "272", + "id": "63", "position": { - "x": 11.450000000000001, - "y": 8.275 + "x": 3.661944444444443, + "y": 0.8674999999999957 }, "alias": "D-Nle", "templateId": "D-Nle___D-Norleucine" @@ -3185,12 +3185,12 @@ ], "naturalAnalogShort": "L" }, - "monomer283": { + "monomer64": { "type": "monomer", - "id": "283", + "id": "64", "position": { - "x": 8.375, - "y": 10.950000000000001 + "x": 3.009166666666662, + "y": 1.7202777777777754 }, "alias": "Mba", "templateId": "Mba___mercaptobutanoic acid (GMBA)" @@ -3341,52 +3341,52 @@ ], "naturalAnalogShort": "X" }, - "monomer284": { + "monomer65": { "type": "monomer", - "id": "284", + "id": "65", "position": { - "x": 11.225000000000001, - "y": 11.15 + "x": 3.8147222222222203, + "y": 1.7424999999999973 }, "alias": "Mba", "templateId": "Mba___mercaptobutanoic acid (GMBA)" }, - "monomer288": { + "monomer66": { "type": "monomer", - "id": "288", + "id": "66", "position": { - "x": 8.375, - "y": 13.15 + "x": 3.009166666666662, + "y": 2.431388888888887 }, "alias": "Mba", "templateId": "Mba___mercaptobutanoic acid (GMBA)" }, - "monomer289": { + "monomer67": { "type": "monomer", - "id": "289", + "id": "67", "position": { - "x": 11.200000000000001, - "y": 13.025 + "x": 3.8119444444444426, + "y": 2.395277777777776 }, "alias": "Mba", "templateId": "Mba___mercaptobutanoic acid (GMBA)" }, - "monomer293": { + "monomer68": { "type": "monomer", - "id": "293", + "id": "68", "position": { - "x": 8.450000000000001, - "y": 15.325000000000001 + "x": 2.95083333333333, + "y": 3.2508333333333326 }, "alias": "Mba", "templateId": "Mba___mercaptobutanoic acid (GMBA)" }, - "monomer294": { + "monomer69": { "type": "monomer", - "id": "294", + "id": "69", "position": { - "x": 11.125, - "y": 15.15 + "x": 3.7591666666666628, + "y": 3.25361111111111 }, "alias": "Mba", "templateId": "Mba___mercaptobutanoic acid (GMBA)" diff --git a/ketcher-autotests/tests/test-data/KET/three-monomers-connected-with-bonds.ket b/ketcher-autotests/tests/test-data/KET/three-monomers-connected-with-bonds.ket index 211c9125d9..16ba7baf75 100644 --- a/ketcher-autotests/tests/test-data/KET/three-monomers-connected-with-bonds.ket +++ b/ketcher-autotests/tests/test-data/KET/three-monomers-connected-with-bonds.ket @@ -2,35 +2,35 @@ "root": { "nodes": [ { - "$ref": "monomer76" + "$ref": "monomer0" }, { - "$ref": "monomer77" + "$ref": "monomer1" }, { - "$ref": "monomer78" + "$ref": "monomer2" } ], "connections": [ { "connectionType": "single", "endpoint1": { - "monomerId": "monomer76", + "monomerId": "monomer0", "attachmentPointId": "R2" }, "endpoint2": { - "monomerId": "monomer77", + "monomerId": "monomer1", "attachmentPointId": "R1" } }, { "connectionType": "single", "endpoint1": { - "monomerId": "monomer77", + "monomerId": "monomer1", "attachmentPointId": "R2" }, "endpoint2": { - "monomerId": "monomer78", + "monomerId": "monomer2", "attachmentPointId": "R1" } } @@ -47,12 +47,12 @@ } ] }, - "monomer76": { + "monomer0": { "type": "monomer", - "id": "76", + "id": "0", "position": { - "x": 10.325000000000001, - "y": -5.2250000000000005 + "x": 4.55333333333334, + "y": 3.6133333333333364 }, "alias": "A", "templateId": "A___Alanine" @@ -63,16 +63,16 @@ { "label": "N", "location": [ - -0.9805331061317907, - -0.3062945076130863, + -1.2549, + -0.392, 0 ] }, { "label": "C", "location": [ - -0.21253088283357008, - 0.20573302003705513, + -0.272, + 0.2633, 0 ], "stereoLabel": "abs" @@ -80,32 +80,32 @@ { "label": "C", "location": [ - -0.24245710640903237, - 1.3590256048251048, + -0.3103, + 1.7393, 0 ] }, { "label": "C", "location": [ - 0.8222288529623742, - -0.3062945076130863, + 1.0523, + -0.392, 0 ] }, { "label": "O", "location": [ - 0.8461385772811508, - -1.2284597573196283, + 1.0829, + -1.5722, 0 ] }, { "type": "rg-label", "location": [ - 1.5903092126145777, - 0.20573302003705513, + 2.0353, + 0.2633, 0 ], "$refs": [ @@ -115,8 +115,8 @@ { "type": "rg-label", "location": [ - -1.8232336838376928, - 0.07071340035455181, + -2.3334, + 0.0905, 0 ], "$refs": [ @@ -190,12 +190,12 @@ } ] }, - "monomer77": { + "monomer1": { "type": "monomer", - "id": "77", + "id": "1", "position": { - "x": 14.525, - "y": -5.125 + "x": 5.780000000000007, + "y": 3.553333333333336 }, "alias": "Edc", "templateId": "Edc___S-ethylthiocysteine" @@ -393,12 +393,12 @@ } ] }, - "monomer78": { + "monomer2": { "type": "monomer", - "id": "78", + "id": "2", "position": { - "x": 19.175, - "y": -5.300000000000001 + "x": 7.266666666666668, + "y": 3.7733333333333356 }, "alias": "A6OH", "templateId": "A6OH___6-amino-hexanol" diff --git a/ketcher-autotests/tests/test-data/KET/three-monomers-not-connected-with-bonds.ket b/ketcher-autotests/tests/test-data/KET/three-monomers-not-connected-with-bonds.ket index f938df4a84..1f692a70f9 100644 --- a/ketcher-autotests/tests/test-data/KET/three-monomers-not-connected-with-bonds.ket +++ b/ketcher-autotests/tests/test-data/KET/three-monomers-not-connected-with-bonds.ket @@ -2,13 +2,13 @@ "root": { "nodes": [ { - "$ref": "monomer36" + "$ref": "monomer0" }, { - "$ref": "monomer37" + "$ref": "monomer1" }, { - "$ref": "monomer38" + "$ref": "monomer2" } ], "connections": [], @@ -24,12 +24,12 @@ } ] }, - "monomer36": { + "monomer0": { "type": "monomer", - "id": "36", + "id": "0", "position": { - "x": 12.625, - "y": -9.575000000000001 + "x": 3.418333333333331, + "y": -3.248333333333332 }, "alias": "Bal", "templateId": "Bal___beta-Alanine" @@ -62,14 +62,11 @@ ] }, { - "type": "rg-label", + "label": "R#", "location": [ 2.2002, 0.9389, 0 - ], - "$refs": [ - "rg-2" ] }, { @@ -89,14 +86,11 @@ ] }, { - "type": "rg-label", + "label": "R#", "location": [ -2.7104, -0.6075, 0 - ], - "$refs": [ - "rg-1" ] } ], @@ -145,7 +139,6 @@ } ], "classHELM": "PEPTIDE", - "naturalAnalogShort": "A", "id": "Bal___beta-Alanine", "alias": "Bal", "attachmentPoints": [ @@ -163,14 +156,15 @@ }, "type": "right" } - ] + ], + "naturalAnalogShort": "A" }, - "monomer37": { + "monomer1": { "type": "monomer", - "id": "37", + "id": "1", "position": { - "x": 17.025000000000002, - "y": -9.675 + "x": 4.838333333333333, + "y": -3.2683333333333326 }, "alias": "Edc", "templateId": "Edc___S-ethylthiocysteine" @@ -228,25 +222,19 @@ ] }, { - "type": "rg-label", + "label": "R#", "location": [ 2.9317, -1.4168, 0 - ], - "$refs": [ - "rg-2" ] }, { - "type": "rg-label", + "label": "R#", "location": [ -1.7467, -1.4179, 0 - ], - "$refs": [ - "rg-1" ] }, { @@ -348,7 +336,6 @@ } ], "classHELM": "PEPTIDE", - "naturalAnalogShort": "C", "id": "Edc___S-ethylthiocysteine", "alias": "Edc", "attachmentPoints": [ @@ -366,14 +353,15 @@ }, "type": "right" } - ] + ], + "naturalAnalogShort": "C" }, - "monomer38": { + "monomer2": { "type": "monomer", - "id": "38", + "id": "2", "position": { - "x": 20.775000000000002, - "y": -9.725000000000001 + "x": 6.195000000000003, + "y": -3.2983333333333307 }, "alias": "Test-6-Ch", "templateId": "Test-6-Ch___Test-6-AP-Chem" @@ -446,25 +434,19 @@ ] }, { - "type": "rg-label", + "label": "R#", "location": [ 12.771843848116424, -6.07362085187052, 0 - ], - "$refs": [ - "rg-2" ] }, { - "type": "rg-label", + "label": "R#", "location": [ 5.0282172628054775, -7.026424123021441, 0 - ], - "$refs": [ - "rg-1" ] }, { @@ -516,36 +498,27 @@ ] }, { - "type": "rg-label", + "label": "R#", "location": [ 4.8679167124638605, -1.6373056211748553, 0 - ], - "$refs": [ - "rg-3" ] }, { - "type": "rg-label", + "label": "R#", "location": [ 10.276735281944443, -7.698926431847001, 0 - ], - "$refs": [ - "rg-5" ] }, { - "type": "rg-label", + "label": "R#", "location": [ 7.575026006473786, -2.8621098261555935, 0 - ], - "$refs": [ - "rg-4" ] }, { @@ -565,14 +538,11 @@ ] }, { - "type": "rg-label", + "label": "R#", "location": [ 7.969727361556981, -9.713933349740689, 0 - ], - "$refs": [ - "rg-6" ] } ], @@ -726,7 +696,6 @@ } ], "classHELM": "CHEM", - "naturalAnalogShort": ".", "id": "Test-6-Ch___Test-6-AP-Chem", "alias": "Test-6-Ch", "attachmentPoints": [ diff --git a/ketcher-autotests/tests/test-data/KET/two-benzene-and-arrow.ket b/ketcher-autotests/tests/test-data/KET/two-benzene-and-arrow.ket index 8de07a157b..23a91e35ab 100644 --- a/ketcher-autotests/tests/test-data/KET/two-benzene-and-arrow.ket +++ b/ketcher-autotests/tests/test-data/KET/two-benzene-and-arrow.ket @@ -13,13 +13,13 @@ "mode": "open-angle", "pos": [ { - "x": 15.3, - "y": -10.175000000000002, + "x": 3.3000000000000114, + "y": -2.087499999999995, "z": 0 }, { - "x": 18.625093983634084, - "y": -10.175000000000002, + "x": 4.157412531982127, + "y": -2.087499999999995, "z": 0 } ] @@ -35,48 +35,48 @@ { "label": "C", "location": [ - 13.209849152128573, - -9.700074417174616, + 1.209849152128605, + -1.6125744171746126, 0 ] }, { "label": "C", "location": [ - 14.94015084787144, - -9.699589229177212, + 2.940150847871454, + -1.6120892291772089, 0 ] }, { "label": "C", "location": [ - 14.076637509491245, - -9.199966888850195, + 2.0766375094912686, + -1.1124668888501974, 0 ] }, { "label": "C", "location": [ - 14.94015084787144, - -10.700532067822158, + 2.940150847871454, + -2.6130320678221457, 0 ] }, { "label": "C", "location": [ - 13.209849152128573, - -10.705020056798148, + 1.209849152128605, + -2.617520056798136, 0 ] }, { "label": "C", "location": [ - 14.078820855479565, - -11.200033111149821, + 2.078820855479588, + -3.112533111149804, 0 ] } @@ -124,12 +124,7 @@ 2 ] } - ], - "stereoFlagPosition": { - "x": 14.94015084787144, - "y": 8.199966888850195, - "z": 0 - } + ] }, "mol1": { "type": "molecule", @@ -137,48 +132,48 @@ { "label": "C", "location": [ - 19.159849152128505, - -9.625074417174615, + 4.534849152128476, + -1.6625744171746133, 0 ] }, { "label": "C", "location": [ - 20.890150847871443, - -9.62458922917721, + 6.265150847871396, + -1.6620892291772096, 0 ] }, { "label": "C", "location": [ - 20.02663750949125, - -9.124966888850194, + 5.401637509491213, + -1.162466888850198, 0 ] }, { "label": "C", "location": [ - 20.890150847871443, - -10.625532067822155, + 6.265150847871396, + -2.663032067822143, 0 ] }, { "label": "C", "location": [ - 19.159849152128505, - -10.630020056798145, + 4.534849152128476, + -2.667520056798133, 0 ] }, { "label": "C", "location": [ - 20.028820855479562, - -11.125033111149818, + 5.403820855479527, + -3.162533111149801, 0 ] } @@ -228,8 +223,8 @@ } ], "stereoFlagPosition": { - "x": 20.890150847871443, - "y": 8.124966888850194, + "x": 6.265150847871396, + "y": 0.1624668888501981, "z": 0 } } diff --git a/ketcher-autotests/tests/test-data/KET/two-benzene-and-plus.ket b/ketcher-autotests/tests/test-data/KET/two-benzene-and-plus.ket index b77622512b..92722c392f 100644 --- a/ketcher-autotests/tests/test-data/KET/two-benzene-and-plus.ket +++ b/ketcher-autotests/tests/test-data/KET/two-benzene-and-plus.ket @@ -10,8 +10,8 @@ { "type": "plus", "location": [ - 15.200000000000001, - -7.775, + 18.675, + -11.274999999999999, 0 ], "prop": {} @@ -26,48 +26,48 @@ { "label": "C", "location": [ - 12.034849152128567, - -7.275074417174608, + 16.184849152128564, + -10.825074417174608, 0 ] }, { "label": "C", "location": [ - 13.765150847871434, - -7.274589229177203, + 17.91515084787143, + -10.824589229177203, 0 ] }, { "label": "C", "location": [ - 12.90163750949124, - -6.774966888850187, + 17.051637509491236, + -10.324966888850188, 0 ] }, { "label": "C", "location": [ - 13.765150847871434, - -8.275532067822148, + 17.91515084787143, + -11.825532067822149, 0 ] }, { "label": "C", "location": [ - 12.034849152128567, - -8.280020056798138, + 16.184849152128564, + -11.830020056798137, 0 ] }, { "label": "C", "location": [ - 12.903820855479559, - -8.775033111149813, + 17.053820855479557, + -12.325033111149814, 0 ] } @@ -123,48 +123,48 @@ { "label": "C", "location": [ - 16.63484915212857, - -7.27507441717461, + 19.28484915212857, + -10.80007441717461, 0 ] }, { "label": "C", "location": [ - 18.365150847871437, - -7.274589229177205, + 21.015150847871436, + -10.799589229177206, 0 ] }, { "label": "C", "location": [ - 17.501637509491243, - -6.774966888850189, + 20.15163750949124, + -10.29996688885019, 0 ] }, { "label": "C", "location": [ - 18.365150847871437, - -8.27553206782215, + 21.015150847871436, + -11.80053206782215, 0 ] }, { "label": "C", "location": [ - 16.63484915212857, - -8.28002005679814, + 19.28484915212857, + -11.805020056798142, 0 ] }, { "label": "C", "location": [ - 17.50382085547956, - -8.775033111149815, + 20.15382085547956, + -12.300033111149816, 0 ] } @@ -212,6 +212,11 @@ 2 ] } - ] + ], + "stereoFlagPosition": { + "x": 21.015150847871436, + "y": 9.29996688885019, + "z": 0 + } } } \ No newline at end of file diff --git a/ketcher-autotests/tests/test-data/KET/two-benzene-charged.ket b/ketcher-autotests/tests/test-data/KET/two-benzene-charged.ket index 70156276d3..463f47dce1 100644 --- a/ketcher-autotests/tests/test-data/KET/two-benzene-charged.ket +++ b/ketcher-autotests/tests/test-data/KET/two-benzene-charged.ket @@ -17,8 +17,8 @@ { "label": "C", "location": [ - 8.909849152128567, - -8.550074417174608, + 1.009849152128564, + -0.20007441717460583, 0 ], "charge": -1 @@ -26,40 +26,40 @@ { "label": "C", "location": [ - 10.640150847871434, - -8.549589229177204, + 2.7401508478714343, + -0.1995892291772039, 0 ] }, { "label": "C", "location": [ - 9.77663750949124, - -8.049966888850188, + 1.8766375094912364, + 0.3000331111498138, 0 ] }, { "label": "C", "location": [ - 10.640150847871434, - -9.550532067822148, + 2.7401508478714343, + -1.200532067822146, 0 ] }, { "label": "C", "location": [ - 8.909849152128567, - -9.555020056798138, + 1.009849152128564, + -1.2050200567981344, 0 ] }, { "label": "C", "location": [ - 9.778820855479559, - -10.050033111149812, + 1.8788208554795558, + -1.700033111149808, 0 ], "charge": 1 @@ -108,7 +108,12 @@ 2 ] } - ] + ], + "stereoFlagPosition": { + "x": 2.7401508478714343, + "y": -1.3000331111498147, + "z": 0 + } }, "mol1": { "type": "molecule", @@ -116,16 +121,16 @@ { "label": "C", "location": [ - 12.334849152128571, - -8.57507441717461, + 3.1598491521285643, + -0.12507441717460654, 0 ] }, { "label": "C", "location": [ - 14.065150847871438, - -8.574589229177205, + 4.890150847871436, + -0.12458922917720461, 0 ], "charge": -1 @@ -133,32 +138,32 @@ { "label": "C", "location": [ - 13.201637509491244, - -8.07496688885019, + 4.026637509491245, + 0.3750331111498131, 0 ] }, { "label": "C", "location": [ - 14.065150847871438, - -9.57553206782215, + 4.890150847871436, + -1.1255320678221503, 0 ] }, { "label": "C", "location": [ - 12.334849152128571, - -9.58002005679814, + 3.1598491521285643, + -1.1300200567981387, 0 ] }, { "label": "C", "location": [ - 13.203820855479563, - -10.075033111149816, + 4.028820855479559, + -1.6250331111498122, 0 ], "charge": 1 @@ -207,6 +212,11 @@ 2 ] } - ] + ], + "stereoFlagPosition": { + "x": 4.890150847871436, + "y": -1.375033111149814, + "z": 0 + } } } \ No newline at end of file diff --git a/ketcher-autotests/tests/test-data/Molfiles-V3000/monomers-and-chem.mol b/ketcher-autotests/tests/test-data/Molfiles-V3000/monomers-and-chem.mol index ceed4b58c8..5b5d892f81 100644 --- a/ketcher-autotests/tests/test-data/Molfiles-V3000/monomers-and-chem.mol +++ b/ketcher-autotests/tests/test-data/Molfiles-V3000/monomers-and-chem.mol @@ -1,13 +1,13 @@ - -INDIGO-12202313442D + -INDIGO-12282311082D 0 0 0 0 0 0 0 0 0 0 0 V3000 M V30 BEGIN CTAB M V30 COUNTS 3 2 0 0 0 M V30 BEGIN ATOM -M V30 1 A 9.225 -6.2875 0.0 0 CLASS=AA ATTCHORD=(4 2 Br 3 Al) -M V30 2 Bal 14.575 -6.2125 0.0 0 CLASS=AA ATTCHORD=(2 1 Al) -M V30 3 Az 9.325 -10.4375 0.0 0 CLASS=CHEM ATTCHORD=(2 1 Al) +M V30 1 A 2.495 -1.66917 0.0 0 CLASS=AA ATTCHORD=(4 2 Br 3 Al) +M V30 2 Bal 3.85167 -1.65417 0.0 0 CLASS=AA ATTCHORD=(2 1 Al) +M V30 3 Az 2.52833 -2.78583 0.0 0 CLASS=CHEM ATTCHORD=(2 1 Al) M V30 END ATOM M V30 BEGIN BOND M V30 1 1 1 2 diff --git a/ketcher-autotests/tests/test-data/glutamine.mol b/ketcher-autotests/tests/test-data/glutamine.mol deleted file mode 100644 index b1652768ee..0000000000 --- a/ketcher-autotests/tests/test-data/glutamine.mol +++ /dev/null @@ -1,27 +0,0 @@ - - Ketcher 5 42110 72D 1 1.00000 0.00000 0 - - 11 11 0 0 0 999 V2000 - 13.1160 -5.6739 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 - 13.9834 -6.1771 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - 13.9822 -7.1742 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - 13.1169 -7.6738 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - 13.0111 -8.6713 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - 12.0350 -8.8753 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 - 11.5354 -8.0099 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - 12.2000 -7.2667 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 - 14.8487 -5.6775 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - 14.8467 -4.6747 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 - 15.7146 -6.1762 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 - 2 1 1 1 0 0 - 2 3 1 0 0 0 - 2 9 1 0 1 0 - 3 4 1 0 0 0 - 4 5 2 0 0 0 - 4 8 1 0 0 0 - 5 6 1 0 0 0 - 6 7 1 0 0 0 - 7 8 2 0 0 0 - 9 10 2 0 0 0 - 9 11 1 0 0 0 -M END diff --git a/ketcher-autotests/tests/utils/canvas/atoms/getAtomsCoordinatesByAttributes/getAtomsCoordinatesByAttributes.ts b/ketcher-autotests/tests/utils/canvas/atoms/getAtomsCoordinatesByAttributes/getAtomsCoordinatesByAttributes.ts index 166d057d28..c18c39b919 100644 --- a/ketcher-autotests/tests/utils/canvas/atoms/getAtomsCoordinatesByAttributes/getAtomsCoordinatesByAttributes.ts +++ b/ketcher-autotests/tests/utils/canvas/atoms/getAtomsCoordinatesByAttributes/getAtomsCoordinatesByAttributes.ts @@ -29,7 +29,7 @@ export async function getAtomsCoordinatesByAttributes( return { // eslint-disable-next-line no-unsafe-optional-chaining atoms: [...window.ketcher?.editor?.struct()?.atoms?.values()], - scale: window.ketcher?.editor?.options()?.scale, + scale: window.ketcher?.editor?.options()?.microModeScale, offset: window.ketcher?.editor?.options()?.offset, }; }); diff --git a/ketcher-autotests/tests/utils/canvas/bonds/getBondsCoordinatesByAttributes/getBondsCoordinatesByAttributes.ts b/ketcher-autotests/tests/utils/canvas/bonds/getBondsCoordinatesByAttributes/getBondsCoordinatesByAttributes.ts index 5509d96aba..3090402ed6 100644 --- a/ketcher-autotests/tests/utils/canvas/bonds/getBondsCoordinatesByAttributes/getBondsCoordinatesByAttributes.ts +++ b/ketcher-autotests/tests/utils/canvas/bonds/getBondsCoordinatesByAttributes/getBondsCoordinatesByAttributes.ts @@ -29,7 +29,7 @@ export async function getBondsCoordinatesByAttributes( return { // eslint-disable-next-line no-unsafe-optional-chaining bonds: [...window.ketcher?.editor?.struct()?.bonds?.values()], - scale: window.ketcher?.editor?.options()?.scale, + scale: window.ketcher?.editor?.options()?.microModeScale, offset: window.ketcher?.editor?.options()?.offset, }; }); diff --git a/ketcher-autotests/tests/utils/canvas/helpers.ts b/ketcher-autotests/tests/utils/canvas/helpers.ts index b223b794fd..c276cc4eda 100644 --- a/ketcher-autotests/tests/utils/canvas/helpers.ts +++ b/ketcher-autotests/tests/utils/canvas/helpers.ts @@ -124,7 +124,7 @@ export async function getCoordinatesTopAtomOfBenzeneRing(page: Page) { const onlyCarbons = allAtoms.filter((a) => a.label === 'C'); return { carbonAtoms: onlyCarbons, - scale: window.ketcher.editor.options().scale, + scale: window.ketcher.editor.options().microModeScale, offset: window.ketcher?.editor?.options()?.offset, }; }); @@ -169,7 +169,7 @@ export async function getCoordinatesOfTopMostCarbon(page: Page) { const onlyCarbons = allAtoms.filter((a) => a.label === 'C'); return { carbonAtoms: onlyCarbons, - scale: window.ketcher.editor.options().scale, + scale: window.ketcher.editor.options().microModeScale, offset: window.ketcher?.editor?.options()?.offset, }; }); diff --git a/packages/ketcher-core/__tests__/application/editor/shared/coordinates.test.ts b/packages/ketcher-core/__tests__/application/editor/shared/coordinates.test.ts index 8dd9eb1969..cb73ccaedf 100644 --- a/packages/ketcher-core/__tests__/application/editor/shared/coordinates.test.ts +++ b/packages/ketcher-core/__tests__/application/editor/shared/coordinates.test.ts @@ -11,25 +11,25 @@ describe('Coordinates', () => { it('should convert page coordinates to model coordinates', () => { const converted = Coordinates.canvasToModel(position); - const coordinates = new Vec2(2.5, 2.5, 0); + const coordinates = new Vec2(0.6666666666666667, 0.6666666666666667, 0); expect(converted).toEqual(coordinates); }); it('should convert view coordinates to model coordinates', () => { const converted = Coordinates.viewToModel(position); - const coordinates = new Vec2(1.25, 1.25, 0); + const coordinates = new Vec2(0.33333333333333337, 0.33333333333333337, 0); expect(converted).toEqual(coordinates); }); it('should convert modal coordinates to view coordinates', () => { const coordinates = Coordinates.modelToView(position); - const converted = new Vec2(4840, 4840, 0); + const converted = new Vec2(18040, 18040, 0); expect(coordinates).toEqual(converted); }); it('should convert modal coordinates to page coordinates', () => { const coordinates = Coordinates.modelToCanvas(position); - const converted = new Vec2(4000, 4000, 0); + const converted = new Vec2(15000, 15000, 0); expect(coordinates).toEqual(converted); }); diff --git a/packages/ketcher-core/__tests__/application/render/coordinateTransformation.test.ts b/packages/ketcher-core/__tests__/application/render/coordinateTransformation.test.ts index 43e2592346..3b5eb477ca 100644 --- a/packages/ketcher-core/__tests__/application/render/coordinateTransformation.test.ts +++ b/packages/ketcher-core/__tests__/application/render/coordinateTransformation.test.ts @@ -13,7 +13,7 @@ describe('CoordinateTransformation', () => { }, options: { zoom: 0.5, - scale: 40, + microModeScale: 40, }, clientArea: { getBoundingClientRect: () => ({ @@ -24,7 +24,7 @@ describe('CoordinateTransformation', () => { } as Render; const protoPoint = new Vec2(10, 10); - const pointInCanvas = protoPoint.scaled(render.options.scale); + const pointInCanvas = protoPoint.scaled(render.options.microModeScale); const pointInViewBox = pointInCanvas .sub(new Vec2(render.viewBox.minX, render.viewBox.minY)) .scaled(render.options.zoom); diff --git a/packages/ketcher-core/__tests__/application/render/renderers/__snapshots__/PolymerBondRenderer.test.ts.snap b/packages/ketcher-core/__tests__/application/render/renderers/__snapshots__/PolymerBondRenderer.test.ts.snap index 1292941347..b9ac49e258 100644 --- a/packages/ketcher-core/__tests__/application/render/renderers/__snapshots__/PolymerBondRenderer.test.ts.snap +++ b/packages/ketcher-core/__tests__/application/render/renderers/__snapshots__/PolymerBondRenderer.test.ts.snap @@ -26,18 +26,18 @@ exports[`Polymer Bond Renderer should render bond 1`] = ` pointer-events="stroke" stroke="#333333" stroke-width="2" - x1="400" - x2="3600" - y1="400" - y2="4000" + x1="1500" + x2="13500" + y1="1500" + y2="15000" /> diff --git a/packages/ketcher-core/__tests__/application/render/restruct/resgroup.test.ts b/packages/ketcher-core/__tests__/application/render/restruct/resgroup.test.ts index 2c5b515127..f9e79ffe23 100644 --- a/packages/ketcher-core/__tests__/application/render/restruct/resgroup.test.ts +++ b/packages/ketcher-core/__tests__/application/render/restruct/resgroup.test.ts @@ -100,7 +100,11 @@ describe('resgroup should draw brackets with attachment points correctly', () => z: 0, }); restruct.rgroupAttachmentPoints.set(0, reRGroupAttachmentPoint); - const option = { scale: 20, width: 100, height: 100 } as RenderOptions; + const option = { + microModeScale: 20, + width: 100, + height: 100, + } as RenderOptions; const render = new Render(document as unknown as HTMLElement, option); render.ctab = restruct as unknown as ReStruct; restruct.render = render as any; diff --git a/packages/ketcher-core/__tests__/application/render/restruct/resimpleObject.test.ts b/packages/ketcher-core/__tests__/application/render/restruct/resimpleObject.test.ts index 1382b37f62..1bc9f4d242 100644 --- a/packages/ketcher-core/__tests__/application/render/restruct/resimpleObject.test.ts +++ b/packages/ketcher-core/__tests__/application/render/restruct/resimpleObject.test.ts @@ -51,7 +51,11 @@ const line = { it('should get hover path and style for simple objects correctly', () => { [ellipse, rectangle, line].forEach((simpleObject) => { const reSimpleObject = new ReSimpleObject(simpleObject); - const option = { scale: 20, width: 100, height: 100 } as RenderOptions; + const option = { + microModeScale: 20, + width: 100, + height: 100, + } as RenderOptions; const render = new Render(document as unknown as HTMLElement, option); const paths = reSimpleObject.hoverPath(render); expect( @@ -63,7 +67,11 @@ it('should get hover path and style for simple objects correctly', () => { it('should get selection plate for simple objects correctly with selection points in a separated set', () => { const reSimpleObject = new ReSimpleObject(ellipse); const initialPathLength = reSimpleObject.visel.paths.length; - const option = { scale: 20, width: 100, height: 100 } as RenderOptions; + const option = { + microModeScale: 20, + width: 100, + height: 100, + } as RenderOptions; const render = new Render(document as unknown as HTMLElement, option); const restruct = new ReStruct(new Struct(), render); reSimpleObject.makeSelectionPlate(restruct, render.paper, render.options); diff --git a/packages/ketcher-core/__tests__/application/render/restruct/restruct.test.ts b/packages/ketcher-core/__tests__/application/render/restruct/restruct.test.ts index 9b8e970e9f..36ca5cc0ec 100644 --- a/packages/ketcher-core/__tests__/application/render/restruct/restruct.test.ts +++ b/packages/ketcher-core/__tests__/application/render/restruct/restruct.test.ts @@ -20,7 +20,11 @@ describe('show selection', () => { }; const reSimpleObject = new ReSimpleObject(ellipse); reSimpleObject.togglePoints = jest.fn(); - const option = { scale: 20, width: 100, height: 100 } as RenderOptions; + const option = { + microModeScale: 20, + width: 100, + height: 100, + } as RenderOptions; const render = new Render(document as unknown as HTMLElement, option); const restruct = new ReStruct(new Struct(), render); it('should show selection simple objects correctly when selected', () => { diff --git a/packages/ketcher-core/src/application/editor/editorSettings.ts b/packages/ketcher-core/src/application/editor/editorSettings.ts index f1b2ec60c3..fcb5def826 100644 --- a/packages/ketcher-core/src/application/editor/editorSettings.ts +++ b/packages/ketcher-core/src/application/editor/editorSettings.ts @@ -1,5 +1,6 @@ const editorSettings = { - scale: 40, // Angstroms To Pixels Factor + microModeScale: 40, // Angstroms To Pixels Factor + macroModeScale: 150, // Angstroms To Pixels Factor }; export function provideEditorSettings() { diff --git a/packages/ketcher-core/src/application/editor/operations/rxn/RxnArrowRotate.ts b/packages/ketcher-core/src/application/editor/operations/rxn/RxnArrowRotate.ts index 58423d5a22..baa76e5bf4 100644 --- a/packages/ketcher-core/src/application/editor/operations/rxn/RxnArrowRotate.ts +++ b/packages/ketcher-core/src/application/editor/operations/rxn/RxnArrowRotate.ts @@ -34,7 +34,7 @@ export class RxnArrowRotate extends Base { const options = reStruct.render.options; const drawingCenter = this.data.center - .scaled(options.scale) + .scaled(options.microModeScale) .add(options.offset); reStruct.rxnArrows.get(arrowId)?.visel.rotate(degree, drawingCenter); diff --git a/packages/ketcher-core/src/application/editor/shared/closest.js b/packages/ketcher-core/src/application/editor/shared/closest.js index c39bb19698..49de5251d9 100644 --- a/packages/ketcher-core/src/application/editor/shared/closest.js +++ b/packages/ketcher-core/src/application/editor/shared/closest.js @@ -98,7 +98,10 @@ function findClosestSimpleObject(restruct, pos) { let ret = null; restruct.simpleObjects.forEach((simpleObject, id) => { - const dist = simpleObject.calcDistance(pos, restruct.render.options.scale); + const dist = simpleObject.calcDistance( + pos, + restruct.render.options.microModeScale, + ); if (dist.minDist < 0.3 && (!ret || dist.minDist < minDist)) { minDist = dist.minDist; @@ -323,7 +326,10 @@ function findClosestRxnArrow(restruct, pos) { let ret = null; restruct.rxnArrows.forEach((rxnArrow, id) => { - const dist = rxnArrow.calcDistance(pos, restruct.render.options.scale); + const dist = rxnArrow.calcDistance( + pos, + restruct.render.options.microModeScale, + ); if (dist.minDist < 0.3 && (!ret || dist.minDist < minDist)) { minDist = dist.minDist; diff --git a/packages/ketcher-core/src/application/editor/shared/coordinates.ts b/packages/ketcher-core/src/application/editor/shared/coordinates.ts index 03013d312d..a85e920f6a 100644 --- a/packages/ketcher-core/src/application/editor/shared/coordinates.ts +++ b/packages/ketcher-core/src/application/editor/shared/coordinates.ts @@ -9,23 +9,25 @@ import ZoomTool from '../tools/Zoom'; export class Coordinates { static canvasToModel(position: Vec2) { const settings = provideEditorSettings(); - return position.scaled(1 / settings.scale); + return position.scaled(1 / settings.macroModeScale); } static viewToModel(position: Vec2) { const settings = provideEditorSettings(); const pos = ZoomTool.instance.invertZoom(position); - return pos.scaled(1 / settings.scale); + return pos.scaled(1 / settings.macroModeScale); } static modelToView(position: Vec2) { const settings = provideEditorSettings(); - return ZoomTool.instance.scaleCoordinates(position.scaled(settings.scale)); + return ZoomTool.instance.scaleCoordinates( + position.scaled(settings.macroModeScale), + ); } static modelToCanvas(position: Vec2) { const settings = provideEditorSettings(); - return position.scaled(settings.scale); + return position.scaled(settings.macroModeScale); } // convert the original coordinates to transformed coordinates after the d3 transformation diff --git a/packages/ketcher-core/src/application/render/draw.ts b/packages/ketcher-core/src/application/render/draw.ts index 508cc727cd..9a37a25bb7 100644 --- a/packages/ketcher-core/src/application/render/draw.ts +++ b/packages/ketcher-core/src/application/render/draw.ts @@ -957,7 +957,7 @@ function arrowUnbalancedEquilibriumFilledHalfTriangle( } function plus(paper: RaphaelPaper, point: Vec2, options: RenderOptions) { - const s = options.scale / 5; + const s = options.microModeScale / 5; return paper .path( 'M{0},{4}L{0},{5}M{2},{1}L{3},{1}', @@ -1543,7 +1543,7 @@ function rgroupAttachmentPoint( getSvgCurveShapeAttachmentPoint( attachmentPointEnd, directionVector, - options.scale, + options.microModeScale, ), ); diff --git a/packages/ketcher-core/src/application/render/options.ts b/packages/ketcher-core/src/application/render/options.ts index d7ff6d58cb..e40f71c0c8 100644 --- a/packages/ketcher-core/src/application/render/options.ts +++ b/packages/ketcher-core/src/application/render/options.ts @@ -20,13 +20,14 @@ import { ShowHydrogenLabels } from './restruct/reatom'; import { RenderOptions } from './render.types'; function defaultOptions(options: RenderOptions): RenderOptions { - const scaleFactor = options.scale || 100; + const scaleFactorMicro = options.microModeScale || 100; + const scaleFactorMacro = options.macroModeScale || 200; if (options.rotationStep) { utils.setFracAngle(options.rotationStep); } - const labelFontSize = Math.ceil(1.9 * (scaleFactor / 6)); + const labelFontSize = Math.ceil(1.9 * (scaleFactorMicro / 6)); const subFontSize = Math.ceil(0.5 * labelFontSize); const defaultOptions: Partial = { @@ -55,13 +56,14 @@ function defaultOptions(options: RenderOptions): RenderOptions { // bonds aromaticCircle: true, - scale: scaleFactor, + microModeScale: scaleFactorMicro, + macroModeScale: scaleFactorMacro, zoom: 1.0, offset: new Vec2(), - lineWidth: scaleFactor / 20, - bondSpace: options.doubleBondWidth || scaleFactor / 7, - stereoBond: options.stereoBondWidth || scaleFactor / 7, + lineWidth: scaleFactorMicro / 20, + bondSpace: options.doubleBondWidth || scaleFactorMicro / 7, + stereoBond: options.stereoBondWidth || scaleFactorMicro / 7, subFontSize, font: '30px Arial', fontsz: labelFontSize, @@ -74,7 +76,7 @@ function defaultOptions(options: RenderOptions): RenderOptions { /* styles */ lineattr: { stroke: '#000', - 'stroke-width': options.bondThickness || scaleFactor / 20, + 'stroke-width': options.bondThickness || scaleFactorMicro / 20, 'stroke-linecap': 'round', 'stroke-linejoin': 'round', }, @@ -95,11 +97,11 @@ function defaultOptions(options: RenderOptions): RenderOptions { hoverStyle: { stroke: '#0097A8', fill: '#CCFFDD', - 'stroke-width': (0.6 * scaleFactor) / 20, + 'stroke-width': (0.6 * scaleFactorMicro) / 20, }, sgroupBracketStyle: { stroke: 'darkgray', - 'stroke-width': (0.5 * scaleFactor) / 20, + 'stroke-width': (0.5 * scaleFactorMicro) / 20, }, lassoStyle: { stroke: 'gray', @@ -107,7 +109,7 @@ function defaultOptions(options: RenderOptions): RenderOptions { }, selectionStyleSimpleObject: { stroke: '#57FF8F', - 'stroke-width': scaleFactor / 4, + 'stroke-width': scaleFactorMicro / 4, 'stroke-linecap': 'round', }, movingStyle: { diff --git a/packages/ketcher-core/src/application/render/render.types.ts b/packages/ketcher-core/src/application/render/render.types.ts index a7c1fa4f47..d5570d66cf 100644 --- a/packages/ketcher-core/src/application/render/render.types.ts +++ b/packages/ketcher-core/src/application/render/render.types.ts @@ -36,7 +36,8 @@ export type RenderOptions = { showHydrogenLabels: string; showValence: boolean; aromaticCircle: boolean; - scale: number; + microModeScale: number; + macroModeScale: number; zoom: number; offset: Vec2; lineWidth: number; diff --git a/packages/ketcher-core/src/application/render/renderers/PolymerBondRenderer.ts b/packages/ketcher-core/src/application/render/renderers/PolymerBondRenderer.ts index 0534f84a88..eab72cbb90 100644 --- a/packages/ketcher-core/src/application/render/renderers/PolymerBondRenderer.ts +++ b/packages/ketcher-core/src/application/render/renderers/PolymerBondRenderer.ts @@ -4,12 +4,12 @@ import { DrawingEntity } from 'domain/entities/DrawingEntity'; import assert from 'assert'; import { D3SvgElementSelection } from 'application/render/types'; import { editorEvents } from 'application/editor/editorEvents'; -import { Scale } from 'domain/helpers'; import { Vec2 } from 'domain/entities'; import { Peptide } from 'domain/entities/Peptide'; import { Chem } from 'domain/entities/Chem'; import { BaseMonomer } from 'domain/entities/BaseMonomer'; import { SnakeMode } from 'application/editor/modes/internal'; +import { Coordinates } from 'application/editor/shared/coordinates'; const LINE_FROM_MONOMER_LENGTH = 15; const VERTICAL_LINE_LENGTH = 42; @@ -89,14 +89,12 @@ export class PolymerBondRenderer extends BaseRenderer { private get scaledPosition() { // we need to convert monomer coordinates(stored in angstroms) to pixels. // it needs to be done in view layer of application (like renderers) - const startPositionInPixels = Scale.modelToCanvas( + const startPositionInPixels = Coordinates.modelToCanvas( this.polymerBond.startPosition, - this.editorSettings, ); - const endPositionInPixels = Scale.modelToCanvas( + const endPositionInPixels = Coordinates.modelToCanvas( this.polymerBond.endPosition, - this.editorSettings, ); return { diff --git a/packages/ketcher-core/src/application/render/restruct/rebond.ts b/packages/ketcher-core/src/application/render/restruct/rebond.ts index d08db643c8..107e3c2887 100644 --- a/packages/ketcher-core/src/application/render/restruct/rebond.ts +++ b/packages/ketcher-core/src/application/render/restruct/rebond.ts @@ -1105,11 +1105,11 @@ function getBondAromaticPath( if (bond.b.type === Bond.PATTERN.TYPE.SINGLE_OR_AROMATIC) { mask = bondShift > 0 ? 1 : 2; - dash = dashdotPattern.map((v) => v * options.scale); + dash = dashdotPattern.map((v) => v * options.microModeScale); } if (bond.b.type === Bond.PATTERN.TYPE.DOUBLE_OR_AROMATIC) { mask = 3; - dash = dashdotPattern.map((v) => v * options.scale); + dash = dashdotPattern.map((v) => v * options.microModeScale); } const paths = getAromaticBondPaths( hb1, diff --git a/packages/ketcher-core/src/application/render/restruct/rergroupAttachmentPoint.ts b/packages/ketcher-core/src/application/render/restruct/rergroupAttachmentPoint.ts index d49bffaf05..8dea9312c2 100644 --- a/packages/ketcher-core/src/application/render/restruct/rergroupAttachmentPoint.ts +++ b/packages/ketcher-core/src/application/render/restruct/rergroupAttachmentPoint.ts @@ -273,7 +273,7 @@ function showAttachmentPointShape( ); const attachmentPointEnd = atomPositionVector.addScaled( directionVector, - options.scale * 0.85, + options.microModeScale * 0.85, ); const resultShape = draw.rgroupAttachmentPoint( @@ -350,7 +350,7 @@ function showAttachmentPointLabel( const labelPosition = getLabelPositionForAttachmentPoint( atomPositionVector, directionVector, - options.scale, + options.microModeScale, ); const labelPath = draw.rgroupAttachmentPointLabel( paper, diff --git a/packages/ketcher-core/src/application/render/restruct/rerxnarrow.ts b/packages/ketcher-core/src/application/render/restruct/rerxnarrow.ts index 6cc4750292..841f5f4372 100644 --- a/packages/ketcher-core/src/application/render/restruct/rerxnarrow.ts +++ b/packages/ketcher-core/src/application/render/restruct/rerxnarrow.ts @@ -126,7 +126,7 @@ class ReRxnArrow extends ReObject { } makeAdditionalInfo(restruct: ReStruct) { - const scaleFactor = restruct.render.options.scale; + const scaleFactor = restruct.render.options.microModeScale; const refPoints = this.getReferencePoints(); const selectionSet = restruct.render.paper.set(); @@ -160,7 +160,7 @@ class ReRxnArrow extends ReObject { const item = this.item; const height = RxnArrow.isElliptical(item) && item.height - ? item.height * options.scale + ? item.height * options.microModeScale : 0; const pos = item.pos.map((p) => { return Scale.modelToCanvas(p, options) || new Vec2(); diff --git a/packages/ketcher-core/src/application/render/restruct/rerxnplus.js b/packages/ketcher-core/src/application/render/restruct/rerxnplus.js index a324ab333e..9be7dc8c65 100644 --- a/packages/ketcher-core/src/application/render/restruct/rerxnplus.js +++ b/packages/ketcher-core/src/application/render/restruct/rerxnplus.js @@ -33,7 +33,7 @@ class ReRxnPlus extends ReObject { hoverPath(render) { const p = Scale.modelToCanvas(this.item.pp, render.options); - const s = render.options.scale; + const s = render.options.microModeScale; /* eslint-disable no-mixed-operators */ return render.paper.rect(p.x - s / 4, p.y - s / 4, s / 2, s / 2, s / 8); /* eslint-enable no-mixed-operators */ diff --git a/packages/ketcher-core/src/application/render/restruct/resgroup.ts b/packages/ketcher-core/src/application/render/restruct/resgroup.ts index 55aabab0cd..fa19f640c7 100644 --- a/packages/ketcher-core/src/application/render/restruct/resgroup.ts +++ b/packages/ketcher-core/src/application/render/restruct/resgroup.ts @@ -412,7 +412,7 @@ function drawAbsoluteDat(restruct: ReStruct, sgroup: SGroup): any { const paper = render.paper; const set = paper.set(); - const ps = sgroup?.pp?.scaled(options.scale); + const ps = sgroup?.pp?.scaled(options.microModeScale); const name = showValue(paper, ps, sgroup, options); if (sgroup.data.context !== SgContexts.Bond) { diff --git a/packages/ketcher-core/src/application/render/restruct/resimpleObject.ts b/packages/ketcher-core/src/application/render/restruct/resimpleObject.ts index 02c6d61a30..c18dc4173e 100644 --- a/packages/ketcher-core/src/application/render/restruct/resimpleObject.ts +++ b/packages/ketcher-core/src/application/render/restruct/resimpleObject.ts @@ -209,7 +209,7 @@ class ReSimpleObject extends ReObject { this.item.pos.forEach((p, index) => { point[index] = Scale.modelToCanvas(p, render.options); }); - const scaleFactor = render.options.scale; + const scaleFactor = render.options.microModeScale; const paths: Array = []; @@ -373,7 +373,7 @@ class ReSimpleObject extends ReObject { }); const refPoints = this.getReferencePoints(); - const scaleFactor = restruct.render.options.scale; + const scaleFactor = restruct.render.options.microModeScale; this.selectionSet = restruct.render.paper.set(); this.selectionPointsSet = restruct.render.paper.set(); this.selectionSet.push( diff --git a/packages/ketcher-core/src/application/render/util.ts b/packages/ketcher-core/src/application/render/util.ts index 8cc5d19103..16fb894362 100644 --- a/packages/ketcher-core/src/application/render/util.ts +++ b/packages/ketcher-core/src/application/render/util.ts @@ -169,7 +169,7 @@ function drawCIPLabel({ const { options, paper } = restruct.render; const path = paper.set(); - const cipLabelPosition = position.scaled(options.scale); + const cipLabelPosition = position.scaled(options.microModeScale); const cipValuePath = getCIPValuePath({ paper, cipLabelPosition, diff --git a/packages/ketcher-core/src/domain/entities/DrawingEntitiesManager.ts b/packages/ketcher-core/src/domain/entities/DrawingEntitiesManager.ts index 0c1eaa89eb..613e50deee 100644 --- a/packages/ketcher-core/src/domain/entities/DrawingEntitiesManager.ts +++ b/packages/ketcher-core/src/domain/entities/DrawingEntitiesManager.ts @@ -34,8 +34,6 @@ import { PolymerBondShowInfoOperation, } from 'application/editor/operations/polymerBond'; import { monomerFactory } from 'application/editor/operations/monomer/monomerFactory'; -import { provideEditorSettings } from 'application/editor/editorSettings'; -import { Scale } from 'domain/helpers'; import { Coordinates } from 'application/editor'; import { getCurrentCenterPointOfCanvas } from 'application/utils'; @@ -814,7 +812,6 @@ export class DrawingEntitiesManager { isNextChain = false, ) { const command = new Command(); - const editorSettings = provideEditorSettings(); const monomerWidth = monomer.renderer?.monomerSize.width ?? 0; const monomerHeight = monomer.renderer?.monomerSize.height ?? 0; const heightMonomerWithBond = @@ -831,7 +828,7 @@ export class DrawingEntitiesManager { this.rearrangeChainModelChange.bind( this, monomer, - Scale.canvasToModel(newPosition, editorSettings), + Coordinates.canvasToModel(newPosition), ), this.rearrangeChainModelChange.bind(this, monomer, oldMonomerPosition), ); @@ -894,7 +891,7 @@ export class DrawingEntitiesManager { const pos = Vec2.diff(nextMonomer.position, diff); const rearrangeResult = this.rearrangeChain( nextMonomer, - Scale.modelToCanvas(pos, editorSettings), + Coordinates.modelToCanvas(pos), canvasWidth, rearrangedMonomersSet, ); diff --git a/packages/ketcher-core/src/domain/helpers/scale.ts b/packages/ketcher-core/src/domain/helpers/scale.ts index 6d34cceef4..d594ec3801 100644 --- a/packages/ketcher-core/src/domain/helpers/scale.ts +++ b/packages/ketcher-core/src/domain/helpers/scale.ts @@ -17,15 +17,16 @@ import { Vec2 } from 'domain/entities'; export interface ScaleOptions { - scale: number; + microModeScale: number; + macroModeScale: number; } function canvasToModel(point: Vec2, options: ScaleOptions): Vec2 { - return point.scaled(1 / options.scale); + return point.scaled(1 / options.microModeScale); } function modelToCanvas(vector: Vec2, options: ScaleOptions): Vec2 { - return vector.scaled(options.scale); + return vector.scaled(options.microModeScale); } export const Scale = { diff --git a/packages/ketcher-react/src/script/editor/Editor.ts b/packages/ketcher-react/src/script/editor/Editor.ts index a6e7398283..288fcc0d17 100644 --- a/packages/ketcher-react/src/script/editor/Editor.ts +++ b/packages/ketcher-react/src/script/editor/Editor.ts @@ -161,7 +161,7 @@ class Editor implements KetcherEditor { clientArea, Object.assign( { - scale: SCALE, + microModeScale: SCALE, }, options, ), @@ -312,7 +312,7 @@ class Editor implements KetcherEditor { this.render = new Render( this.render.clientArea, - Object.assign({ scale: SCALE }, value), + Object.assign({ microModeScale: SCALE }, value), ); this.struct(struct); this.render.setZoom(zoom); @@ -363,11 +363,11 @@ class Editor implements KetcherEditor { const parsedStructSizeInPixels = { width: parsedStructSize.x * - this.render.options.scale * + this.render.options.microModeScale * this.render.options.zoom, height: parsedStructSize.y * - this.render.options.scale * + this.render.options.microModeScale * this.render.options.zoom, }; const clientAreaBoundingBox = diff --git a/packages/ketcher-react/src/script/editor/shared/closest.js b/packages/ketcher-react/src/script/editor/shared/closest.js index 35fef44019..aa40f98e37 100644 --- a/packages/ketcher-react/src/script/editor/shared/closest.js +++ b/packages/ketcher-react/src/script/editor/shared/closest.js @@ -114,7 +114,10 @@ function findClosestSimpleObject(restruct, pos) { let ret = null; restruct.simpleObjects.forEach((simpleObject, id) => { - const dist = simpleObject.calcDistance(pos, restruct.render.options.scale); + const dist = simpleObject.calcDistance( + pos, + restruct.render.options.microModeScale, + ); if (dist.minDist < 0.3 && (!ret || dist.minDist < minDist)) { minDist = dist.minDist; @@ -243,7 +246,7 @@ function findClosestBond(restruct, pos, skip, minDist, options) { if ( closestBond !== null && - minDist > SELECTION_DISTANCE_COEFFICIENT * options.scale + minDist > SELECTION_DISTANCE_COEFFICIENT * options.microModeScale ) { return { id: closestBond, @@ -405,7 +408,10 @@ function findClosestRxnArrow(restruct, pos) { let ret = null; restruct.rxnArrows.forEach((rxnArrow, id) => { - const dist = rxnArrow.calcDistance(pos, restruct.render.options.scale); + const dist = rxnArrow.calcDistance( + pos, + restruct.render.options.microModeScale, + ); if (dist.minDist < 0.3 && (!ret || dist.minDist < minDist)) { minDist = dist.minDist; diff --git a/packages/ketcher-react/src/script/editor/tool/rotate-controller.test.ts b/packages/ketcher-react/src/script/editor/tool/rotate-controller.test.ts index 65546e89fc..5b11aee428 100644 --- a/packages/ketcher-react/src/script/editor/tool/rotate-controller.test.ts +++ b/packages/ketcher-react/src/script/editor/tool/rotate-controller.test.ts @@ -126,7 +126,7 @@ describe('Rotate controller', () => { // @ts-ignore controller.editor.render = { options: { - scale: 2, + microModeScale: 2, offset: new Vec2(1, 1), }, } as any; diff --git a/packages/ketcher-react/src/script/editor/tool/rotate-controller.ts b/packages/ketcher-react/src/script/editor/tool/rotate-controller.ts index 749e11834e..299a4b7cb0 100644 --- a/packages/ketcher-react/src/script/editor/tool/rotate-controller.ts +++ b/packages/ketcher-react/src/script/editor/tool/rotate-controller.ts @@ -77,7 +77,7 @@ class RotateController { private get center() { return this.originalCenter - .scaled(this.render.options.scale) + .scaled(this.render.options.microModeScale) .add(this.render.options.offset); } @@ -676,7 +676,7 @@ class RotateController { const originalHandleCenter = this.handleCenter .sub(this.render.options.offset) - .scaled(1 / this.render.options.scale); + .scaled(1 / this.render.options.microModeScale); this.rotateTool.mousedownHandle(originalHandleCenter, this.originalCenter); }; @@ -696,7 +696,7 @@ class RotateController { this.handleCenter = this.render .page2obj(event) - .scaled(this.render.options.scale) + .scaled(this.render.options.microModeScale) .add(this.render.options.offset); this.drawLink('moveHandle'); diff --git a/packages/ketcher-react/src/script/ui/dialog/template/template-attach.jsx b/packages/ketcher-react/src/script/ui/dialog/template/template-attach.jsx index fde05c1065..e9c6111359 100644 --- a/packages/ketcher-react/src/script/ui/dialog/template/template-attach.jsx +++ b/packages/ketcher-react/src/script/ui/dialog/template/template-attach.jsx @@ -246,7 +246,7 @@ class Attach extends Component { ? this.props : this.tmpl.props; const options = Object.assign(editorStyles, this.props.globalSettings, { - scale: getScale(struct), + microModeScale: getScale(struct), reuseRestructIfExist: false, }); const dialogTitle = diff --git a/packages/ketcher-react/src/script/ui/views/components/StructEditor/InfoPanel.module.less b/packages/ketcher-react/src/script/ui/views/components/StructEditor/InfoPanel.module.less index 0280b0a86b..c43fa09957 100644 --- a/packages/ketcher-react/src/script/ui/views/components/StructEditor/InfoPanel.module.less +++ b/packages/ketcher-react/src/script/ui/views/components/StructEditor/InfoPanel.module.less @@ -1,10 +1,9 @@ @import '../../../../../style/variables.less'; .infoPanel { - padding: 20px; + padding: 10px; border: 1px solid #b4b9d6; border-radius: 3px; - } .infoPanel, .infoTooltip { diff --git a/packages/ketcher-react/src/script/ui/views/components/StructEditor/InfoPanel.tsx b/packages/ketcher-react/src/script/ui/views/components/StructEditor/InfoPanel.tsx index 9ca286a3a5..385bdbf64e 100644 --- a/packages/ketcher-react/src/script/ui/views/components/StructEditor/InfoPanel.tsx +++ b/packages/ketcher-react/src/script/ui/views/components/StructEditor/InfoPanel.tsx @@ -33,6 +33,7 @@ import { StructRender } from 'components'; import classes from './InfoPanel.module.less'; const HOVER_PANEL_PADDING = 20; +const MAX_INFO_PANEL_SIZE = 200; function getPanelPosition( clientX: number, @@ -50,8 +51,8 @@ function getPanelPosition( const groupBoundingBox = sGroup.areas[0]; const start = Scale.modelToCanvas(groupBoundingBox.p0, render.options); const end = Scale.modelToCanvas(groupBoundingBox.p1, render.options); - width = end.x - start.x; - height = end.y - start.y; + width = Math.min(end.x - start.x, MAX_INFO_PANEL_SIZE); + height = Math.min(end.y - start.y, MAX_INFO_PANEL_SIZE); // calculate initial position const { position } = sGroup.getContractedPosition(render.ctab.molecule); const panelPosition = CoordinateTransformation.modelToView( @@ -140,9 +141,7 @@ const InfoPanel: FC = (props) => { struct={molecule} options={{ ...render.options, - autoScale: true, - autoScaleMargin: 0, - rescaleAmount: 1, + downScale: true, cachePrefix: 'infoPanel', needCache: false, width,