-
Notifications
You must be signed in to change notification settings - Fork 123
Sequential application of “Create cyclic structure” to different segments of one chain leads to overlapping and distorted topology #3329
Description
Description:
When “Create cyclic structure” is applied sequentially to different fragments of the same polymer chain, the layout algorithm behaves incorrectly.
Instead of generating separate cyclic substructures within each selected fragment, system creates overlapping, cross-linked, and distorted regions.
This leads to visual and logical corruption of the chain (bonds between unrelated nodes, overlaps, broken geometry).
Steps to Reproduce
- Open Macromolecules → Flex mode.
- Open chain. ketcher (46).zip
- Select a small fragment of this chain.
- Right-click → Create cyclic structure → observe that the local cycle is created correctly.
- Select another segment of the same chain (not previously closed).
- Again choose Create cyclic structure.
- Observe that the new layout overlaps previous parts, bonds cross between cycles, and geometry is broken.
Actual behavior
Each new cyclic layout modifies not only the selected region but also distorts previously formed cyclic areas.
The resulting macromolecule becomes tangled, with improper bonds and overlapped monomers.
Visual representation and connectivity become inconsistent.
Expected behavior
The “Create cyclic structure” operation should only affect one continuous, non-overlapping fragment at a time.
The rest of the structure must remain unchanged.
No new cross-bonds or overlaps should appear between previously cycled and non-cycled segments.
Video
2025-11-05_11h44_16.mp4
Desktop:
- OS: Windows 11
- Browser Chrome
Version 141.0.7390.108 (Official Build) (64-bit)
Ketcher version
[Version 3.10.0-rc.1]
Indigo version
[Version 1.38.0-rc.1]
This bug was found while testing: epam/ketcher#7970