From 18eb949e36b61710900753f9eb672a0d39201716 Mon Sep 17 00:00:00 2001 From: Nikita Chistousov Date: Wed, 25 Dec 2024 18:16:56 +0100 Subject: [PATCH] =?UTF-8?q?#6028=20=E2=80=93=20Increase=20monomers=20locat?= =?UTF-8?q?or=20index=20by=201=20caused=20by=20added=20arrow=20marker=20=20tag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...mbiguous-monomer-attachment-points.spec.ts | 84 +++++++++---------- .../preview-for-ambiguous-monomers.spec.ts | 64 +++++++------- .../ketcher-macromolecules/src/Editor.tsx | 25 +----- .../shared/monomerOnCanvas/ArrowMarker.tsx | 27 ++++++ .../shared/monomerOnCanvas/index.ts | 2 + 5 files changed, 106 insertions(+), 96 deletions(-) create mode 100644 packages/ketcher-macromolecules/src/components/shared/monomerOnCanvas/ArrowMarker.tsx diff --git a/ketcher-autotests/tests/Macromolecule-editor/Ambiguous-Monomers/ambiguous-monomer-attachment-points.spec.ts b/ketcher-autotests/tests/Macromolecule-editor/Ambiguous-Monomers/ambiguous-monomer-attachment-points.spec.ts index c9248ef05d..8c48d91c7c 100644 --- a/ketcher-autotests/tests/Macromolecule-editor/Ambiguous-Monomers/ambiguous-monomer-attachment-points.spec.ts +++ b/ketcher-autotests/tests/Macromolecule-editor/Ambiguous-Monomers/ambiguous-monomer-attachment-points.spec.ts @@ -86,254 +86,254 @@ const ambiguousMonomers: IHELMString[] = [ testDescription: '1. Ambiguous alternatives peptide made of peptide(R1) and peptide(R1) should result in peptide(R1)', HELMString: 'PEPTIDE1{([Pyrro],[Am-])}$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '2. Ambiguous alternatives peptide made of peptide(R2) and peptide(R2) should result in peptide(R2)', HELMString: 'PEPTIDE1{([Glc],[Hva])}$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '3. Ambiguous alternatives peptide made of peptide(R2+R3) and peptide(R2+R3) should result in peptide(R2+R3)', HELMString: 'PEPTIDE1{([Mpa],[Mba])}$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '4. Ambiguous alternatives peptide made of peptide(R1+R2) and peptide(R1+R2) should result in peptide(R1+R2)', HELMString: 'PEPTIDE1{([D-Nle],[2Nal])}$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '5. Ambiguous alternatives peptide made of peptide(R1+R2+R3) and peptide(R1+R2+R3) should result in peptide(R1+R2+R3)', HELMString: 'PEPTIDE1{([Aad],[Asu])}$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '6. Ambiguous alternatives peptide made of peptide(R1) and peptide(R1+R2+R3) should result in peptide(R1)', HELMString: 'PEPTIDE1{([Pyrro],[Asu])}$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '7. Ambiguous alternatives peptide made of peptide(R2) and peptide(R1) should result in peptide with no APs', HELMString: 'PEPTIDE1{([Glc],[Am-])}$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '8. Ambiguous alternatives peptide made of peptide(R2+R3) and peptide(R2) should result in peptide(R2)', HELMString: 'PEPTIDE1{([Mpa],[Hva])}$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '9. Ambiguous alternatives peptide made of peptide(R1+R2) and peptide(R2+R3) should result in peptide(R2)', HELMString: 'PEPTIDE1{([D-Nle],[Mba])}$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '10. Ambiguous alternatives peptide made of peptide(R1+R2+R3) and peptide(R1+R2) should result in peptide(R1+R2)', HELMString: 'PEPTIDE1{([Aad],[2Nal])}$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '11. Ambiguous alternatives peptide made of peptide(R1) and peptide(R1+R2) should result in peptide(R1)', HELMString: 'PEPTIDE1{([Pyrro],[2Nal])}$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '12. Ambiguous alternatives peptide made of peptide(R2) and peptide(R1+R2+R3) should result in peptide(R2)', HELMString: 'PEPTIDE1{([Glc],[Asu])}$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '13. Ambiguous alternatives peptide made of peptide(R2+R3) and peptide(R1) should result in peptide with no APs', HELMString: 'PEPTIDE1{([Mpa],[Am-])}$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '14. Ambiguous alternatives peptide made of peptide(R1+R2) and peptide(R2) should result in peptide(R2)', HELMString: 'PEPTIDE1{([D-Nle],[Hva])}$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '15. Ambiguous alternatives peptide made of peptide(R1+R2+R3) and peptide(R2+R3) should result in peptide(R2+R3)', HELMString: 'PEPTIDE1{([Aad],[Mba])}$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '16. Ambiguous mixed peptide made of peptide(R1) and peptide(R1) should result in peptide(R1)', HELMString: 'PEPTIDE1{([Pyrro]+[Am-])}$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '17. Ambiguous mixed peptide made of peptide(R2) and peptide(R2) should result in peptide(R2)', HELMString: 'PEPTIDE1{([Glc]+[Hva])}$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '18. Ambiguous mixed peptide made of peptide(R2+R3) and peptide(R2+R3) should result in peptide(R2+R3)', HELMString: 'PEPTIDE1{([Mpa]+[Mba])}$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '19. Ambiguous mixed peptide made of peptide(R1+R2) and peptide(R1+R2) should result in peptide(R1+R2)', HELMString: 'PEPTIDE1{([D-Nle]+[2Nal])}$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '20. Ambiguous mixed peptide made of peptide(R1+R2+R3) and peptide(R1+R2+R3) should result in peptide(R1+R2+R3)', HELMString: 'PEPTIDE1{([Aad]+[Asu])}$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '21. Ambiguous mixed peptide made of peptide(R1) and peptide(R1+R2+R3) should result in peptide(R1)', HELMString: 'PEPTIDE1{([Pyrro]+[Asu])}$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '22. Ambiguous mixed peptide made of peptide(R2) and peptide(R1) should result in peptide with no APs', HELMString: 'PEPTIDE1{([Glc]+[Am-])}$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '23. Ambiguous mixed peptide made of peptide(R2+R3) and peptide(R2) should result in peptide(R2)', HELMString: 'PEPTIDE1{([Mpa]+[Hva])}$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '24. Ambiguous mixed peptide made of peptide(R1+R2) and peptide(R2+R3) should result in peptide(R2)', HELMString: 'PEPTIDE1{([D-Nle]+[Mba])}$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '25. Ambiguous mixed peptide made of peptide(R1+R2+R3) and peptide(R1+R2) should result in peptide(R1+R2)', HELMString: 'PEPTIDE1{([Aad]+[2Nal])}$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '26. Ambiguous mixed peptide made of peptide(R1) and peptide(R1+R2) should result in peptide(R1)', HELMString: 'PEPTIDE1{([Pyrro]+[2Nal])}$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '27. Ambiguous mixed peptide made of peptide(R2) and peptide(R1+R2+R3) should result in peptide(R2)', HELMString: 'PEPTIDE1{([Glc]+[Asu])}$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '28. Ambiguous mixed peptide made of peptide(R2+R3) and peptide(R1) should result in peptide with no APs', HELMString: 'PEPTIDE1{([Mpa]+[Am-])}$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '29. Ambiguous mixed peptide made of peptide(R1+R2) and peptide(R2) should result in peptide(R2)', HELMString: 'PEPTIDE1{([D-Nle]+[Hva])}$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '30. Ambiguous mixed peptide made of peptide(R1+R2+R3) and peptide(R2+R3) should result in peptide(R2+R3)', HELMString: 'PEPTIDE1{([Aad]+[Mba])}$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '31. Ambiguous alternatives base made of base(R1) and base(R1) should result in base(R1)', HELMString: 'RNA1{R([2imen2],[5meC])P}$$$$V2.0', - monomerLocatorIndex: 1, + monomerLocatorIndex: 2, pageReloadNeeded: true, }, { testDescription: '32. Ambiguous alternatives base made of base(R1+R2) and base(R1+R2) should result in base(R1+R2)', HELMString: 'RNA1{R([oC64m5],[nC65U])P}$$$$V2.0', - monomerLocatorIndex: 1, + monomerLocatorIndex: 2, }, { testDescription: '33. Ambiguous alternatives base made of base(R1+R2+R3) and base(R1+R2+R3) should result in base(R1+R2+R3)', HELMString: 'RNA1{R([nC6n5C],[nC6n8A])P}$$$$V2.0', - monomerLocatorIndex: 1, + monomerLocatorIndex: 2, }, { testDescription: '34. Ambiguous alternatives base made of base(R1) and base(R1+R2+R3) should result in base(R1)', HELMString: 'RNA1{R([2imen2],[nC6n8A])P}$$$$V2.0', - monomerLocatorIndex: 1, + monomerLocatorIndex: 2, }, { testDescription: '35. Ambiguous alternatives base made of base(R1+R2) and base(R1) should result in base(R1)', HELMString: 'RNA1{R([oC64m5],[5meC])P}$$$$V2.0', - monomerLocatorIndex: 1, + monomerLocatorIndex: 2, }, { testDescription: '36. Ambiguous alternatives base made of base(R1+R2+R3) and base(R1+R2) should result in base(R1+R2)', HELMString: 'RNA1{R([nC6n5C],[nC65U])P}$$$$V2.0', - monomerLocatorIndex: 1, + monomerLocatorIndex: 2, }, { testDescription: '37. Ambiguous mixed base made of base(R1) and base(R1) should result in base(R1)', HELMString: 'RNA1{R([2imen2]+[5meC])P}$$$$V2.0', - monomerLocatorIndex: 1, + monomerLocatorIndex: 2, }, { testDescription: '38. Ambiguous mixed base made of base(R1+R2) and base(R1+R2) should result in base(R1+R2)', HELMString: 'RNA1{R([oC64m5]+[nC65U])P}$$$$V2.0', - monomerLocatorIndex: 1, + monomerLocatorIndex: 2, }, { testDescription: '39. Ambiguous mixed base made of base(R1+R2+R3) and base(R1+R2+R3) should result in base(R1+R2+R3)', HELMString: 'RNA1{R([nC6n5C]+[nC6n8A])P}$$$$V2.0', - monomerLocatorIndex: 1, + monomerLocatorIndex: 2, }, { testDescription: '40. Ambiguous mixed base made of base(R1) and base(R1+R2+R3) should result in base(R1)', HELMString: 'RNA1{R([2imen2]+[nC6n8A])P}$$$$V2.0', - monomerLocatorIndex: 1, + monomerLocatorIndex: 2, }, { testDescription: '41. Ambiguous mixed base made of base(R1+R2) and base(R1) should result in base(R1)', HELMString: 'RNA1{R([oC64m5]+[5meC])P}$$$$V2.0', - monomerLocatorIndex: 1, + monomerLocatorIndex: 2, }, { testDescription: '42. Ambiguous mixed base made of base(R1+R2+R3) and base(R1+R2) should result in base(R1+R2)', HELMString: 'RNA1{R([nC6n5C]+[nC65U])P}$$$$V2.0', - monomerLocatorIndex: 1, + monomerLocatorIndex: 2, }, ]; diff --git a/ketcher-autotests/tests/Macromolecule-editor/Ambiguous-Monomers/preview-for-ambiguous-monomers.spec.ts b/ketcher-autotests/tests/Macromolecule-editor/Ambiguous-Monomers/preview-for-ambiguous-monomers.spec.ts index 389b6cdc27..3efd1f1711 100644 --- a/ketcher-autotests/tests/Macromolecule-editor/Ambiguous-Monomers/preview-for-ambiguous-monomers.spec.ts +++ b/ketcher-autotests/tests/Macromolecule-editor/Ambiguous-Monomers/preview-for-ambiguous-monomers.spec.ts @@ -96,42 +96,42 @@ const ambiguousMonomers: IHELMString[] = [ testDescription: '1. Peptide X (alternatives, from library)', HELMString: 'PEPTIDE1{(A,C,D,E,F,G,H,I,K,L,M,N,O,P,Q,R,S,T,U,V,W,Y)}$$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '2. Peptide B (alternatives, from library)', HELMString: 'PEPTIDE2{(D,N)}$$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '3. Alternatives of 10 Peptides (no probabilities)', HELMString: 'PEPTIDE1{(L,K,I,H,G,F,E,D,C,A)}$$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '4. Alternatives of 10 Peptides (multi-char name, no probabilities)', HELMString: 'PEPTIDE1{([D-2Pal],[Cys_Bn],[AspOMe],[D-gGlu],[aMePhe],[Chg],[dH],[aIle],[Aad],[Ar5c])}$$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '5. Alternatives of 10 Peptides (with probabilities)', HELMString: 'PEPTIDE1{(L:1,K:3,I:5,H:7,G:9,F:55,E:8,D:6,C:4,A:2)}$$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '6. Alternatives of 10 Peptides (multi-char name, with probabilities)', HELMString: 'PEPTIDE1{([D-2Pal]:1,[Cys_Bn]:3,[AspOMe]:5,[D-gGlu]:7,[aMePhe]:9,[Chg]:55,[dH]:8,[aIle]:6,[Aad]:4,[Ar5c]:2)}$$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, }, { testDescription: '7. Peptide X (Mixture, no quantities, from library)', HELMString: 'PEPTIDE1{(A+C+D+E+F+G+H+I+K+L+M+N+O+P+Q+R+S+T+U+V+W+Y)}$$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, shouldFail: true, issueNumber: 'https://github.com/epam/ketcher/issues/5534, https://github.com/epam/ketcher/issues/5566', @@ -139,7 +139,7 @@ const ambiguousMonomers: IHELMString[] = [ { testDescription: '8. Peptide B (Mixture, from library)', HELMString: 'PEPTIDE2{(D+N)}$$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, shouldFail: true, issueNumber: 'https://github.com/epam/ketcher/issues/5534, https://github.com/epam/ketcher/issues/5566', @@ -147,7 +147,7 @@ const ambiguousMonomers: IHELMString[] = [ { testDescription: '9. Mixture of 10 Peptides (no quantities)', HELMString: 'PEPTIDE1{(L+K+I+H+G+F+E+D+C+A)}$$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, shouldFail: true, issueNumber: 'https://github.com/epam/ketcher/issues/5534', }, @@ -156,14 +156,14 @@ const ambiguousMonomers: IHELMString[] = [ '10. Mixture of 10 Peptides (multi-char name, no quantities)', HELMString: 'PEPTIDE1{([D-2Pal]+[Cys_Bn]+[AspOMe]+[D-gGlu]+[aMePhe]+[Chg]+[dH]+[aIle]+[Aad]+[Ar5c])}$$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, shouldFail: true, issueNumber: 'https://github.com/epam/ketcher/issues/5534', }, { testDescription: '11. Mixture of 10 Peptides (with quantities)', HELMString: 'PEPTIDE1{(L:1+K:3+I:5+H:7+G:9+F:10+E:8+D:6+C:4+A:2)}$$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, shouldFail: true, issueNumber: 'https://github.com/epam/ketcher/issues/5534', }, @@ -172,7 +172,7 @@ const ambiguousMonomers: IHELMString[] = [ '12. Mixture of 10 Peptides (multi-char name, with quantities)', HELMString: 'PEPTIDE1{([D-2Pal]:1+[Cys_Bn]:3+[AspOMe]:5+[D-gGlu]:7+[aMePhe]:9+[Chg]:5+[dH]:8+[aIle]:6+[Aad]:4+[Ar5c]:2)}$$$$V2.0', - monomerLocatorIndex: 0, + monomerLocatorIndex: 1, shouldFail: true, issueNumber: 'https://github.com/epam/ketcher/issues/5534', }, @@ -180,48 +180,48 @@ const ambiguousMonomers: IHELMString[] = [ testDescription: '13. RNA Base N (alternative, no probabilities, from the library)', HELMString: 'RNA1{R(U,G,C,A)P}$$$$V2.0', - monomerLocatorIndex: 1, + monomerLocatorIndex: 2, pageReloadNeeded: true, }, { testDescription: '14. RNA Base B (alternative, no probabilities, from the library)', HELMString: 'RNA1{R(U,G,C)P}$$$$V2.0', - monomerLocatorIndex: 1, + monomerLocatorIndex: 2, pageReloadNeeded: true, }, { testDescription: '15. DNA Base N (alternative, no probabilities, from the library)', HELMString: 'RNA1{[dR](T,G,C,A)P}$$$$V2.0', - monomerLocatorIndex: 2, + monomerLocatorIndex: 3, monomerLocatorIndexOnMicro: 1, }, { testDescription: '16. DNA Base B (alternative, no probabilities, from the library)', HELMString: 'RNA1{[dR](T,G,C)P}$$$$V2.0', - monomerLocatorIndex: 2, + monomerLocatorIndex: 3, monomerLocatorIndexOnMicro: 1, }, { testDescription: '17. DNA Base B (alternative, with probabilities, from the library)', HELMString: 'RNA1{[dR](T:20,G:50,C:30)P}$$$$V2.0', - monomerLocatorIndex: 2, + monomerLocatorIndex: 3, monomerLocatorIndexOnMicro: 1, }, { testDescription: '18. Base M (alternative, no probabilities, from the library)', HELMString: 'RNA1{R(C,A)P}$$$$V2.0', - monomerLocatorIndex: 1, + monomerLocatorIndex: 2, }, { testDescription: '19. Base R (alternative, no probabilities, from the library)', HELMString: 'RNA1{R(G,A)P}$$$$V2.0', - monomerLocatorIndex: 1, + monomerLocatorIndex: 2, }, // dfB 2,4-Difluoro-Benzene // cnes4T 4-Cyanoethylthiothymine @@ -238,38 +238,38 @@ const ambiguousMonomers: IHELMString[] = [ '20. Alternatives of 10 bases (multi-char, no probabilities)', HELMString: 'RNA1{R([2imen2],[5meC],[4imen2],[cnes4T],[5eU],[dfB],[4ime6A],[ac4C],[allyl9],[cneT])P}$$$$V2.0', - monomerLocatorIndex: 1, + monomerLocatorIndex: 2, }, { testDescription: '21. Alternatives of 10 bases (multi-char, with probabilities)', HELMString: 'RNA1{R([2imen2]:1,[5meC]:3,[4imen2]:5,[cnes4T]:7,[5eU]:9,[dfB]:55,[4ime6A]:8,[ac4C]:6,[allyl9]:4,[cneT]:2)P}$$$$V2.0', - monomerLocatorIndex: 1, + monomerLocatorIndex: 2, }, { testDescription: '22. RNA Base N (mixture, no quantities, from library)', HELMString: 'RNA1{R(U+G+C+A)P}$$$$V2.0', - monomerLocatorIndex: 1, + monomerLocatorIndex: 2, shouldFail: true, issueNumber: 'https://github.com/epam/ketcher/issues/5534', }, { testDescription: '23. RNA Base B (mixture, no quantities, from library)', HELMString: 'RNA1{R(U+G+C)P}$$$$V2.0', - monomerLocatorIndex: 1, + monomerLocatorIndex: 2, shouldFail: true, issueNumber: 'https://github.com/epam/ketcher/issues/5534', }, { testDescription: '24. RNA Base B (mixture, with quantities, from library)', HELMString: 'RNA1{R(U:20+G:50+C:30)P}$$$$V2.0', - monomerLocatorIndex: 1, + monomerLocatorIndex: 2, }, { testDescription: '25. DNA Base N (mixture, no quantities, from library)', HELMString: 'RNA1{[dR](T+G+C+A)P}$$$$V2.0', - monomerLocatorIndex: 2, + monomerLocatorIndex: 3, monomerLocatorIndexOnMicro: 1, shouldFail: true, issueNumber: @@ -278,7 +278,7 @@ const ambiguousMonomers: IHELMString[] = [ { testDescription: '26. DNA Base B (mixture, no quantities, from library)', HELMString: 'RNA1{[dR](T+G+C)P}$$$$V2.0', - monomerLocatorIndex: 2, + monomerLocatorIndex: 3, monomerLocatorIndexOnMicro: 1, shouldFail: true, issueNumber: @@ -289,13 +289,13 @@ const ambiguousMonomers: IHELMString[] = [ HELMString: 'RNA1{[dR](T:20+G:50+C:30)P}$$$$V2.0', shouldFail: true, issueNumber: 'https://github.com/epam/ketcher/issues/5566', - monomerLocatorIndex: 2, + monomerLocatorIndex: 3, monomerLocatorIndexOnMicro: 1, }, { testDescription: '28. Base M (mixture, no quantities, from library)', HELMString: 'RNA1{R(C+A)P}$$$$V2.0', - monomerLocatorIndex: 1, + monomerLocatorIndex: 3, shouldFail: true, issueNumber: 'https://github.com/epam/ketcher/issues/5534, https://github.com/epam/ketcher/issues/5566', @@ -303,7 +303,7 @@ const ambiguousMonomers: IHELMString[] = [ { testDescription: '29. Base R (mixture, no quantities, from library)', HELMString: 'RNA1{R(G+A)P}$$$$V2.0', - monomerLocatorIndex: 1, + monomerLocatorIndex: 2, shouldFail: true, issueNumber: 'https://github.com/epam/ketcher/issues/5534, https://github.com/epam/ketcher/issues/5566', @@ -313,13 +313,13 @@ const ambiguousMonomers: IHELMString[] = [ HELMString: 'RNA1{R(G:30+A:70)P}$$$$V2.0', shouldFail: true, issueNumber: 'https://github.com/epam/ketcher/issues/5566', - monomerLocatorIndex: 1, + monomerLocatorIndex: 2, }, { testDescription: '31. Mixture of 10 bases (multi-char, no quantities)', HELMString: 'RNA1{R([2imen2]+[5meC]+[4imen2]+[cnes4T]+[5eU]+[dfB]+[4ime6A]+[ac4C]+[allyl9]+[cneT])P}$$$$V2.0', - monomerLocatorIndex: 1, + monomerLocatorIndex: 2, shouldFail: true, issueNumber: 'https://github.com/epam/ketcher/issues/5534', }, @@ -327,7 +327,7 @@ const ambiguousMonomers: IHELMString[] = [ testDescription: '32. Mixture of 10 bases (multi-char, with quantities)', HELMString: 'RNA1{R([2imen2]:1+[5meC]:3+[4imen2]:5+[cnes4T]:7+[5eU]:9+[dfB]:55+[4ime6A]:8+[ac4C]:6+[allyl9]:4+[cneT]:2)P}$$$$V2.0', - monomerLocatorIndex: 1, + monomerLocatorIndex: 2, }, ]; diff --git a/packages/ketcher-macromolecules/src/Editor.tsx b/packages/ketcher-macromolecules/src/Editor.tsx index 66928d7514..e51adfba1a 100644 --- a/packages/ketcher-macromolecules/src/Editor.tsx +++ b/packages/ketcher-macromolecules/src/Editor.tsx @@ -65,6 +65,8 @@ import { SugarAvatar, UnresolvedMonomerAvatar, NucleotideAvatar, + SequenceStartArrow, + ArrowMarker, } from 'components/shared/monomerOnCanvas'; import { ErrorModal } from 'components/modal/Error'; import { @@ -81,7 +83,6 @@ import { LayoutModeButton } from 'components/LayoutModeButton'; import { useContextMenu } from 'react-contexify'; import { CONTEXT_MENU_ID } from 'components/contextMenu/types'; import { SequenceItemContextMenu } from 'components/contextMenu/SequenceItemContextMenu/SequenceItemContextMenu'; -import { SequenceStartArrow } from 'components/shared/monomerOnCanvas/SequenceStartArrow'; import { Preview } from 'components/preview/Preview'; import { SequenceTypeGroupButton } from 'components/SequenceTypeGroupButton'; import { TopMenuComponent } from 'components/TopMenuComponent'; @@ -273,27 +274,6 @@ function Editor({ }} > - - - - @@ -302,6 +282,7 @@ function Editor({ + {isHandToolSelected && ( diff --git a/packages/ketcher-macromolecules/src/components/shared/monomerOnCanvas/ArrowMarker.tsx b/packages/ketcher-macromolecules/src/components/shared/monomerOnCanvas/ArrowMarker.tsx new file mode 100644 index 0000000000..b6e147fc8b --- /dev/null +++ b/packages/ketcher-macromolecules/src/components/shared/monomerOnCanvas/ArrowMarker.tsx @@ -0,0 +1,27 @@ +export const ArrowMarker = () => { + return ( + <> + + + + + + ); +}; diff --git a/packages/ketcher-macromolecules/src/components/shared/monomerOnCanvas/index.ts b/packages/ketcher-macromolecules/src/components/shared/monomerOnCanvas/index.ts index ba281adab1..c621e2ec4e 100644 --- a/packages/ketcher-macromolecules/src/components/shared/monomerOnCanvas/index.ts +++ b/packages/ketcher-macromolecules/src/components/shared/monomerOnCanvas/index.ts @@ -5,3 +5,5 @@ export { PhosphateAvatar } from './Phosphate'; export { RNABaseAvatar } from './RNABase'; export { UnresolvedMonomerAvatar } from './UnresolvedMonomer'; export { NucleotideAvatar } from './Nucleotide'; +export { ArrowMarker } from './ArrowMarker'; +export { SequenceStartArrow } from './SequenceStartArrow';