Editing and Selection
Source: docs/manual/06-editing-and-selection.md
Selection-driven editing
Editing in MOptima is selection-driven. You usually pick atoms in the viewer first and then apply the change from the left panel.
Common edit modes
The editor supports four modes, selectable from the Mode dropdown at the top of the Edit panel. Each mode activates once the required number of atoms have been picked in the viewer.
Atom Edit — select 1 atom
Changes the element of the selected atom. Type the element symbol (e.g. O, N, Fe) in the Symbol field and click Apply. The charge and connectivity of the surrounding structure are preserved; run Sanitize afterward if the valence becomes invalid.
Bond Edit — select 2 atoms
Sets the distance between two atoms to the value you enter. The step size for the interactive slider is 0.02 Å, covering the range 0.50 Å – 2.50 Å.
| Topology | Behavior |
|---|---|
| Acyclic bond | The fragment attached to the second atom (and everything beyond it) translates rigidly along the bond axis. The first atom stays fixed. |
| Ring bond | Both atoms move symmetrically by half the requested displacement in opposite directions, keeping the center of the bond fixed. This avoids collapsing or over-expanding the ring. |
Angle Edit — select 3 atoms
Sets the valence angle defined by atoms 1–2–3, where atom 2 is the vertex. The slider covers 0°–360° for acyclic angles and 60°–240° when all three atoms share a ring.
| Topology | Behavior |
|---|---|
| All three atoms in the same ring | The vertex atom (2) and its substituents outside the ring are translated to the new angle position while atoms 1 and 3 stay fixed. |
| Atoms 1 and 2 in the same ring | Atom 3 and its attached fragment rotate about the axis at the vertex. |
| Atoms 2 and 3 in the same ring | Atom 1 and its attached fragment rotate about the axis at the vertex in the opposite direction. |
| Fully acyclic | Atom 3 and its fragment rotate about atom 2 by the required delta. |
Torsion Edit — select 4 atoms
Sets the dihedral angle defined by atoms 1–2–3–4. The central bond is 2–3. The slider covers −180° to +180°.
| Topology | Behavior |
|---|---|
| All four atoms in the same ring | A numerical crankshaft solver distributes the angular change symmetrically across atoms 2 and 3 and their side-chain fragments. The solver iterates until the target is reached within a tight tolerance or a maximum iteration limit, after which the residual error is reported. |
| Atoms 1, 2, 3 in the same ring | Atom 4 and its fragment rotate about the 2–3 axis. |
| Atoms 2, 3, 4 in the same ring | Atom 1 and its fragment rotate about the 2–3 axis in the opposite direction. |
| Only atoms 2 and 3 in a ring | Atom 4 and its fragment rotate about the 2–3 axis. |
| Fully acyclic | The fragment containing atom 3 rotates about the 2–3 bond. |
Tip: After applying a large torsion change to a ring, the ring geometry may become strained. Run an optimization step immediately after to relieve any excess strain.
Recommended edit sequence
- Switch to the required edit mode.
- Left-click the required atoms in the viewer.
- Confirm the selected indices shown by the panel.
- Enter the new value if the mode requires one.
- Click the apply button.
Clearing selections
If the wrong atoms are selected, you an either click again to unselect it or use the clear control in the active panel before continuing.
Structure cleanup
After major edits, use cleanup-style tools such as hydrogen handling or sanitization before running energy or optimization tasks.