When working with complex molecular animations, one frequent challenge molecular modelers encounter is tracking which components of a structure are visible during different steps of the animation. Whether you’re creating educational visuals or exploring conformational changes, ensuring clarity in what’s shown at what time is key to producing coherent results.
In SAMSON’s integrative molecular design platform, the visibilityFlag attribute in the Node Specification Language (NSL) provides a handy way to query and filter for animation nodes based on their display state. This short guide focuses on how to use an.vf (short for animation.visibilityFlag) to optimize your molecular animations by giving you precise control over visibility settings.
What is visibilityFlag?
The visibilityFlag attribute represents the internal flag in an animation node signaling whether the node should be visible. It differs subtly but importantly from the visible attribute, which results from evaluating multiple flags (such as selection visibility). In other words, visibilityFlag is a cause, whereas visible is often the effect.
For animation workflows, being able to query or filter using an.vf means you’re directly targeting the intention encoded in the animation setup itself. This can be incredibly helpful when trying to find parts intentionally hidden or revealed throughout keyframes.
Why use an.vf instead of just an.v (visible)?
While an.v tells you whether something is currently visible in the viewer, an.vf interrogates the visibility instruction stored in the animation node. If you’re exploring why a component is not rendering as expected during animation playback, an.vf helps you determine whether it was purposely flagged to be hidden — independently from selection flags or global visibility settings.
Examples in action
|
1 |
an.vf |
Selects all animation nodes with the visibilityFlag set to true.
|
1 |
an.vf false |
Returns nodes intentionally flagged to be hidden during animation.
Use this to quickly audit or fix unwanted disappearances or validate the intended visibility throughout your animation timeline.
Combined Queries
Because visibilityFlag is a Boolean attribute, it can be easily combined with other NSL parameters. For example:
|
1 |
an.vf false and an.n "Ligand*" |
This would reveal all animation nodes beginning with “Ligand” that are not set to show during animation playback — very useful if you suspect a naming or setup mistake.
Take Control of Your Animated Models
Mastering attributes like visibilityFlag can dramatically reduce the debugging time spent when animations don’t look right. It also encourages cleaner project structures by making your filtering and querying more deterministic and intentional.
For full information on other animation-related attributes like hidden, selected, and name, check out the full documentation page here.
SAMSON and all SAMSON Extensions are free for non-commercial use. Download SAMSON at https://www.samson-connect.net.
