epam / ketcher

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

Establishing connection between ambiguous sugar and phosphates works wrong (and other monomers) #5743

Open AlexeyGirin opened 1 month ago

AlexeyGirin commented 1 month ago

Steps to Reproduce

  1. Toggle to Macro - Flex

  2. Load using paste from clipboard way following HELM: RNA1{([25d3r],[25mo3r])(A)P}|RNA2{([25d3r],[25mo3r])(A)P}$$$$V2.0 image image

  3. Try to connect ambiguous sugar with phosphate using center to center way or ph(R2) to center way or sg(R1) to center way

Actual behavior

  1. Attachment points are not shown image image image image

  2. In case of center-to-center way - Select Connection point dialog appears image

Expected behavior

  1. Attachment points are shown
  2. Select Connection point dialog doesn't appear - connection rules for phosphates and sugars applied (i.e. ph(R2)-sg(R1) connection establishes by default)

As per requirements:

6.2. If a variant monomer is a base, all rules for establishing bonds with bases are followed. The same logic for all other types.

Versions

Reference issues: https://github.com/epam/Indigo/issues/2188, https://github.com/epam/ketcher/issues/4554