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/Macro-Micro-Switcher/macro-micro-switcher.spec.ts b/ketcher-autotests/tests/Macromolecule-editor/Macro-Micro-Switcher/macro-micro-switcher.spec.ts index 956e36623d..d83d0aa960 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 @@ -25,6 +25,11 @@ export const COORDINATES_TO_PERFORM_ROTATION = { y: 100, }; +const topLeftCorner = { + x: -425, + y: -235, +}; + async function zoomWithMouseWheel( page: Page, numberOfMouseWheelScroll: number, @@ -111,7 +116,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); }); @@ -141,14 +151,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); }); @@ -298,7 +313,6 @@ test.describe('Macro-Micro-Switcher', () => { page, ); await turnOnMicromoleculesEditor(page); - await turnOnMacromoleculesEditor(page); // eslint-disable-next-line no-magic-numbers await zoomWithMouseWheel(page, 5, -80); @@ -428,7 +442,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); @@ -441,7 +460,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); @@ -454,7 +478,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); @@ -467,7 +496,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); }); @@ -479,7 +513,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); }); @@ -504,7 +543,12 @@ 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); }); @@ -551,7 +595,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-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-Add-monomers-in-macro-mode-then-switch-to-micro-mode-and-expand-them-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-mode-then-switch-to-micro-mode-and-expand-them-1-chromium-linux.png index 8354a95cd7..0198381449 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-mode-then-switch-to-micro-mode-and-expand-them-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-mode-then-switch-to-micro-mode-and-expand-them-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-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 00139076e5..7b40c8e226 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-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 571440a427..cc7382407b 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-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-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 dade25ed79..e22768decb 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 571440a427..183431b775 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-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 c782e57408..9be0f3a87f 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 596c01b955..a2ea71a08a 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 03104c3552..040d266435 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 03104c3552..040d266435 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 ab158dd988..a74059c417 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 9728e558d6..7047a3fd01 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 a8cd194de1..2a3c6de322 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 08e68b9d15..8808e2d595 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/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/monomers-connected-with-bonds-expected.ket b/ketcher-autotests/tests/test-data/KET/monomers-connected-with-bonds-expected.ket index 9b48a9a10d..f56bc723c7 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": "0", "position": { - "x": 9.850000000000001, - "y": 11.279999995231629 + "x": 0.7566666666666708, + "y": 2.2016666618982947 }, "alias": "baA", "templateId": "baA___N-benzyl-adenine" @@ -63,88 +63,88 @@ { "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 ] }, { "type": "rg-label", "location": [ - -2.415469202302518, - -1.0123543806254651, + -2.4154692023025173, + -1.0123543806254647, 0 ], "$refs": [ @@ -154,56 +154,56 @@ { "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 ] } @@ -368,8 +368,8 @@ "type": "monomer", "id": "1", "position": { - "x": 9.850000000000001, - "y": 8.729999995231628 + "x": 0.763333333333336, + "y": 1.4766666618982929 }, "alias": "12ddR", "templateId": "12ddR___1',2'-Di-Deoxy-Ribose" @@ -380,16 +380,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" @@ -397,16 +397,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" @@ -414,40 +414,40 @@ { "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 ] }, { "type": "rg-label", "location": [ - -2.328569251455221, - -1.3847780810220056, + -2.328569251455222, + -1.3847780810220063, 0 ], "$refs": [ @@ -457,8 +457,8 @@ { "type": "rg-label", "location": [ - 2.2689050907691644, - -0.5819165753524784, + 2.2689050907691652, + -0.5819165753524786, 0 ], "$refs": [ @@ -565,8 +565,8 @@ "type": "monomer", "id": "2", "position": { - "x": 12.4, - "y": 8.729999995231628 + "x": 1.6100000000000045, + "y": 1.4616666618982863 }, "alias": "P", "templateId": "P___Phosphate" 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 edbd9f43de..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,675 +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 - ] - }, - { - "type": "rg-label", - "location": [ - -2.415469202302518, - -1.0123543806254651, - 0 - ], - "$refs": [ - "rg-1" - ] - }, - { - "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": 10, - "leavingGroup": { - "atoms": [] - }, - "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 - ] - }, - { - "type": "rg-label", - "location": [ - -2.328569251455221, - -1.3847780810220056, - 0 - ], - "$refs": [ - "rg-1" - ] - }, - { - "type": "rg-label", - "location": [ - 2.2689050907691644, - -0.5819165753524784, - 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" - } - ] - }, - "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 - ] - }, - { - "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" - } - ] - } + "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 97f86133a0..7f44f52027 100644 --- a/ketcher-autotests/tests/test-data/KET/monomers-with-bonds.ket +++ b/ketcher-autotests/tests/test-data/KET/monomers-with-bonds.ket @@ -2,34 +2,34 @@ "root": { "nodes": [ { - "$ref": "monomer3" + "$ref": "monomer60" }, { - "$ref": "monomer4" + "$ref": "monomer61" }, { - "$ref": "monomer5" + "$ref": "monomer62" }, { - "$ref": "monomer6" + "$ref": "monomer63" }, { - "$ref": "monomer7" + "$ref": "monomer64" }, { - "$ref": "monomer8" + "$ref": "monomer65" }, { - "$ref": "monomer9" + "$ref": "monomer66" }, { - "$ref": "monomer19" + "$ref": "monomer67" }, { - "$ref": "monomer20" + "$ref": "monomer68" }, { - "$ref": "monomer22" + "$ref": "monomer69" }, { "$ref": "mol0" @@ -42,88 +42,88 @@ { "connectionType": "single", "endpoint1": { - "monomerId": "monomer9", + "monomerId": "monomer66", "attachmentPointId": "R2" }, "endpoint2": { - "monomerId": "monomer3", + "monomerId": "monomer60", "attachmentPointId": "R1" } }, { "connectionType": "single", "endpoint1": { - "monomerId": "monomer9", + "monomerId": "monomer66", "attachmentPointId": "R1" }, "endpoint2": { - "monomerId": "monomer4", + "monomerId": "monomer61", "attachmentPointId": "R2" } }, { "connectionType": "single", "endpoint1": { - "monomerId": "monomer9", + "monomerId": "monomer66", "attachmentPointId": "R3" }, "endpoint2": { - "monomerId": "monomer5", + "monomerId": "monomer62", "attachmentPointId": "R1" } }, { "connectionType": "single", "endpoint1": { - "monomerId": "monomer9", + "monomerId": "monomer66", "attachmentPointId": "R4" }, "endpoint2": { - "monomerId": "monomer8", + "monomerId": "monomer65", "attachmentPointId": "R1" } }, { "connectionType": "single", "endpoint1": { - "monomerId": "monomer9", + "monomerId": "monomer66", "attachmentPointId": "R5" }, "endpoint2": { - "monomerId": "monomer7", + "monomerId": "monomer64", "attachmentPointId": "R1" } }, { "connectionType": "single", "endpoint1": { - "monomerId": "monomer9", + "monomerId": "monomer66", "attachmentPointId": "R6" }, "endpoint2": { - "monomerId": "monomer6", + "monomerId": "monomer63", "attachmentPointId": "R1" } }, { "connectionType": "single", "endpoint1": { - "monomerId": "monomer19", + "monomerId": "monomer67", "attachmentPointId": "R1" }, "endpoint2": { - "monomerId": "monomer20", + "monomerId": "monomer68", "attachmentPointId": "R3" } }, { "connectionType": "single", "endpoint1": { - "monomerId": "monomer20", + "monomerId": "monomer68", "attachmentPointId": "R1" }, "endpoint2": { - "monomerId": "monomer22", + "monomerId": "monomer69", "attachmentPointId": "R2" } } @@ -303,12 +303,12 @@ } ] }, - "monomer3": { + "monomer60": { "type": "monomer", - "id": "3", + "id": "60", "position": { - "x": 8.200000000000001, - "y": 2.475 + "x": 3.5133333333333305, + "y": 1.534999999999997 }, "alias": "Test-6-P", "templateId": "Test-6-P___Test-6-AP-Peptide" @@ -726,72 +726,72 @@ } ] }, - "monomer4": { + "monomer61": { "type": "monomer", - "id": "4", + "id": "61", "position": { - "x": 10.9, - "y": 2.375 + "x": 4.266666666666668, + "y": 1.3083333333333331 }, "alias": "Test-6-P", "templateId": "Test-6-P___Test-6-AP-Peptide" }, - "monomer5": { + "monomer62": { "type": "monomer", - "id": "5", + "id": "62", "position": { - "x": 13.725000000000001, - "y": 2.275 + "x": 5.065000000000008, + "y": 1.4283333333333301 }, "alias": "Test-6-P", "templateId": "Test-6-P___Test-6-AP-Peptide" }, - "monomer6": { + "monomer63": { "type": "monomer", - "id": "6", + "id": "63", "position": { - "x": 7.8500000000000005, - "y": 7.300000000000001 + "x": 3.5566666666666635, + "y": 2.5666666666666735 }, "alias": "Test-6-P", "templateId": "Test-6-P___Test-6-AP-Peptide" }, - "monomer7": { + "monomer64": { "type": "monomer", - "id": "7", + "id": "64", "position": { - "x": 10.65, - "y": 7.1000000000000005 + "x": 4.343333333333335, + "y": 2.6333333333333386 }, "alias": "Test-6-P", "templateId": "Test-6-P___Test-6-AP-Peptide" }, - "monomer8": { + "monomer65": { "type": "monomer", - "id": "8", + "id": "65", "position": { - "x": 13.725000000000001, - "y": 7.1000000000000005 + "x": 5.338333333333344, + "y": 2.5066666666666744 }, "alias": "Test-6-P", "templateId": "Test-6-P___Test-6-AP-Peptide" }, - "monomer9": { + "monomer66": { "type": "monomer", - "id": "9", + "id": "66", "position": { - "x": 10.825000000000001, - "y": 4.7250000000000005 + "x": 4.291666666666669, + "y": 1.9583333333333344 }, "alias": "Test-6-P", "templateId": "Test-6-P___Test-6-AP-Peptide" }, - "monomer19": { + "monomer67": { "type": "monomer", - "id": "19", + "id": "67", "position": { - "x": 2.2, - "y": 8.9 + "x": 1.1599999999999995, + "y": 2.8066666666666675 }, "alias": "A", "templateId": "A___Adenine" @@ -991,12 +991,12 @@ } ] }, - "monomer20": { + "monomer68": { "type": "monomer", - "id": "20", + "id": "68", "position": { - "x": 2.2, - "y": 6.3500000000000005 + "x": 1.1800000000000006, + "y": 2.0700000000000025 }, "alias": "R", "templateId": "R___Ribose" @@ -1232,12 +1232,12 @@ } ] }, - "monomer22": { + "monomer69": { "type": "monomer", - "id": "22", + "id": "69", "position": { - "x": 4.75, - "y": 6.3500000000000005 + "x": 2.0833333333333344, + "y": 2.056666666666669 }, "alias": "P", "templateId": "P___Phosphate" @@ -1248,7 +1248,7 @@ { "label": "P", "location": [ - -0.2399, + -0.19991692871090108, 0, 0 ] @@ -1256,7 +1256,7 @@ { "type": "rg-label", "location": [ - -1.4399, + -1.1999182394782262, 0, 0 ], @@ -1267,15 +1267,15 @@ { "label": "O", "location": [ - 0.3598, - -1.0394, + 0.29983372634506966, + -0.8661678020096315, 0 ] }, { "type": "rg-label", "location": [ - 0.9601, + 0.800084382056424, 0, 0 ], @@ -1286,8 +1286,8 @@ { "label": "O", "location": [ - 0.3598, - 1.0394, + 0.29983372634506966, + 0.8661678020096315, 0 ] } 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 2c0f8ab932..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/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 ba5b630753..87eec1b93d 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 @@ -5,9 +5,9 @@ M V30 BEGIN CTAB M V30 COUNTS 3 2 0 0 0 M V30 BEGIN ATOM -M V30 1 A 7.975 5.9 0.0 0 CLASS=AA ATTCHORD=(4 2 Br 3 Al) -M V30 2 Bal 13.325 5.825 0.0 0 CLASS=AA ATTCHORD=(2 1 Al) -M V30 3 Az 8.075 10.05 0.0 0 CLASS=CHEM ATTCHORD=(2 1 Al) +M V30 1 A 1.08833 1.01333 0.0 0 CLASS=AA ATTCHORD=(4 2 Br 3 Al) +M V30 2 Bal 2.23833 0.991666 0.0 0 CLASS=AA ATTCHORD=(2 1 Al) +M V30 3 Az 1.115 1.89667 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/packages/ketcher-core/__tests__/application/editor/shared/coordinates.test.ts b/packages/ketcher-core/__tests__/application/editor/shared/coordinates.test.ts index 33a1b1927b..55529ff53f 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 ab4be0b05b..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 = { microModeScale: 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 = { microModeScale: 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 9085101f0f..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 = { microModeScale: 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 dd87bb4374..fcb5def826 100644 --- a/packages/ketcher-core/src/application/editor/editorSettings.ts +++ b/packages/ketcher-core/src/application/editor/editorSettings.ts @@ -1,6 +1,6 @@ const editorSettings = { microModeScale: 40, // Angstroms To Pixels Factor - macroModeScale: 200, // Angstroms To Pixels Factor + macroModeScale: 150, // Angstroms To Pixels Factor }; export function provideEditorSettings() { diff --git a/packages/ketcher-core/src/domain/entities/DrawingEntitiesManager.ts b/packages/ketcher-core/src/domain/entities/DrawingEntitiesManager.ts index 04e79014c3..8ccb9047ed 100644 --- a/packages/ketcher-core/src/domain/entities/DrawingEntitiesManager.ts +++ b/packages/ketcher-core/src/domain/entities/DrawingEntitiesManager.ts @@ -34,8 +34,7 @@ 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/shared/coordinates'; const HORIZONTAL_DISTANCE_FROM_MONOMER = 50; const VERTICAL_DISTANCE_FROM_MONOMER = 60; @@ -806,7 +805,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 = @@ -823,7 +821,7 @@ export class DrawingEntitiesManager { this.rearrangeChainModelChange.bind( this, monomer, - Scale.canvasToModel(newPosition, editorSettings), + Coordinates.canvasToModel(newPosition), ), this.rearrangeChainModelChange.bind(this, monomer, oldMonomerPosition), ); @@ -885,7 +883,7 @@ export class DrawingEntitiesManager { const pos = Vec2.diff(nextMonomer.position, diff); const rearrangeResult = this.rearrangeChain( nextMonomer, - Scale.modelToCanvas(pos, editorSettings), + Coordinates.modelToCanvas(pos), canvasWidth, monomer, ); diff --git a/packages/ketcher-polymer-editor-react/src/components/modal/Open/Open.tsx b/packages/ketcher-polymer-editor-react/src/components/modal/Open/Open.tsx index d51240426e..d1d818dd1d 100644 --- a/packages/ketcher-polymer-editor-react/src/components/modal/Open/Open.tsx +++ b/packages/ketcher-polymer-editor-react/src/components/modal/Open/Open.tsx @@ -231,7 +231,7 @@ const Open = ({ isModalOpen, onClose }: RequiredModalProps) => { {getButtons().length === 0 ? ( <> ) : ( - {getButtons()} + {getButtons()} )} ); diff --git a/packages/ketcher-polymer-editor-react/src/components/shared/modal/Modal.tsx b/packages/ketcher-polymer-editor-react/src/components/shared/modal/Modal.tsx index d8e4af15ef..71e57420c7 100644 --- a/packages/ketcher-polymer-editor-react/src/components/shared/modal/Modal.tsx +++ b/packages/ketcher-polymer-editor-react/src/components/shared/modal/Modal.tsx @@ -63,15 +63,15 @@ const Content = styled(DialogContent)` `; interface FooterProps { - withBorder?: boolean; + $withBorder?: boolean; } const Footer = styled(DialogActions)` height: 52px; margin: 0; padding: 0 12px; - border-top: ${({ theme, withBorder }) => - withBorder ? theme.ketcher.border.small : 'none'}; + border-top: ${({ theme, $withBorder }) => + $withBorder ? theme.ketcher.border.small : 'none'}; justify-content: flex-end; .MuiButtonBase-root { 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/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 =