As any molecular modeler knows, data visualization can get cluttered quickly, especially when dealing with complex molecular systems. Being able to precisely control the visibility of elements in your molecular design platform is critical—whether you’re presenting results or analyzing intricate structures. In SAMSON, the integrative molecular design platform, the concept of node visibility offers a straightforward way to control what you see and what you don’t in your model. This blog post will walk you through the essential node.visible and related attributes so you can manage visualization effectively.
Why Node Visibility Matters
In molecular modeling, clear visuals often lead to clearer insights. Imagine you are working on a protein-ligand interaction and want to focus solely on specific atoms or residues, hiding irrelevant water molecules or other distracting structural components. If visualization gets overwhelming, critical details might go unnoticed. SAMSON’s NSL provides precise visibility controls to address this pain point.
The node.visible Attribute
The core of visibility management in SAMSON is the node.visible attribute, shorthand n.v. This attribute matches nodes that are visible based on both their visibility flag (whether it’s specifically set to ‘true’) and the visibility flags of their ancestors. This means you won’t just control visibility at a single hierarchical level—you’re managing it across the entire structural hierarchy.
The values for node.visible can be:
true: The node is visible.false: The node is hidden.
Examples:
node.visible(short version:n.v): This selects all visible nodes in your data graph.not node.visible: This allows you to work with currently hidden nodes, which could be useful for batch operations or specific re-visualizations.
node.hidden: A Complementary Tool
The node.hidden attribute, shorthand n.h, allows you to match nodes that are hidden in your workspace. Nodes may be hidden due to their own visibility flag or because one of their ancestors has its visibility flag set to false. This nesting consideration ensures users can manage visibility at multiple levels.
Examples:
node.hidden(short version:n.h): This matches hidden nodes, helping you identify them for either exclusion or reintegration into your visualization.
node.visibilityFlag: The Core Setting
Some visibility issues might stem from confusion between what is visible and what is set to be visible at the flag level. The node.visibilityFlag attribute (n.vf) dives into that particular setting. It allows you to interact with nodes purely based on their visibility flag, orthogonal to influence from ancestors.
This low-level control can be especially useful when debugging visibility issues or honing in on specific visualization settings for your project.
Examples:
node.visibilityFlag true(short version:n.vf true): Matches nodes whose visibility flag istrue.node.visibilityFlag false(short version:n.vf false): Matches nodes whose visibility flag isfalse.
Efficient Use Cases for Node Visibility Attributes
Understanding these attributes unlocks significant use cases:
- Selective Analysis: Hide everything irrelevant to focus exclusively on key atoms, residues, or ligands.
- Error Isolation: If parts of a molecular structure appear unexpectedly, visibility attributes can help debug which nodes/structures should not show.
- Presentation Prep: Polished molecular visuals are vital for clear communication. Visibility controls enable you to emphasize critical features in presentations.
Explore Further
The attributes node.visible, node.hidden, and their relations with node.visibilityFlag form a powerful trio for managing your molecular graphs in SAMSON. These are just one part of SAMSON’s comprehensive NSL tools tailored for integrative molecular design.
Check out the full documentation to learn more and explore additional features.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON here.
