Find the note you need: a practical guide to SAMSON’s note attributes

When a molecular scene gets busy, notes can be easy to overlook—or hard to distinguish from other nodes. A label may be hidden, a note may be selected, or its name may be the only clue you remember. SAMSON’s Node Specification Language (NSL) provides a compact way to describe note nodes using their attributes, so you can make a focused query instead of relying only on visual inspection.

The key starting point is the note attribute space. Its short name is nt, and it matches only note nodes. That makes it useful when your goal is specifically to find or inspect notes rather than nodes in general. Note attributes inherit several properties from the broader node attribute space, including name, visibility, hidden state, and selection-related attributes.

Start with the note’s name

If you know all or part of a note’s name, use the name attribute. Its short form is n, and values are written in quotes:

  • nt.n "A"
  • nt.n "L*"

Names are often the most direct way to narrow your search when notes describe different regions, steps, or observations in a model. The examples show that a quoted string can include a wildcard character. If you are unsure of the exact name, using a distinctive fragment can be a helpful starting point; then check the result in context before acting on it.

Separate visibility from hidden state

Visibility-related attributes give you another way to investigate notes. The short name for visible is v. These expressions test for visible and not-visible notes:

  • nt.v
  • not nt.v

The inherited hidden attribute has the short name h, and can also be queried with either form:

  • nt.h
  • not nt.h

These are separate attributes in the reference, so treat them as distinct checks rather than assuming one is simply another spelling of the other. When a note seems to be missing from the view, checking its visibility-related state can help you investigate without changing the note or its content.

Check selection-related state carefully

NSL lists both selected and selectionFlag. For notes, selected is written as nt.selected (or not nt.selected); unlike the node attribute space, it has no short name in the note space. selectionFlag does have the short name sf, with examples nt.sf and nt.sf false.

The page also lists visibilityFlag, abbreviated vf, with examples nt.vf and nt.vf false. Keeping these names distinct matters: selected, selectionFlag, visible, and visibilityFlag are separate attributes in the reference. Use the attribute that matches the state you intend to inspect, rather than substituting one because its name sounds similar.

A small query checklist

  1. Begin with nt to target note nodes.
  2. Use nt.n "..." when you have a name or useful name fragment.
  3. Use nt.v or not nt.v to check visibility, and nt.h or not nt.h to check hidden state.
  4. For selection-related checks, remember that the note-specific spelling is nt.selected, while nt.sf refers to selectionFlag.

This approach turns a vague search—“Where did that note go?”—into a set of small, explicit checks. It is especially useful when you want to narrow attention to notes by name or inspect their state without confusing note attributes with similarly named attributes elsewhere.

For the complete attribute reference, see the SAMSON note attributes documentation.

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

Comments are closed.