Molecular modelers working with complex multi-component systems often need to control what’s shown and what’s hidden to focus on specific molecular features. But when your project grows, keeping track of visibility state across all components can become tedious and error-prone. Did I accidentally hide the ligand? Why can’t I see the whole protein shell?
If you’ve used SAMSON for molecular design, you may already rely on NSL (Node Specification Language) to query or manipulate specific parts of your system. But fewer users are aware of how powerful the visual model attribute space can be for controlling visibility logically and efficiently.
Focus Only On What Matters: Using vm.v and vm.h
Let’s start with a common use case: you want to quickly identify nodes that are not visible. Instead of hunting in the GUI, you can use:
|
1 |
not vm.v |
This returns all visual model nodes that are currently invisible. Want the opposite — a quick list of what’s visible?
|
1 |
vm.v |
But what if you’re dealing with ambiguity between items that are set invisible vs. hidden due to hierarchy or filtering? That’s where the hidden attribute becomes useful:
|
1 |
vm.h |
This reveals which nodes are currently hidden, regardless of whether their parent is visible or not.
Shortcuts That Save You Time
SAMSON’s NSL supports user-friendly short aliases for many attributes. For instance:
vm.vstands forvisiblevm.his short forhidden- Want to find models named “Ligand_A”? Use
vm.n "Ligand_A"
Sanity Checking Your Scene
Sometimes, bits of your model disappear and you’re unsure why. You can cross-check visibility vs. selection status using:
|
1 |
vm.selected and not vm.v |
This basic diagnostic tells you: are you selecting things you can’t even see?
You can search by matching names or using wildcards. For instance, if your naming scheme uses prefixes, try:
|
1 |
vm.n "Ligand_*" and not vm.v |
This gives you all ligand components that are currently invisible.
A Word on Flags
SAMSON also defines additional helpful boolean flags in the visual model space:
vm.vffor visibilityFlagvm.sffor selectionFlag
Setting these or querying them can help control visibility and selection programmatically, especially in scripting applications or setting automated views in an Extension workflow.
Conclusion
With a few simple attribute queries in the vm space, you can gain full clarity on which parts of your molecular system are visible, hidden, or partially filtered. This means less time “fixing views” and more time analyzing your molecules. Mastering this small part of NSL can have a large impact on the efficiency of your modeling workflow.
To learn more about visual model attributes in the Node Specification Language, visit the official documentation: Visual model attributes – NSL.
SAMSON and all SAMSON Extensions are free for non-commercial use. Download SAMSON at https://www.samson-connect.net.
