When working with complex molecular systems, it’s common for modelers to annotate molecular structures with notes. These notes — whether they store important observations, references, or just simple labels — can significantly improve the readability and collaboration potential of a project. But in large and detailed models, an overload of visible notes can clutter your workspace and make the visual analysis harder than it needs to be.
This is where the visibility control capabilities of the Node Specification Language (NSL) in SAMSON come in handy. SAMSON allows users to programmatically filter and modify elements in a molecular system using a simple, readable query language. In particular, when it comes to note nodes, NSL provides a focused set of attributes that let you target, show, and hide notes with precision.
Understanding Visibility Attributes for Notes
All note-related attributes belong to the note attribute space (short name: nt). To manage which notes are visible or hidden in your scene, the most relevant attributes are:
nt.v— specifically checks the visibility of the note node.nt.vf— the visibilityFlag, a lower-level flag that contributes to the effective visibility.nt.h— reflects whether a note is hidden (even if it exists in the system).
For example, to select all the notes that are currently visible, you can use:
|
1 |
nt.v |
To find all notes that are hidden:
|
1 |
not nt.v |
To show all hidden notes again (assuming you want to change their state), you can use NSL in combination with other SAMSON scripting features to set their visible or visibilityFlag attributes to true.
Why It Matters
Imagine you’re presenting your model to collaborators or preparing for a publication. Too many visible notes may obstruct the geometry, bonds, or surfaces you want to highlight. Or perhaps you’d like to review only the notes you’ve just marked as relevant. NSL gives you fast and flexible access to exactly what you need to see — and hide the rest.
Real-world use cases include:
- Temporarily removing all annotations for a clean screenshot.
- Filtering only notes that match a naming pattern — for example, using
nt.n "Ref*"to show only reference details. - Quickly revealing hidden notes during debugging and testing of molecular workflows.
By combining these visibility queries with saved selections or custom scripts, you can tailor the modeling environment to your exact needs — reducing visual noise and increasing productivity.
To learn more about all available note attributes and their usage in NSL, visit the official documentation page: https://documentation.samson-connect.net/users/latest/nsl/note/
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
