Mouse and View Controls
Source: docs/manual/03-mouse-and-view-controls.md
This chapter describes the actual viewer behavior implemented in the current application.
Default mouse actions in MOptima
Left mouse button
- Left-drag rotates the 3D structure.
- Left-click on an atom sends that atom to the active selection workflow.
In practice, left-click is how you pick atoms for:
- Atom editing.
- Bond editing.
- Angle editing.
- Torsion editing.
- Optimization constraints.
- Scan targets.
Middle mouse button
- Middle-drag also rotates the 3D structure.
This is not the stock NGL behavior. MOptima explicitly remaps the middle-button drag action to the same rotate behavior as the left button.
Right mouse button
- Right-drag pans the view.
Use this when the molecule is off-center and you want to shift the viewport without changing the viewing angle.
Mouse wheel
- Mouse wheel zooms in and out.
Use the wheel for quick scale changes before fine positioning with rotate or pan.
Important behavior differences from generic 3D viewers
MOptima disables some default left-click centering actions from the underlying viewer. That means:
- A left click does not automatically recenter the view.
- A double left click does not automatically recenter the view.
This is intentional. In MOptima, left click is reserved for atom picking so the editor and task panels receive the correct atom indices.
Hover behavior
When the pointer moves over an atom, the viewer can show a small tooltip with:
- The atom element.
- The internal atom index.
This is useful when you need to confirm exactly which atom you are selecting for an edit, a constraint, or a scan definition.
Practical recommendations
For editing
- Rotate the molecule until the target atoms are visible.
- Use zoom to separate crowded regions.
- Pan only if the target moves near the edge of the viewer.
- Left-click atoms in the required order.
For scans and constrained optimization
- Rotate first.
- Zoom until the relevant bond or angle is visually clear.
- Left-click the atoms in the exact sequence requested by the panel.
When selection feels wrong
If the wrong atom is being selected:
- Zoom in further.
- Rotate to reduce overlap.
- Hover first to read the atom index.
- Click again only after the target atom is clearly isolated.