Find the Right Note Without Losing Your Place in a Molecular Scene

In a busy molecular model, notes can be easy to overlook. A scene may contain several annotations, and the one you need might be hidden, hard to distinguish by name, or mixed in with other node types. SAMSON’s Node Specification Language (NSL) provides a focused way to search note nodes by attributes, so you can narrow your attention without relying only on visual scanning.

Start by limiting the search to notes

The note attribute space has the short name nt and matches only note nodes. That gives you a useful starting point: when you are trying to inspect or manage annotations, use the note-specific prefix rather than searching across every kind of node. For example, nt.n "A" is a documented expression for using a note’s name in a search.

Names are supplied as quoted strings. The reference also shows nt.n "L*" as an example. When you build your own expressions, preserve the quotation marks around the name value; they are part of the documented syntax.

Check visibility when a note seems to be missing

If an annotation is not apparent in the scene, visibility-related attributes can help you identify notes by their state. The note space inherits hidden and visible from the general node attributes. Their short forms are h and v, respectively. The reference gives these examples:

  • nt.h and not nt.h
  • nt.v and not nt.v

These expressions let you frame a search around hidden or visible notes. The attributes are separate, so it is useful to check the one that matches the question you are asking rather than treating the terms as interchangeable.

Use names and state as small search clues

When you know only part of what you are looking for, make a short checklist before searching: Is it a note? Do you remember its name? Is its visibility relevant? Is it selected? Starting with one attribute at a time can make the search easier to reason about, especially when you are learning the syntax or checking why an expression returns an unexpected set of nodes.

For selection-related searches, the note attributes include both selected and selectionFlag. The reference shows nt.selected and not nt.selected; it also shows nt.sf and nt.sf false for the selection flag. One detail worth remembering: selected does not have the short name s in the note attribute space, while selectionFlag does have the short name sf. If a query using a familiar abbreviation is not working, spelling out the attribute can prevent confusion.

A practical way to build confidence

Begin with a note-specific expression, then add a clue you can verify—such as a known name or a visibility state. Compare the result with what you see in the scene. If the result is broader or narrower than expected, check the attribute prefix, the spelling of the attribute, and whether a name is quoted. Keeping expressions simple while troubleshooting makes it clearer which condition is responsible.

Note attributes are inherited from the general node attribute space, so their detailed behavior is described in the node reference. For the complete note attribute list and examples, see the SAMSON note attributes documentation.

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

Comments are closed.