epam / ketcher

Web-based molecule sketcher
https://lifescience.opensource.epam.com/ketcher/demo.html
Apache License 2.0
463 stars 164 forks source link

Replacing bases on sugars causes wrong sequence and canvas corrution #5268

Open AlexeyGirin opened 1 month ago

AlexeyGirin commented 1 month ago

NOTE: Common problem with all types of monomers wrapped into @ symbol on sequence mode

Steps to Reproduce

  1. Go to Macromolecules mode - Sequence mode
  2. Load from file: Replecing bases on sugars causes wrong sequence and canvas corrution.zip image
  3. Select last monomer monomers (in view mode) image
  4. Go to Library - RNA tab - Sugars
  5. Click on "R" sugar On appeared dialog - click Yes image

Actual behavior Starting from that moment things starts to go wrong:

  1. Sequence disappears from the canvas rise the same dialog once again: image Click - YES
  2. Sequence appears on the canvas together with notification below: No available attachment points to establish bonds for merge. image
  3. Switch to Flex mode. Note that sequence is wrong: image

Expected behavior

  1. No second "Confirm Your Action" dialog
  2. Sequence on the flex mode: image

As per requirement:

.....4.2. If any of the selected symbols is @ (and it represents more that one monomer), modal window with a warning message should appear. Warning message: "Symbol @ can represent multiple monomers, all of them are going to be replaced. Do you want to proceed?". ..........4.2.1. "Yes" option -> all selected monomer(s) on canvas are replaced. (Images for better understanding) image Go to sequence mode, select A and @: image Click on C in the library, "Yes" in the modal window: image

Versions

Related issue - https://github.com/epam/ketcher/issues/4878

Zhirnoff commented 4 weeks ago

Tested. Bug is not fixed. Instead of three sugars, the replace function changes it to one sugar.

2024-08-15_14h31_28

Desktop:

Ketcher version [Version 2.24.0-rc.2] Indigo version [Version 1.23.0-rc.2]