When working on complex molecular systems, clarity is key. Visualizing only the necessary elements makes it easier to analyze specific pathways, verify modeling outcomes, or share focused insights with peers. However, managing visibility in large structures can sometimes be confusing—especially if you’re unsure which components are hidden and why.
In SAMSON, property models form a critical layer in the node-based architecture and include their own set of attributes that govern their visualization. Let’s focus on a specific pain point: understanding and managing visibility of property models using the Node Specification Language (NSL).
What governs visibility?
In SAMSON’s NSL, the visible property (short name: v) is an attribute inherited from the node structure. It defines whether a node is currently visible or not in the viewport.
For property models specifically, visibility can be managed using the pm.v attribute. Here’s how it works:
pm.vmatches property model nodes that are visible.not pm.vmatches property model nodes that are hidden.
This is particularly useful when you’re scripting queries in NSL to isolate or toggle visibility across large subsets of elements. For example:
|
1 |
pm.v |
This will select all visible property model nodes — perfect for understanding what’s currently active in large and layered scenes.
Going deeper: visibilityFlag vs visible
SAMSON also supports another attribute: visibilityFlag (short name: vf). While visible tells you what is currently visible, vf tells you whether a node is allowed to be visible. This distinction is helpful when dealing with hierarchical or linked visibility settings.
Examples:
|
1 |
pm.vf false |
Selects property models that have the visibility flag turned off — even if their parent might be visible.
Combining queries
You can combine these attributes for more refined queries. For instance, to identify nodes that are currently not visible but could be made visible:
|
1 |
not pm.v and pm.vf |
This is useful if you want to reveal elements that were hidden manually but are not restricted from being shown by their flags.
Summary table for quick reference
| Attribute | Short name | Purpose |
|---|---|---|
visible |
v |
Check if node is visible |
visibilityFlag |
vf |
Check if node can be visible |
By mastering these two attributes, molecular modelers can declutter the viewing space, detect inconsistencies, and automate the visualization of relevant elements in any given model or simulation.
To learn more, visit the official documentation page: https://documentation.samson-connect.net/users/latest/nsl/propertyModel/
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
