Skip to content

Edit all instances of the monomer - Editing monomers from molecules mode in the monomer creation wizard #8923

@ljubica-milovic

Description

@ljubica-milovic

Background

In this ticket users will be finally able to interact with monomers that already exist in the library.
For monomers on small molecules canvas users will have a choice:

  • "Edit Instance"
  • "Edit All Instances"

Requirements

$\color{Red}{\textbf{Context menu for monomers on micromolecules canvas}}$

$\color{Pink}{\textbf{New options in the context menu}}$

❗ The requirements for this section contained in a separate ticket. ❗

$\color{Pink}{\textbf{"Edit monomer" window}}$

❗ The requirements for this section contained in a separate ticket. ❗


$\color{Red}{\textbf{Editing only one instance of the monomer}}$

❗ The requirements for this section contained in a separate ticket. ❗


$\color{Red}{\textbf{Edit all instances of the monomer}}$

3.1. When the wizard is opened using "Edit All Instances", the monomer should be loaded into it with all properties unchanged.

3.2. If the monomer being loaded into the wizard is a sugar, base, or phosphate that participates in a preset, upon loading into the wizard, the user should get an warning message in the error/warning area: "The edited version of the monomer must be the same monomer type and must have attachment point [union of all necessary APs], because the monomer participates in a preset.". The message can be dismissed by clicking on OK.

3.3. If the user changes the monomer type and/or removes necessary attachment points for a monomer that participates in a preset, when clicking on Submit one and only one error message should appear in the error/warning area: "The changes made to the monomer prevent it from participating in a preset. The monomer must be a [type] and contain [union of all necessary APs] attachment points." that can be dismissed by clicking OK. Saving is prohibited.

Expand for an example

The user tries to edit sugar Ribose (R).
Ribose participates in 8 default presets as of 3.8.
In 7 of them APs R2 and R3 are used and in one of them AP R3 is used.
The intersection of the APs is R2 and R3, so the warning message should read: "The edited version of the monomer must have the same monomer type and must have attachment point R2 and R3, because the monomer participates in a preset."

If the user deletes one of the necessary APs, or changes the monomer type to something other than Sugar, and tries to Submit, they get only one error message (even if there are other issues with the monomer and its properties): "The changes made to the monomer prevent it from participating in a preset. The monomer must be a sugar and contain R2 and R3 attachment points."

3.4. If the user changes the monomer type and/or the monomer code and saves that monomer, all instances of that monomer on canvas get replaced with a new version*, the new monomer is added to the library and the old library monomer remains visible/usable.

3.4.1. `* The new monomer version should include all properties that were visible to the user in the attributes panel, but shouldn't include IDT and AxoLabs aliases that were loaded in the wizard.

3.5. If the user doesn't change the monomer code and type and saves that monomer, all instances of that monomer on canvas get replaced with a new version, the new monomer is added to the library replacing the previous version of that monomer in the library (default version of the monomer is "hidden").

Expand for examples and an explanation

If the user modifies alanine, and changes the structure and name, all alanines on canvas are replaced with the new version, and the new alanine replaces the default alanine in the library.

If the user modifies an alanine, and changes the type from Amino acid to CHEM, all alanines on canvas are replaced with the new version, new CHEM alanine is added to the library, but the old alanine is still visible.

There needs to be a way of differentiating between monomers that are completely new and not related to other monomers in the library, and monomers who are modifications of default monomers. Type+code is chosen to be that identifier.
If a monomer shares the same type and code with a default library monomer, it is considered to be an "edited monomer".
If a monomer doesn't exist in the default library, and does not share a type and symbol with a default library monomer, it is considered a "user-made monomer".

[ ⚠️ If the autorecognition ticket was implemented before this one ⚠️ ] 3.6. If the monomer creation wizard is entered by clicking on "Edit All Instances", the duplicates/autorecognition section of the attributes panel shouldn't be present until a structure, APs or type are changed.


$\color{Red}{\textbf{Deleting/modifying of an AP that participates in bonds on canvas}}$

❗ The requirements for this section contained in a separate ticket. ❗


$\color{Red}{\textbf{Select expanded monomer and enter the wizard}}$

❗ The requirements for this section contained in a separate ticket. ❗


$\color{Red}{\textbf{New options on library cards}}$

$\color{Pink}{\textbf{Reverting to the default monomer}}$

❗ The requirements for this section contained in a separate ticket. ❗

$\color{Pink}{\textbf{Deleting the monomer in the library}}$

❗ The requirements for this section contained in a separate ticket. ❗


UX

TBD

Metadata

Metadata

No fields configured for Feature.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions