Molecular modelers working with complex animations in SAMSON often face a simple but frustrating challenge: filtering animation nodes quickly based on their state or name. Whether you’re preparing presentations, troubleshooting simulation steps, or optimizing interactions, sifting manually through dozens (or hundreds) of animations can be inefficient.
Fortunately, the Node Specification Language (NSL) in SAMSON provides a compact and efficient solution. By tapping into NSL’s animation attribute space, you can use concise expressions to display only relevant animation nodes—or hide the rest entirely. Let’s dive into a few useful cases and explain how this works.
Why filtering matters
Animations in molecular models often represent dynamic phenomena like conformational changes, reaction progressions, or signal propagation. As your model grows in complexity, you may have many animation nodes, only some of which are needed at a given moment. Instead of browsing through lists manually, NSL offers a way to instantly filter using simple, readable commands.
Using the animation attribute space
The animation-specific NSL attribute space is referred to with the keyword animation, or its short name an. You can use this prefix to refer to specific attributes related only to animation nodes.
Example: Hide all visible animation nodes
To select all animation nodes that are currently visible, you’d use:
|
1 |
an.v |
To hide those nodes (e.g. by selecting and changing properties), just search and then apply your changes. Select all nodes not visible with:
|
1 |
not an.v |
Example: Select animations by name
If your animations follow a naming pattern, such as conformations labeled "Conf1", "Conf2", etc., you can target them using wildcards:
|
1 |
an.n "Conf*" |
Want to target only an animation called Ligand_Entry?
|
1 |
an.n "Ligand_Entry" |
Example: Filter based on selection flags
Selection flags can be useful for workflows involving group operations. You can filter like this:
|
1 |
an.sf true</code> – Animation nodes with selection flag set.<br><code>an.sf false</code> – Animation nodes without it. |
Example: Working with visibility flags
Visibility flags provide additional control, for example to determine whether a node should be visible (even if it currently isn’t). Filter easily with:
|
1 |
an.vf false |
That gives you all animation nodes purposely hidden via visibility flags.
Clarification: selected has no short name
Unlike other attributes like v or sf, the selected attribute does not have a short name in the an space. So, for checking whether animation nodes are selected, you need to explicitly use:
|
1 |
an.selected</code> or <code>not an.selected |
Final thoughts
These small NSL expressions can save significant time when navigating complex models in SAMSON. They help you avoid visual clutter and stay focused on the parts of your simulations that matter most. As a bonus, NSL filters are easy to remember and share with your colleagues.
For the full list of animation attributes, visit the official documentation page.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON from https://www.samson-connect.net.
