When working with complex molecular systems, it’s easy to feel overwhelmed by the amount of data displayed on screen. Whether you’re building models, running simulations, or presenting results, one universal challenge for molecular modelers is figuring out exactly what you need to see—and what you don’t. Controlling visual clutter can save time, reduce cognitive load, and improve communication with collaborators.
Fortunately, SAMSON’s Node Specification Language (NSL) offers a powerful way to manage what is shown or hidden in your property models using simple filters. This post explores how you can use the visible and visibilityFlag attributes in NSL’s propertyModel attribute space to streamline your modeling workflow.
Understanding Visibility vs. Visibility Flags
Within the propertyModel (or pm) attribute space, you have access to:
pm.vorpm.visible: returnstrueif the node is currently visible.pm.vforpm.visibilityFlag: returns or sets the flag controlling visibility state.
This is especially useful when you want to dynamically hide/show different layers or datasets (e.g., structural overlays, electrostatic maps, or density properties) during a session or for a presentation screenshot.
Practical Filtering Examples
Here are a few sample queries you can write in NSL to manage visibility:
pm.v– selects all visible property model nodes.not pm.v– selects property model nodes that are not currently visible.pm.vf false– selects nodes whose visibility flag is off.pm.vf– selects nodes whose visibility flag is set to true.
Combined with other filters (like pm.n "Electrostatics"), you can write targeted commands like:
|
1 |
pm.n "Electrostatics" and not pm.v |
…to select all hidden electrostatics-related property models and toggle them on.
Why This Matters in Practice
Let’s imagine you’re comparing two molecular dynamics simulations with various computed properties. You load both models in SAMSON, but now your scene is filled with overlapping heat maps, vectors, and graphs. Instead of hunting through lists manually, try:
|
1 |
not pm.v |
This instantly highlights what’s hidden—potentially reminding you of an important dataset you had turned off earlier. Or, filter by:
|
1 |
pm.vf false |
to quickly see which property nodes were disabled by default and decide whether to enable them.
Tips for Efficient Workflows
- Use visibility queries when preparing figures or animations for presentations or publications.
- Quickly toggle data layers when debugging simulations.
- Combine with name filters (
pm.n) to isolate specific properties, e.g., “Lennard-Jones”, “Solvent Accessibility”, etc.
Managing what’s visible isn’t just about aesthetics—it’s about clarity and control. With a few simple NSL expressions, you can remove visual noise and focus exactly on what matters in your model.
For more details on the full list of propertyModel attributes and how to incorporate them in NSL queries, visit the official documentation.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
