Skip to content

Bond length preserved after Arrange as a Ring#3458

Open
Copilot wants to merge 3 commits intomasterfrom
copilot/fix-bond-length-issue-again
Open

Bond length preserved after Arrange as a Ring#3458
Copilot wants to merge 3 commits intomasterfrom
copilot/fix-bond-length-issue-again

Conversation

Copy link
Contributor

Copilot AI commented Jan 23, 2026

Remove-me-section

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

Backmerge request

  • PR name follows the pattern Backmerge: #1234 – issue name
  • PR is linked with the issue
  • base branch (master or release/xx) is correct
  • code contains only backmerge changes

Bump request

  • PR name follows the pattern Bump version to ...
  • add brackets [ ] for 'skip ci' and put it into the body
  • milestone is linked to PR
  • all tickets are closed inside the relevant milestone
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
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

2 participants