Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand macromolecules in micro mode #5400

Closed
svvald opened this issue Aug 29, 2024 · 1 comment · Fixed by #5607
Closed

Expand macromolecules in micro mode #5400

svvald opened this issue Aug 29, 2024 · 1 comment · Fixed by #5607
Assignees
Labels
feature request Test Cases Written Test cases has been written for that issue

Comments

@svvald
Copy link
Collaborator

svvald commented Aug 29, 2024

Currently upon switching from polymer editor to micromolecules mode while having some monomers on the canvas leads to the quite limited user experience – monomers are displayed as their aliases, their structure can only be seen in the preview while hovering over it.

The purpose of this feature is to allow user to expand macromolecules in micromolecules mode similar to functional groups in order to have the exact structure on the canvas and manipulate it.

  1. "Expand monomer" option should be present in the context menu on right-click over the monomer:
image
  1. Clicking on expand option should replace monomer abbreviation with its structure atoms and bonds grouped together. Monomer's structure bounding box should be centered by the previously collapsed monomer position. Editing is forbidden for the expanded monomer – no atoms or bonds can be added/removed to the expanded monomer structure. Square brackets shouldn't be present for expanded monomers as there is another scientific meaning but monomer label should persist (similar to data s-groups now).
image
  1. While expanding a monomer positioned within a chain, all atoms which are connected directly or via other atoms to the monomer going to be expanded have to be moved along their direction by the half-size of the expanded monomer's bounding box.
    Expanding multiple monomers should be possible – the aforementioned algorithm should be applied for the rest of the chain as well as for the already expanded monomers. While expanding multiple monomers, top-most and left-most monomer should be processed first during adjacent structures repositionig and then every monomer consequently in left-to-right, top-to-bottom order. Calculations have to be accumulated and all expansions rendered only once.

  2. "Collapse monomer" option should be present in the right-click context menu over the expanded monomer structure.
    While clicked, the monomer contracts back to its label on the canvas, contracted label position should be placed in the center of structure's bounding box and then all atoms which are connected to it should be moved back to their initial positions if needed by reversing the previously mentioned algorithm of chain movement.

  3. Expanding ambiguous monomer shouldn't be possible to expand
    image

As a side note – also make macromolecules abbreviations and their bonds in micromolecules mode movable as now they're static and can only be viewed or deleted. Expanded monomers are able to be moved across canvas as well.

@svvald svvald added this to the Ketcher 2.26.0-rc.1 milestone Aug 29, 2024
@svvald svvald added the draft label Aug 29, 2024
@svvald svvald removed the draft label Sep 8, 2024
@Zhirnoff Zhirnoff added the Test Cases Written Test cases has been written for that issue label Sep 19, 2024
@svvald svvald linked a pull request Sep 30, 2024 that will close this issue
9 tasks
svvald added a commit that referenced this issue Oct 1, 2024
svvald added a commit that referenced this issue Oct 2, 2024
svvald added a commit that referenced this issue Oct 2, 2024
* #5400 – Expand macromolecules in micro mode

* #5400 – Fix build and ui tests

* #5400 – Fix two more ui tests
@Zhirnoff
Copy link
Collaborator

Zhirnoff commented Oct 8, 2024

Tested. There are many bugs introduced.

Desktop:

  • OS: Windows 11
  • Browser Chrome
  • Version 128.0.6613.120 (Official Build) (64-bit)

Ketcher version
[Version 2.26.0-rc.1]
Indigo version
[Version 1.25.0-rc.1]

Guch1g0v pushed a commit that referenced this issue Oct 17, 2024
* #5400 – Fix build and ui tests

* #5400 – Fix two more ui tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Test Cases Written Test cases has been written for that issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants