For researchers working with large molecular systems or complex models, visual clarity is critical. As projects grow, molecular modelers often annotate their systems using notes—whether to track hypotheses, mark interaction hotspots, or assist with collaborative storytelling. But as the number of annotations accumulates, navigating the model becomes visually overwhelming. Wouldn’t it be helpful to control which notes are shown and which are hidden depending on the task at hand?
This is where the NSL (Node Specification Language) in SAMSON comes in, offering a simple and precise way to filter and control note visibility. If you’re working with note nodes, knowing how to query and control their visible and hidden attributes can make your workflow much more efficient.
Note Visibility Attributes: The Essentials
In SAMSON, every note belongs to a specific attribute space: note (short name: nt). Each note node inherits several useful visibility-related attributes from the generic node space. Here’s a breakdown of those that directly affect visibility:
visible(v): Whether the note is currently visible in the viewport.hidden(h): Expresses whether the node is deliberately hidden.visibilityFlag(vf): Used internally to determine whether the visibility should be inherited from parent nodes or overridden.
These attributes are powerful when combined with NSL queries, especially in large systems where toggling visibility manually is not viable. For instance:
|
1 2 3 4 |
nt.v // Matches all visible note nodes not nt.v // Matches note nodes that are currently invisible nt.h // Matches notes marked as hidden nt.vf false // Matches notes not inheriting visibility from their parent |
Practical Scenarios
Let’s say your model has 200 annotated notes, but only 20 are relevant for a publication figure. You can hide the rest by using:
|
1 |
not nt.n "*Figure*" |
and setting their visibility to false, leaving only figure-related notes on-screen.
Another useful case is when reviewing someone else’s model. You might want to focus only on the parts they currently highlight. In that case, you could write:
|
1 |
nt.v |
to isolate visible notes.
Why This Helps
Clear visual environments help focus attention, reduce cognitive load, and preserve performance in complex models. By selectively toggling note node visibility using NSL, you can:
- Quickly declutter your scene before presentations or exports ✅
- Maintain separation between work-in-progress annotations and finalized ones ✏️
- Identify hidden but still-active annotations that may need review 🔎
Note attributes are simple tools, but when applied strategically through NSL queries, they give researchers programmatic control over molecular scene appearance and behavior.
To learn more about all attributes available to note nodes, including visibilityFlag and examples using exact query syntax, visit the SAMSON documentation for note attributes.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
