When working with complex molecular animations in SAMSON, it’s common to accumulate multiple animation nodes that control different parts of your simulation or visual presentation. Keeping track of what should be visible — and when — can quickly become difficult, especially when you want to present a polished animation or focus reviewers on specific aspects of your research.
This blog post explores how to use the Node Specification Language (NSL) in SAMSON to efficiently control the visibility of animation nodes. Specifically, we’ll focus on attributes in the animation attribute space (namespace an) that govern what is shown or hidden in your molecular scene. This can be invaluable when preparing presentations, reviewing simulation data, or building custom molecular systems for further exploration.
Why control visibility?
Controlling visibility of animation nodes can help you:
- Streamline your workspace by hiding redundant or auxiliary animations
- Focus attention on key dynamic events without distraction
- Temporarily disable parts of animations for debugging or setup
With NSL you can manage this directly through attribute filters. Here’s how.
Relevant NSL attributes for visibility
The following attributes from the animation attribute space (short: an) help with visibility management:
| Attribute | Short name | Description | Examples |
|---|---|---|---|
visible |
v |
True if the animation node is visible | an.v, not an.v |
hidden |
h |
True if the animation node is hidden | an.h, not an.h |
visibilityFlag |
vf |
Flag determining inherent visibility state | an.vf, an.vf false |
Working examples
If you’re looking to select all currently visible animation nodes, you would use:
|
1 |
an.v |
Conversely, to find all hidden animation nodes:
|
1 |
not an.v |
Or you could use the hidden attribute directly:
|
1 |
an.h |
There’s also the visibilityFlag (vf) attribute. This controls whether a node can be visible at all. For example, to find nodes that are never shown regardless of user interaction:
|
1 |
an.vf false |
Use this when you want to make sure some transitions or tweaks never appear in the pipeline output.
When to use which?
- Use
visiblefor filtering on active state in the viewport. - Use
hiddenfor inherited state (possibly user toggled). - Use
visibilityFlagwhen controlling overall toggling capabilities.
Combining them allows highly specific filtering. For instance:
|
1 |
an.vf and not an.v |
This selects animation nodes that can be visible but currently aren’t. A good initial filter to troubleshoot why something doesn’t show up.
Conclusion
Managing visibility of animation nodes with NSL gives you precise control over what is displayed, helping you build cleaner scenes, perform focused debugging, and prepare clearer visualizations. Once you become familiar with these attributes, you’ll spend less time clicking through panels and more time designing high-quality molecular animations.
To explore these options further, visit the official documentation: https://documentation.samson-connect.net/users/latest/nsl/animation/
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.
