Notes can be useful context in a molecular model, but they can also become one more thing to manage: a note may be hard to find, visually in the way, or confused with another note that has a similar name. SAMSON’s Node Specification Language (NSL) offers a way to describe note nodes by attributes, so you can make your search more specific than “find the note somewhere in the model.”
The key detail is the attribute-space prefix: nt means the expression applies to note nodes. The note attribute space matches only note nodes, while its listed attributes are inherited from the more general node attribute space. This gives you a focused starting point when you want to query notes rather than nodes of other kinds.
Start with a name
If you know a note’s name, use the name attribute. The short form is n, and values are written in quotes:
nt.n "A"nt.n "L*"
The documentation lists both forms as examples. If you are relying on a particular interpretation of special characters in a name expression, check the broader NSL guidance rather than assuming what the asterisk means from this attribute summary alone.
Names are often the clearest way to narrow a search when several notes share the same display state. A useful habit is to make note names descriptive enough to distinguish their purpose, then use the name attribute to express that distinction in an NSL query.
Check state with readable expressions
Notes also inherit state attributes such as hidden, visible, and selected. For boolean attributes, the examples show both a positive test and its negation:
nt.handnot nt.hnt.vandnot nt.vnt.selectedandnot nt.selected
These compact expressions can make an intent easier to read: for example, “notes that are not hidden” is expressed with not nt.h. The page also lists selectionFlag and visibilityFlag, with the short forms sf and vf. Examples include nt.sf false and nt.vf false. If you need to understand how a flag relates to a note’s selected or visible state, consult the inherited node attribute documentation; this note reference identifies the attributes but does not explain their relationship.
A small syntax detail that prevents confusion
Most of the listed attributes have short names: hidden is h, name is n, selectionFlag is sf, visibilityFlag is vf, and visible is v. The selected attribute is the exception: the note attribute space does not provide the short name s. Use nt.selected rather than assuming that abbreviation applies here.
When a query does not behave as expected, check it in this order: confirm that the node type is constrained with nt; verify the attribute spelling or supported short name; and make sure any name value is in quotes. Keeping those pieces separate makes it easier to spot whether the issue is the target node type, the attribute, or the value.
For the full note attribute reference and links to related NSL material, learn more in the SAMSON documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
