For molecular modelers working on complex systems, clarity is everything. Whether you’re annotating molecular designs with notes, organizing structures, or filtering selected models, keeping track of visual and logical markers can become overwhelming. That’s where the note attributes in SAMSON’s Node Specification Language (NSL) can significantly help.
In this article, we focus on how to use note attributes in NSL to customize the behavior and appearance of note nodes—those helpful metadata elements that let you mark, label, and organize elements in your molecular design efficiently.
Understanding the nt Attribute Space
In SAMSON, note-specific attributes are grouped under the note attribute space, abbreviated as nt. That means every time you’re targeting a note node, your code should begin with nt. followed by the attribute name or its short form.
Here are the most useful attributes for managing notes and how they can help you:
1. nt.hidden (h)
Use this to determine whether a note is hidden or visible in the workspace. For example, to find hidden notes, write:
|
1 |
nt.h |
To do the opposite (only visible notes):
|
1 |
not nt.h |
2. nt.name (n)
Filter notes by name, using wildcards for flexible selection. For example, to select notes starting with “L”:
|
1 |
nt.n "L*" |
This is especially handy when organizing labels across protein chains or molecules.
3. nt.selected
This identifies whether a note is currently selected. Selection operations become straightforward when you combine this attribute with others. For instance, to find all notes that are selected:
|
1 |
nt.selected |
And if you’re trying to exclude selected notes:
|
1 |
not nt.selected |
4. nt.selectionFlag (sf)
This is different from selected. Using this flag gives you a way to manipulate notes based on whether they are flagged for future selection operations, not necessarily selected right now.
Example: To find notes not set with the selection flag:
|
1 |
nt.sf false |
5. nt.visibilityFlag (vf)
This controls whether the visibility of a note can be toggled. If you’re designing a dynamic workflow and want to allow or restrict visibility changes for certain annotations, this parameter matters.
Example: To focus on notes whose visibility can’t be toggled:
|
1 |
nt.vf false |
6. nt.visible (v)
This is an actual state flag saying whether the note is currently shown in your workspace. If you want to view only visible note nodes, you can write:
|
1 |
nt.v |
And to exclude notes that are visible:
|
1 |
not nt.v |
Why This Matters
For modelers collaborating on large biomolecular designs or fine-tuning simulation inputs, being able to filter, search, and manipulate notes is essential. For example, if you’re labeling key residues, active sites, or binding pockets, you don’t want to waste time scrolling through all notes. Instead, with simple queries like nt.n "*active*" and nt.v, you can isolate only the annotations that matter right now and see them immediately.
As small as this feature might seem, it’s often the difference between a smooth modeling session and one cluttered with unnecessary elements. Combining visibility, naming, and selection criteria helps you make the interface as clean and focused as your science.
To learn more, visit the official documentation page.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
