Labels are useful for annotating a molecular scene, but they can become one more thing to manage when a model is busy: a name is hard to find, a label is hidden, or you need to focus on labels without confusing them with atoms and other nodes. SAMSON’s Node Specification Language (NSL) provides a focused way to describe label nodes by attributes such as name, visibility, and selection state.
The key detail is the attribute space: label, abbreviated la. A query beginning with la is scoped to label nodes, rather than being a general description of every kind of node in the scene. That scope makes label-specific checks easier to read and helps keep a search focused on the annotations you are trying to inspect.
Start with the label’s name
When you remember a label’s text but not where it appears in the scene, use the name attribute. Its short form is n, and the documentation shows string values in quotation marks:
la.n "A"— an example expression for a label named “A”.la.n "L*"— another documented example, using the text pattern shown there.
Keeping the value in quotes is important: the name is a string, not a Boolean value. If you are unsure how a pattern behaves for your labels, try the documented expression in your workflow and check the result against the names in the scene. This is a useful habit whenever a query depends on text: verify what it matches before relying on it to locate an annotation.
Check visibility and selection separately
For a quick visibility-oriented check, the page lists visible (short name v) and hidden (short name h). The examples are la.v, not la.v, la.h, and not la.h. These give you positive and negated forms to express the state you want to inspect.
Selection has a similar pair of listed attributes: selected and selectionFlag (short name sf). For example, the page shows la.selected, not la.selected, la.sf, and la.sf false. Notice that selected has no short name in the label attribute space, while selectionFlag does. Use the spelling that the reference specifies rather than assuming every attribute has an abbreviation.
The page also lists visibilityFlag, abbreviated vf, with examples la.vf false and la.vf. Although the names may sound related, visible and visibilityFlag are listed as separate attributes. Likewise, selected and selectionFlag are separate entries. When precision matters, choose the exact attribute you mean instead of treating similarly named properties as interchangeable.
A small, reliable workflow
- Begin with the label scope,
la, so the query is about labels. - Choose one attribute that answers the immediate question: name, visibility, or selection.
- Use the spelling and value format shown in the reference. Names are strings in quotes; the listed state values are
trueandfalse. - Inspect the result, then refine the expression if needed. Keeping each check simple makes it easier to understand why a label matched.
This approach is especially helpful when labels are easy to overlook among other scene content: first narrow the target to labels, then ask a specific question about their names or state. It also reduces guesswork around short names and similarly named attributes.
For the complete attribute list and inherited attribute details, see the SAMSON label attribute reference.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
