In a crowded molecular scene, labels can be surprisingly easy to lose track of. A label may be hidden, not visible, selected, or simply hard to identify by name. When you need to narrow down label nodes, SAMSON’s Node Specification Language (NSL) provides a small set of label attributes that can help you describe what you’re looking for.
The key detail is that the label attribute space, abbreviated la, matches only label nodes. That makes it useful when your task is specifically about labels rather than every kind of node in the scene. For example, la.n "A" uses the label’s name attribute, while la.v checks its visible attribute.
Start with the question you’re trying to answer
Instead of treating the attributes as a list to memorize, think about the property you need to inspect:
- Is the label hidden? Use
la.h. To express the opposite, usenot la.h. - Does the label have a particular name? Use the name attribute, such as
la.n "A". The documentation also showsla.n "L*"as an example expression. - Is the label selected? Use
la.selected, or negate it withnot la.selected. - Is the label visible? Use
la.v, ornot la.v.
These examples give you a direct way to express common checks without having to reason from the label’s appearance alone. If a label is difficult to spot, a name-based expression can focus attention on the label you recognize. If you’re checking display state, the hidden and visible attributes offer separate checks.
Don’t confuse similarly named attributes
Some label attributes are related in name but remain distinct entries in the NSL reference. la.selected and la.sf are both available, as are la.v and la.vf. The documentation lists selected and visible as Boolean attributes, and gives examples such as la.sf false and la.vf false for the corresponding flags.
That distinction matters when choosing an expression: use the attribute that matches the question you mean to ask. The page identifies selectionFlag and visibilityFlag as inherited node attributes, but it does not define them as interchangeable with selected or visible. When in doubt, keep the names explicit rather than assuming one is an alias for another.
Short names can make expressions compact
Several attributes have short forms: h for hidden, n for name, sf for selectionFlag, vf for visibilityFlag, and v for visible. The selected attribute is a notable exception: in the label attribute space it has no short name. So use la.selected, not an assumed abbreviation.
A practical habit is to begin with the full attribute name while building or checking an expression, then switch to a documented short name if you prefer a more compact form. For names, put the value in quotes, as in la.n "A". For Boolean checks, the examples show both a bare attribute expression and an explicit value where applicable.
These small distinctions can make label-focused work less frustrating: first confirm that you’re querying the label attribute space, then choose the exact property—name, hidden state, visibility, or selection—that fits your task. For the complete reference and inherited-attribute details, see the SAMSON label attributes documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
