Skip to content

#3449 Bond length become wrong after Arrange as a Ring option applied#3458

Merged
AlexanderSavelyev merged 10 commits intomasterfrom
copilot/fix-bond-length-issue-again
Mar 23, 2026
Merged

#3449 Bond length become wrong after Arrange as a Ring option applied#3458
AlexanderSavelyev merged 10 commits intomasterfrom
copilot/fix-bond-length-issue-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 23, 2026

Macromolecule sequence layouts with Arrange as a Ring could compress tail bond lengths below the standard monomer size when part of the structure is fixed. This update keeps tail bond lengths consistent with the monomer bond length during positional calculations.

  • Layout scaling: apply monomer bond length when calculating new positions for sequence-layout selections with fixed components.
  • Sequence layout stability: preserve consistent spacing for tail monomers adjacent to arranged rings.

Example:

if (sequence_layout && _n_fixed > 0)
{
    length = LayoutOptions::DEFAULT_MONOMER_BOND_LENGTH;
}

Generic request

  • PR name follows the pattern #1234 – issue name
  • branch name does not contain '#'
  • base branch (master or release/xx) is correct
  • PR is linked with the issue
  • task status changed to "Code review"
  • code follows product standards
  • regression tests updated

For release/xx branch

  • backmerge to master (or newer release/xx) branch is created

Optional

  • unit-tests written
  • documentation updated
Original prompt

This section details on the original issue you should resolve

<issue_title>Bond length become wrong after Arrange as a Ring option applied</issue_title>
<issue_description>Steps to Reproduce

  1. Open Macromolecules mode - Flex canvas (clean canvas)
  2. Load following HELM: PEPTIDE1{C.C.C.C.C.C.C.C.C.C.C.C.C}$PEPTIDE1,PEPTIDE1,5:R3-8:R3$$$V2.0
Image
  1. Select ring and right tail of the chain
Image
  1. Call context menu and click Arrange as a Ring option

Actual behavior
System layout monomer in the ring as expected but distance (e.g. bond length) between monomer in the tail is less than standard monomer size
Image

Expected behavior
System layout monomer in the ring as expected, distance (e.g. bond length) between monomer has the same standard length
Image

Related issue: epam/ketcher#8363

Environment details:

  • Ketcher Version 3.12.0-rc.1 Build at 2026-01-08; 17:35:48
  • Indigo Version 1.40.0-rc.1.0-g63d8f2068-wasm32-wasm-clang-19.0.0
  • Chrome Version 143.0.7499.170 (Official Build) (64-bit)
  • Win10</issue_description>

<agent_instructions>All changes should be formated in black way</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 23, 2026 07:29
Co-authored-by: AlexeyGirin <26869421+AlexeyGirin@users.noreply.github.com>
Co-authored-by: AlexeyGirin <26869421+AlexeyGirin@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix bond length after applying Arrange as a Ring option Bond length preserved after Arrange as a Ring Jan 23, 2026
Copilot AI requested a review from AlexeyGirin January 23, 2026 07:34
@AlexeyGirin AlexeyGirin marked this pull request as ready for review January 23, 2026 08:57
Nikolai Balabanov added 2 commits February 26, 2026 22:28
…M peptides

- Added support for consistent bond lengths when laying out HELM peptides with rings and tails.
- Introduced new methods for selecting and unselecting atoms in the Indigo API.
- Updated layout calculations to ensure that bond lengths are uniform across linear and cyclic structures.
- Added comprehensive tests to validate bond length consistency across various layout scenarios.

Signed-off-by: Nikolai Balabanov <Nikolai.Balabanov@epam.com>
@NikolaiBalabanov NikolaiBalabanov self-assigned this Feb 27, 2026
…passed.

Signed-off-by: Nikolai Balabanov <Nikolai_Balabanov@epam.com>
@NikolaiBalabanov NikolaiBalabanov force-pushed the copilot/fix-bond-length-issue-again branch from ea63bd7 to c0e425b Compare February 27, 2026 19:13
Signed-off-by: Nikolai Balabanov <Nikolai_Balabanov@epam.com>
@NikolaiBalabanov NikolaiBalabanov changed the title Bond length preserved after Arrange as a Ring #3449 Bond length become wrong after Arrange as a Ring option applied Mar 18, 2026
@AlexanderSavelyev AlexanderSavelyev merged commit 1c0432d into master Mar 23, 2026
62 checks passed
@AlexanderSavelyev AlexanderSavelyev deleted the copilot/fix-bond-length-issue-again branch March 23, 2026 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bond length become wrong after Arrange as a Ring option applied

4 participants