When designing molecular animations, clarity matters. Whether you’re building a protein folding sequence, simulating ligand docking, or preparing a visual output for a publication or presentation, keeping track of the various elements in your scene is vital. But when things start to move, it’s easy for the model to become visually overwhelming – or slow down due to rendering unnecessary details.
One pain point for molecular modelers working on animations is the time-consuming process of tracking, selecting, hiding or isolating elements specific to the animation itself. Fortunately, SAMSON‘s Node Specification Language (NSL) makes this task far more manageable – if you know how to use the right animation attributes.
Why this matters
Imagine you’re examining binding site motion across an ensemble of conformations. Some conformational changes you care about are subtle, others dramatic – and not every animation node contributes to the insights you want to showcase. Using attributes like an.v (visible), an.h (hidden), and an.n (name), you can directly target only the animation nodes you want to display, search, isolate, or analyze.
Working smarter with animation attributes
Animation attributes in NSL are defined in the animation attribute space (short name: an). This allows you to specifically control nodes related only to animations, without affecting the rest of your document.
| Attribute | Short Name | Use Case |
|---|---|---|
an.n |
n |
Target animations by name (e.g., an.n "LigandMotion") |
an.v |
v |
Find visible animation nodes |
an.h |
h |
Exclude hidden nodes |
an.selected |
– | Detect or update selection states |
Practical examples
Let’s say you’re working on an animation illustrating protein opening. You’ve named each segment’s animation node descriptively (e.g., "DomainA_Expand", "ClaspRelease"), and now you want to isolate only those currently visible and not hidden so they can be emphasized:
|
1 |
an.v and not an.h and an.n "Domain*" |
This expression selects all visible animation nodes that match names starting with Domain and that are not hidden.
Or, perhaps you’ve discovered a group of deprecated animation nodes, which you’ve renamed with a prefix "OLD_". You can hide all of these at once:
|
1 |
an.n "OLD_*" |
Then apply a hide operation to reduce distraction in the workspace.
Simplify selection workflows
By using an.selected, an.selectionFlag, or an.visibilityFlag, you can further script workflow actions or filter views. These attributes are invaluable if you’re automating animations or preparing figures, especially in scenes that involve many overlapping motions or temporal stages.
You can find more attribute combinations in the official documentation, which also covers basic inheritance and differences between attribute spaces. All NSL expressions are powerful when combined properly, and even more when used programmatically or through visual filtering in SAMSON’s selection tools.
To learn more, visit the full documentation page on animation attributes here:
https://documentation.samson-connect.net/users/latest/nsl/animation/
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
