When working with complex molecular systems, clarity is essential. Modelers often juggle large graphs with nested structures, annotations, and auxiliary nodes like notes. In SAMSON, the integrative platform for molecular design, note nodes can be used to organize, label, and structure your workflow. But what if these notes clutter your view when you only want to focus on specific structural components?
The solution lies in leveraging the visibility attributes associated with note nodes using the Node Specification Language (NSL). These include visible (v), visibilityFlag (vf), and hidden (h). While they may seem similar, each plays a unique role. Understanding their differences saves time and helps maintain cleaner models.
What Exactly Is ‘Visibility’?
Visibility in SAMSON doesn’t just mean whether a node is seen on the screen. It also connects to user control (e.g., toggling visibility via the UI), automated scripting, and conditional selection within NSL queries.
1. nt.v – The Node’s Visibility
This attribute reflects whether a node is currently visible in the workspace. It’s a direct indicator of visibility state:
|
1 |
nt.v</code> → selects all visible note nodes<br><code>not nt.v</code> → selects hidden note nodes |
2. nt.vf – The Visibility Flag
The visibilityFlag controls whether a node should be rendered, regardless of other influences. For instance:
|
1 |
nt.vf false |
This hides the note nodes and makes them immune to visibility toggles from parent nodes. Useful for permanently hiding organizational notes that shouldn’t distract during simulation or visualization.
3. nt.h – The Hidden Attribute
Inherited from the general node space, hidden is a slightly more abstract concept. It indicates whether the node was programmatically or systematically hidden, e.g., via filters or script-based selections. For manual inspection and debugging of complex scenes, querying this can help identify intentional omissions:
|
1 |
nt.h</code> → selects all note nodes hidden via logic<br><code>not nt.h</code> → selects the rest |
Tying It Together: A Use Case
Suppose you imported a large biomolecular system with annotations attached to different parts of the structure. During simulation, you want to view only protein chains and keep the notes out of sight.
Using NSL:
|
1 |
not nt.v |
Alternatively, hide permanently:
|
1 |
nt.vf false |
This guarantees they won’t distract you, even by toggling their parent’s visibility.
Why This Matters
With visibility control, you minimize visual clutter, focus better, and improve performance when rendering large models. Learning how to use nt.v, nt.vf, and nt.h empowers you to build cleaner, more efficient molecular workspaces.
You can explore the full attribute documentation for note nodes on the official SAMSON NSL guide: 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.
