Molecular modeling projects in SAMSON can involve highly complex systems, often made up of thousands of nodes: atoms, bonds, residues, visual models, and more. But what happens when you’re carefully inspecting your structure and something seems… missing? 🤔
Hidden or locked nodes can be a frequent source of confusion. You might not see a portion of your model, or you may be unable to modify part of it. Thankfully, SAMSON’s Node Specification Language (NSL) makes it easy to find and filter nodes based on their visibility or lock state — quickly.
Why This Matters
When working with large biomolecular models or complex assemblies, it’s common practice to hide or lock parts to focus on regions of interest. However, when you come back to a model days or weeks later, it’s easy to lose track of what is currently visible or editable.
Instead of manually browsing through the data graph and second-guessing layer after layer, you can use NSL expressions to make sense of it all — instantly.
Meet the Visibility-Related Attributes
Here’s how SAMSON helps:
node.visible(shorthand:n.v): Selects nodes that are currently visible. This includes nodes whose visibility flag istrueand whose ancestors are also visible.node.hidden(shorthand:n.h): Finds nodes that are hidden — either directly or through their ancestors.node.visibilityFlag(shorthand:n.vf): Checks the raw visibility flag of a node, regardless of ancestor states.
And for Locked Nodes:
node.locked(shorthand:n.l): Returns nodes that are effectively locked, even if it’s because of a locked ancestor.node.lockedFlag(shorthand:n.lf): Checks if a node’s own flagged state is locked.
Example Use Cases
Suppose you opened an older project and an important ligand seems to be missing from the 3D view. Here’s how you can inspect your system:
not n.v: Shows all currently hidden nodes. Useful to quickly isolate and reveal forgotten parts.n.l: Lists all locked nodes. Handy if you’re trying to move or edit something but can’t.n.lf: Shows nodes that are locked at the node level, not because of a parent.n.vf false: Identify nodes that were manually hidden (rather than hidden due to inheritance).
Tip: Combine Queries with Categories or Types
You can focus your search to specific types of nodes. For example:
n.t a and not n.v: Find all hidden atoms.n.t vm and not n.v: Find all hidden visual models.n.t r and n.l: All locked residues.
Why It’s Worth Learning
If you frequently load complex systems, collaborate on shared models, or pause and resume projects, mastering these simple NSL expressions can save time and reduce confusion. Whether for troubleshooting visibility or verifying lock states before simulations, these tools help you work more efficiently — and avoid those moments of silent panic when something seems “gone.” 😅
Documentation on these NSL attributes is available here.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.
