Whether you’re studying protein folding or refining a ligand docking animation, clarity is key when visualizing molecular trajectories. SAMSON’s Animation Nodes allow for rich, dynamic representations of structural changes—but what if your animation is cluttered? If you’ve ever struggled to isolate only the necessary components during playback, you’re not alone. The good news: with the animation attribute space in SAMSON’s Node Specification Language (NSL), you can target animation-specific properties with precision, especially regarding visibility.
In this post, we’ll take a closer look at three key attributes—visible, visibilityFlag, and hidden—that let you control what’s rendered in your molecular animations. These small yet powerful toggles help streamline your view to focus only on what matters at each step.
Understanding Visibility Attributes in Animation Nodes
The animation attribute space can be accessed with the short name an. This scope ensures you’re querying or filtering precisely among animation nodes, which describe time-dependent behaviors in your molecular design.
1. an.v – visible
This attribute controls whether an animation node is currently rendered. It accepts two values: true (shown) or false (not shown). This is particularly useful when fine-tuning a sequence of transformations and only want to render specific states at a given frame.
Examples:
an.v – selects all visible animation nodes.
not an.v – selects all animation nodes currently hidden from view.
2. an.vf – visibilityFlag
This flag acts as a finer switch that works in conjunction with the visible attribute. It’s often used in programmatic toggling during animations. Like an.v, it also accepts true or false.
Examples:
an.vf false – selects nodes with the visibility flag turned off.
an.vf – selects all nodes with the flag set to true.
3. an.h – hidden (inherited from node.hidden)
This attribute is the inverse of visible. If set to true, the node will be hidden. However, keep in mind it’s inherited, so its behavior is consistent with other node types too.
Examples:
an.h – selects all animation nodes that are hidden.
not an.h – selects all non-hidden animation nodes.
Why These Attributes Matter
In real-world workflows, these attributes become invaluable when building complex visualizations:
- Filter out intermediate conformations in trajectory playback
- Focus on specific ligand positions across time
- Combine with selection tools to prepare clean video exports
Because these attributes are accessible directly in SAMSON’s NSL, they can easily be combined with other selectors to build smart, dynamic filters:
(an.v and an.n "Step*" and an.sf)
This expression selects visible animation nodes whose names begin with “Step” and are part of the current selection set.
Whether you’re scripting animations programmatically or setting up presentations, mastering these visibility attributes will help turn a complex molecular scene into a focused story.
Want to learn more? Visit the full documentation page on Animation Attributes in NSL.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON here.
