When designing or analyzing molecular animations in SAMSON, controlling visibility is key to focusing on the parts that matter. Whether you’re preparing a presentation, debugging a molecular mechanism, or just exploring a system, quickly showing and hiding parts of the animation can help you stay efficient and avoid visual clutter.
This blog post introduces the use of visible, hidden, and visibilityFlag attributes in SAMSON’s Node Specification Language (NSL) that are specifically applicable to animation nodes (e.g., trajectories, motion representations).
Why Visibility Attributes Matter
In complex biomolecular structures, animations can become hard to parse due to overlapping or dense elements. Being able to control what’s shown (and what isn’t) without deleting or altering the underlying data lets you highlight key interactions or transitions.
SAMSON provides several NSL attributes in the animation attribute space (short name an) to manage visibility. These attributes are inherited from the more general node attribute space, but they apply specifically to animation nodes.
Visibility Attributes in the Animation Space
Here are the main attributes used to control the visibility of animation nodes:
| Attribute | Short Name | Description | Example Usage |
|---|---|---|---|
visible |
v |
Indicates whether the node is visible | an.v or not an.v |
hidden |
h |
Indicates whether the node is hidden | an.h or not an.h |
visibilityFlag |
vf |
Used for controlling visibility logic (e.g., programmatic toggling) | an.vf false |
Understanding the Difference
While visible and hidden may seem like opposites, they are separate flags that can be used together or independently, depending on your workflow. For instance, scripting a toggle function might use visibilityFlag for performance and semantic clarity, while manual visibility toggling might focus on visible.
Use Case: Focusing on an Active Site
Imagine you’re animating a large enzyme and want to spotlight the conformational change at the active site. To reduce distractions:
- Hide all other parts temporarily:
not an.v - Use custom NSL queries to keep just the active site’s animation visible.
- Optionally script toggling using
an.vffor repeatability across similar systems.
Flexibility with NSL
Because NSL allows you to create logical statements (like not an.h and an.vf), it becomes very powerful in combination with visual filtering and search tools. This is especially useful if you are sharing a model and want users to start with a clean view.
Conclusion
Visibility attributes may seem like a small piece of the animation puzzle, but they can have a big impact on how effectively you analyze or communicate molecular mechanisms. Try integrating these filters into your workflow to quickly spotlight what matters most.
To learn more and see the full list of available attributes in the animation space, visit the official SAMSON documentation page.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
