When working with complex molecular systems in SAMSON, it can quickly become challenging to identify and filter specific components, especially when models grow in size. Whether you’re preparing a dataset for analysis, working on visualizations, or trying to isolate a subset of elements with certain behaviors, being able to precisely query property model nodes becomes incredibly useful.
This is where the Node Specification Language (NSL) shines. NSL provides a way to query elements in your data graph by expressing conditions directly. Today, we’re diving into a specific subset of NSL: the propertyModel attribute space, which allows users to target and work specifically with property model nodes.
What Are Property Model Nodes?
In SAMSON, property model nodes are structures that carry various types of data associated with parts of your system, such as scalar fields or matrices. These are often generated by simulations or processed by Extensions. You might use property models to visualize results like electrostatic potential maps, occupancy grids, or other spatial data.
Why Filtering Property Models Helps
Imagine you’re working on a molecule with several associated models: force fields, dynamic simulations, annotations, and various property models. You want to hide all property models currently not in use—or find the ones with a specific material type applied. Clicking your way through the Node Specification Selector could take time, especially in large projects.
Instead, with NSL, you can target nodes with simple expressions like:
pm.hm: matches property model nodes that have a materialnot pm.v: matches invisible property modelspm.n "A*": matches property models whose names start with ‘A’pm.sf false: selects property models that are not flagged as selected
This allows you to instantly find and isolate the right models whether you’re preparing a paper figure, debugging data, or scripting molecular operations.
Common Attributes You Can Use
Here’s a quick overview of the most practical attributes within propertyModel:
| Attribute | Short Name | Example |
|---|---|---|
| hasMaterial | hm |
pm.hm |
| hidden | h |
pm.h |
| name | n |
pm.n "Potential" |
| ownsMaterial | om |
pm.om |
| selected | (no short name) | pm.selected |
| selectionFlag | sf |
pm.sf false |
| visibilityFlag | vf |
pm.vf |
| visible | v |
pm.v |
These attributes are inherited from the general node space, meaning they behave similarly across other node types too. But using them in the propertyModel attribute space allows for precise targeting.
Example: Cleaning Up Your Workspace
Let’s say you’re wrapping up a simulation and want to keep only visible property models with a name starting with “A”:
|
1 |
pm.v and pm.n "A*" |
Or if you want to select all property models and invert their visibility:
|
1 2 |
select pm for each pm: toggle pm.v |
This minimizes the clutter and helps keep your workspace focused and clean.
To explore all available attributes and examples, check the full documentation on property model attributes at this link.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON from samson-connect.net.
