When working on complex molecular systems in SAMSON, even the most detailed modeler can feel overwhelmed by visual clutter. Whether you’re analyzing protein-ligand binding, manipulating materials, or preparing publication-ready figures, understanding and controlling what is visible — and what isn’t — becomes crucial. Fortunately, the visualModel attribute space in SAMSON’s Node Specification Language (NSL) provides intuitive filters for just that.
Why visibility matters
Large molecular systems often contain hundreds or thousands of nodes. Not all of these are immediately relevant. Viewing everything at once can slow comprehension, performance, and productivity. For example, a computational chemist might be interested only in a protein’s active site, while a materials scientist might want to isolate a specific nanoparticle component from a composite structure. Selective visibility helps tailor the view to the task.
Key attributes for visibility management
The visualModel attribute space, abbreviated vm, targets visual model nodes in SAMSON. Of particular interest for managing visibility are the following four attributes:
vm.v– thevisibleattribute: denotes whether a node is currently visible.vm.vf– thevisibilityFlag: determines whether node visibility is enabled.vm.h– thehiddenattribute: indicates whether a node is explicitly hidden.vm.selected– specifies whether a visual model node is selected (while not a display setting directly, it becomes useful for batch operations).
Using visibility filters efficiently
To isolate only visible objects in your scene, type:
|
1 |
vm.v |
To find all visual elements that are currently hidden, use:
|
1 |
not vm.v |
Want to modify only the nodes that are flagged for visibility but are still hidden? Combine attributes:
|
1 |
vm.vf and not vm.v |
If your scene is cluttered by helper visual models (e.g., measurements or annotations) and you know their naming convention includes a prefix, you can filter by name:
|
1 |
vm.n "annotation*" and vm.v |
This makes it easier to hide or delete auxiliary nodes without affecting the model itself.
Practical example: cleaning the view
Let’s say you just loaded a large biomolecular simulation, and want only the main chain and ligand visible for analysis. After hiding all, you can selectively make visible the essential components by name:
|
1 2 |
not vm.v → select all hidden nodes vm.n "main chain" or vm.n "ligand" |
This approach lets you toggle visibility in a flexible, query-based way rather than manually clicking through a long list of nodes.
By learning to combine visibility attributes with selection and naming, molecular modelers can streamline their interface, minimize cognitive load, and prepare clearer visuals for presentations or publications.
To learn more about the visualModel attribute space and additional filtering possibilities, visit the official SAMSON documentation.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
