Chapter 03

Mouse and View Controls

This chapter describes the actual viewer behavior implemented in the current application.

Default mouse actions in MOptima

In the MOptima viewer, left-drag pans, middle-drag zooms, right-drag rotates, and left-click picks atoms.

Left mouse button

  • Left-drag on the background pans the view.
  • Left-click on an atom sends that atom to the active selection workflow.
  • In Move and Rotate, left-drag on an atom moves that atom. If it is part of the current multi-atom selection, the selected atoms move together.
  • In Move and Rotate, Ctrl+left-drag on an atom moves its entire connected molecule rigidly.

In practice, left-click is how you pick atoms for:

  • Atom editing.
  • Atom selection for grouped movement.
  • Bond editing.
  • Angle editing.
  • Torsion editing.
  • Optimization constraints.
  • Scan targets.

Middle mouse button

  • Middle-drag zooms the view in and out.

Right mouse button

  • Right-drag on the background rotates the entire view.
  • In Move and Rotate, Ctrl+right-drag on an atom rotates its entire connected molecule around its centroid.

An unmodified right-drag changes only the camera orientation. The Ctrl-modified atom gesture changes stored molecular coordinates. Completing a move or rotate does not recenter the view.

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, an optimization 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.