epam / ketcher

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

The shortest path is not always chosen, when dragging a vertical side-chain connection between monomers #4992

Open ViktoriaTkacheva opened 3 months ago

ViktoriaTkacheva commented 3 months ago

Steps to Reproduce

  1. Switch to the Macro mode – the Snake mode
  2. Open this file bases R2-R2.zip
  3. Drag a vertical side-chain connection between bases

Actual behavior A side-chain connection is dragged not the shortest path (reproduced periodically, but not every time). The same behavior is observed in the peptides

image image

Expected behavior A side-chain connection is dragged to the shortest path

Screenshots

https://github.com/epam/ketcher/assets/139227567/14c72628-795c-4aa7-975e-5a71d8e24ede

As per requirements:

  1. If two side-chain connected monomers are from different rows, the connection curve should go from topmost monomer upside down and left to right (or right to left) using free space between monomers. The shortest path should be used when possible.

Desktop (please complete the following information):

Ketcher version 2.23.0-rc.1, Build at 2024-07-02; 09:03:38

Issue found while testing https://github.com/epam/ketcher/issues/3532