Skip to content

Support for stereo-flags in macromolecules mode#9096

Draft
Copilot wants to merge 3 commits intomasterfrom
copilot/add-stereo-flags-macromolecules
Draft

Support for stereo-flags in macromolecules mode#9096
Copilot wants to merge 3 commits intomasterfrom
copilot/add-stereo-flags-macromolecules

Conversation

Copy link
Contributor

Copilot AI commented Feb 4, 2026

How the feature works? / How did you fix the issue?

Adds stereo-flag rendering (ABS, AND Enantiomer, OR Enantiomer, Mixed) in macromolecules mode. Stereo flags visible in molecules mode are now preserved and displayed when switching to macromolecules mode.

Core changes:

  • CoreStereoFlag entity: stores position, flag type, and linked monomer reference
  • StereoFlagRenderer: renders flag labels with hover/selection support
  • StereoFlagAddOperation / StereoFlagDeleteOperation: undo/redo support
  • MacromoleculesConverter: creates stereo flags from fragment enhancedStereoFlag during conversion
  • DrawingEntitiesManager: manages stereo flag lifecycle and auto-syncs selection with parent monomer

Behavior:

  • Selecting a molecule auto-selects its stereo flag
  • Stereo flags can be moved independently of their molecule
  • Moving a molecule does not automatically move its stereo flag (per requirement)

Stereo flag types

Check list

  • unit-tests written
  • e2e-tests written
  • documentation updated
  • PR name follows the pattern #1234 – issue name
  • branch name doesn't contain '#'
  • PR is linked with the issue
  • base branch (master or release/xx) is correct
  • task status changed to "Code review"
  • reviewers are notified about the pull request
Original prompt

This section details on the original issue you should resolve

<issue_title>Support for stereo-flags in macromolecules mode</issue_title>
<issue_description>Background

[This is a part of the larger story about transferring all molecules functionality to macromolecules mode.]

Currently we have stereo-flags implemented in Molecules mode and we need to support the same functionality at Macromolecules mode

Requirements
Stereo flags are the following labels appears near molecule that have stereo-isometric: ABS, AND Enantiomer, OR Enantiomer and Mixed:
Image

  1. If a stereo-flag is visible in small molecules mode canvas it should be visible in macromolecules mode canvas.

  2. If a molecule with whom the stereo-flag is associated gets selected (on macromolecules mode canvas) the stereo-flag should also get selected.

  3. The users should be able to move the stereo-flags independent of the molecule, but not the opposite.</issue_description>

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


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits February 4, 2026 11:34
- Create CoreStereoFlag drawing entity and StereoFlagRenderer
- Add stereo flag operations (add/delete)
- Integrate stereo flags in DrawingEntitiesManager
- Add stereo flag creation in MacromoleculesConverter
- Sync stereo flag selection with related monomer selection

Co-authored-by: AlexeyGirin <26869421+AlexeyGirin@users.noreply.github.com>
- Add comment explaining empty moveSelection method
- Add comment for getStereoFlagForMonomer explaining linear search is acceptable
- Add CoreStereoFlag to movement operation handling

Co-authored-by: AlexeyGirin <26869421+AlexeyGirin@users.noreply.github.com>
Copilot AI changed the title [WIP] Support stereo-flags in macromolecules mode Support for stereo-flags in macromolecules mode Feb 4, 2026
Copilot AI requested a review from AlexeyGirin February 4, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for stereo-flags in macromolecules mode

2 participants