Find the right note without losing track of your query

When a molecular scene contains many annotations, finding the note you need can become a small but persistent distraction. A useful first step is to make the search criterion explicit: are you looking for a note by name, or for one with a particular visibility or selection state? In SAMSON’s Node Specification Language (NSL), note-specific queries use the note attribute space, abbreviated nt. This space matches only note nodes.

That scope is valuable when you want to work with annotations rather than search across node types generally. For example, nt.n "A" expresses a query using a note’s name, while nt.v expresses one using its visibility. The namespace prefix makes the intent apparent when you revisit an expression later: it is a note query, not an unspecified search.

Start with a single, readable condition

If you are unsure why a query is or is not matching the notes you expect, begin with one attribute. The documented examples show boolean attributes in two forms: a bare attribute, such as nt.v, and its negated form, such as not nt.v. The same pattern is documented for hidden and selected: nt.h and not nt.h, or nt.selected and not nt.selected.

Keeping a query simple makes it easier to check what you have asked for before adding other conditions. For a name-based query, the reference gives nt.n "A" and nt.n "L*" as examples. Names are written in quotes. Use the forms shown in the reference rather than assuming that an unquoted name or a different spelling will be interpreted in the same way.

Know which attribute you are using

The note attribute space includes attributes inherited from the general node space. The reference lists hidden (h), name (n), selected, selectionFlag (sf), visibilityFlag (vf), and visible (v). Each boolean attribute accepts true or false; the examples include explicit forms such as nt.sf false and nt.vf false.

One detail that is easy to overlook: selected is available as nt.selected, but the note reference says it does not have the short name s. By contrast, the table gives short names for the other listed attributes. If you are writing a query from memory, using the full name for selection is a clear way to avoid that particular abbreviation trap.

The page identifies selectionFlag, visibilityFlag, visible, and hidden as distinct attributes. Their descriptions point to the inherited node attributes, so treat them as separate documented names rather than interchangeable labels. When a query does not express the condition you intended, check the attribute name and whether you used its full name or supported short name.

A practical habit is to keep a few small expressions nearby: nt.n "A" for a name-based query, nt.v or not nt.v for visibility, and nt.selected or not nt.selected for selection. These are examples from the reference, not a complete query-building guide, but they provide a clear starting point for note-focused filtering.

For the complete attribute list and inherited-attribute references, see the SAMSON note attributes documentation.

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

Comments are closed.