Molecular modelers working with complex structures often face a recurring challenge: navigating crowded scenes with many overlapping molecular elements. When certain parts of a structure are hidden or set to different visibility states, it’s easy to lose track of important backbone components. If you’ve ever spent too much time toggling visibility settings to isolate structural groups, this blog post can help streamline your workflow.
The Node Specification Language (NSL) in SAMSON offers a compact yet powerful way to query molecular structures. In particular, SAMSON’s NSL provides a set of backbone attributes that can be used to efficiently filter and find backbone nodes based on their visibility states.
Understanding Backbone Visibility Attributes
The visible and hidden attributes allow you to distinguish which backbone nodes are currently shown or hidden in the viewport. These are especially useful in large biomolecular systems where only specific domains or residues may be relevant to a task.
Here are some quick references:
- visible (
v): Returnstrueif the node is currently visible. - hidden (
h): Returnstrueif the node is hidden. - visibilityFlag (
vf): Indicates whether the visibility is explicitly set by the user.
Practical Examples
You can enter these queries in the NSL input in SAMSON to filter backbone nodes:
bb.v: Selects all visible backbone nodes.not bb.v: Selects backbone nodes that are not visible.bb.h: Selects all hidden backbone nodes.not bb.h: Selects all non-hidden backbone nodes (including visible ones).
The vf (visibilityFlag) attribute can be used to spot whether visibility was defined explicitly. Use bb.vf to retrieve all backbones with visibility overridden by the user, or bb.vf false to check for those left at default.
This sort of filtering is extremely helpful when you’re preparing a system for visualization or export — for example, hiding solvent backbones and displaying only the receptor site. Combine visibility checks with other filters like bb.n "C*" (by name) or bb.selected (by selection state) for even finer control.
Why This Matters
When modeling, time matters. Instead of manually scanning through complex node trees to find which parts are hidden or visible, you can use these NSL queries to jump straight to the elements you need. This improves clarity, avoids errors induced by unintentional hidden elements, and speeds up preparation for operations like simulations or presentations.
To learn more about all backbone attributes available in NSL, along with other search keys, syntax rules, and example use cases, check the full documentation here: https://documentation.samson-connect.net/users/latest/nsl/backbone/
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
