When working on complex molecular models in SAMSON, clarity can make the difference between insight and confusion. Many users add notes to annotate their work, remind themselves of structural changes, or share insights with collaborators. But what happens when the screen becomes cluttered with these annotations? Or when you’re just trying to focus on part of a model and avoid distractions?
Luckily, the Node Specification Language (NSL) in SAMSON offers a smart and flexible way to filter and manage notes. In this post, we focus on the powerful yet often underused nt (short for note) attribute space in NSL, and how it helps you tidy up your view by controlling the visibility and selection of note nodes.
Why Manage Notes This Way?
Imagine analyzing a biomolecular complex with annotations scattered across several chains. Some of these are outdated, others are for internal documentation. Repeatedly toggling their visibility manually can be cumbersome. NSL provides a more effective way.
Accessing Notes with NSL
All note attributes are accessed via the short prefix nt. For example:
nt.vrefers to the visibility of note nodes.nt.hrefers to whether they are hidden, another visibility control.nt.selecteddetermines whether a note is selected.
This syntax leverages a centralized language to control objects in your scene, using criteria that can be combined with logical operations. Here’s what you can do.
Common Scenarios
1. Hide All Notes
If you want to hide every note in a model:
|
1 |
not nt.v |
This expression selects all note nodes that are not visible. You may then apply commands or change their state.
2. Show Only Specific Notes
Suppose you only want to show notes starting with “A”:
|
1 |
nt.n "A*" |
Here, nt.n refers to the name attribute, and the wildcard * matches anything that follows “A”. You’ll only get notes that match that name pattern.
3. Select Notes That Are Currently Hidden
Select notes that are not visible but are still in the document:
|
1 |
nt.h true |
This is useful if you want to batch-modify or remove hidden annotations.
Behind the Scenes: Attribute Inheritance
NSL note attributes are inherited from the general node attribute space. That means if you’re already familiar with expressions like n.v or n.sf (for selection flag), you’re already halfway there.
But there are subtle differences. For example:
nt.selectedexists but doesn’t have a short name, unlike its node version (s).
Optimizing Your Workflow
By using these attributes in the nt space for notes, you can cut down time searching, deleting, or toggling visibility manually. It also makes scripting and automation in SAMSON much more powerful—freeing you to focus on your structural insights.
To learn more and explore all available note-related attributes, check the official documentation here: https://documentation.samson-connect.net/users/latest/nsl/note/.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.
