Chapter 03

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

In the MOptima viewer, left-drag rotates, middle-drag also rotates, right-drag pans, and the mouse wheel zooms.

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.

Hovering over an atom can reveal its element label and internal atom index before you click.

Practical recommendations

For editing

  1. Rotate the molecule until the target atoms are visible.
  2. Use zoom to separate crowded regions.
  3. Pan only if the target moves near the edge of the viewer.
  4. Left-click atoms in the required order.

For scans and constrained optimization

  1. Rotate first.
  2. Zoom until the relevant bond or angle is visually clear.
  3. Left-click the atoms in the exact sequence requested by the panel.

When selection feels wrong

If the wrong atom is being selected:

  1. Zoom in further.
  2. Rotate to reduce overlap.
  3. Hover first to read the atom index.
  4. Click again only after the target atom is clearly isolated.