Keep molecular labels readable as you zoom, select, and present

A molecular view can be scientifically accurate and still be hard to read. Atom names may crowd the structure when you zoom out, while labels for larger groups can obscure the details you need when you zoom in. The problem is not simply how many labels you add: it is whether the right labels are visible at the right scale, and whether they stay out of the way.

SAMSON labels are document nodes that display text in the Viewport. They can show node names, descriptions, or measurements, and they are saved when you save a document as a .sam or .samx file. A useful way to work with them is to treat labeling as part of preparing a view: choose the structural level, tune visibility, and then adjust appearance and position.

Start at the right structural level

Before adding labels, decide what a viewer needs to identify. For a broad overview, labels on molecules or groups may be more useful than labels on every atom. For a close-up, residue or atom labels may help pinpoint a feature. In SAMSON, the context toolbar offers Add label for one label on the directly selected group, or Add label to… to choose node types, including descendants such as residues.

If you add labels in the Viewport, activate the Label editor from the left-side menu or use Ctrl+L on Windows or Cmd+L on macOS. The selection filter determines which node type receives the label. For instance, a filter set to Residues targets residues, while Atoms and bonds targets atoms or bonds. Checking the filter before labeling can prevent the common frustration of adding text at a different structural level than intended.

Let zoom guide what is shown

Labels change visibility progressively as you zoom. Labels for smaller nodes, such as atoms, start to disappear as you zoom out; labels for larger nodes, such as molecules, can become visible. This helps avoid presenting every label at once, but the default display ranges may not suit every scene.

To tune a label’s range, select it and open the Inspector. Adjust its minimum and maximum display radii to control when it appears and disappears. A practical approach is to set the view at the scale where the label matters, then adjust the range so it is available there without remaining visible at scales where it adds clutter. Test both zoomed-in and zoomed-out views after changing the settings.

Labels change visibility as the Viewport zoom level changes

You can also turn individual labels on or off in the Document view by ticking or unticking them. This is useful when comparing a clean overview with a more detailed view, without deleting labels that may be useful later.

Make the text legible, not dominant

For a consistent look, set the default font in Preferences > Rendering > Labels. These preferences also let you change the number of decimal places used for angles and distances shown in measurement labels. If only one label or a selected group needs different typography, select those labels and choose a font in the Inspector. To return selected labels to the preference default, double-click Font in the Inspector.

Color can help distinguish labels, but it is worth using it deliberately: for example, to separate categories of information rather than simply make every label stand out. Set a constant color through the label’s context toolbar, the Visualization color controls, or the Inspector. You can reset the color to its default, and adjust label transparency in the Inspector as well.

Examples of labels using different fonts

Move labels when they compete with the structure

New labels are placed at the geometric center of their nodes and lie in the Viewport plane. If text overlaps another label or an important feature, select the label and change its viewport offset in the Inspector. Alternatively, set the selection filter to Labels and use a Move editor, such as the Displace editor (shortcut D). You can also select a label in the Document view and move it with a Move editor.

When selecting labels directly in the Viewport, first set the selection filter to Labels. Only visible labels can be selected this way. Remember to switch the filter back before selecting other kinds of nodes; otherwise, the Viewport will keep targeting labels.

Move a label with the Displace editor

A simple review before sharing a molecular view: check the selection level, inspect the image at more than one zoom level, hide labels that are not needed, and reposition any that cover important features. For more details, see the SAMSON labeling documentation.

Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.

Comments are closed.