For molecular modelers, accurately defining and managing node properties is crucial for building and analyzing models efficiently. SAMSON’s Node Specification Language (NSL) offers a dedicated propertyModel attribute space to address this need. If you’ve ever found yourself struggling with visibility flags, selection properties, or more, this guide simplifies what the propertyModel brings to the table.
What Are Property Model Attributes?
The propertyModel attribute space is designed specifically for property model nodes in SAMSON. It enables users to interact with these nodes using descriptive attributes, their short names, various value types (like boolean or strings), and intuitive logic expressions.
Here are some highlights of propertyModel attributes:
- Visibility and selection attributes: These help you define whether a node is visible, selected, or disabled.
- Material ownership: Properties like
hasMaterialandownsMaterialprovide control over material references in your molecular design. - Name filtering: Quickly find nodes based on names or patterns, enabling faster navigation and refinement.
Dive Deeper Into Key Attributes
Below are some commonly used attributes and how they can simplify your workflows:
| Attribute | Short Name | Purpose and Example |
|---|---|---|
hasMaterial |
hm |
Checks if a node has material (e.g., pm.hm). |
hidden |
h |
Determines whether the node is hidden; simple toggle with pm.h or not pm.h. |
name |
n |
Filters nodes by name. Use pattern-matching such as pm.n "L*" to capture specific sets. |
selectionFlag |
sf |
Tracks whether a specific node is selected (e.g., pm.sf for selected nodes). |
visibilityFlag |
vf |
Controls whether a node’s visibility can be toggled (e.g., pm.vf false). |
How to Use These Attributes in Your Models
Let's say you want to filter nodes that are visible and have a specific name starting with ‘L’:
|
1 |
pm.v and pm.n "L*" |
This simple expression helps you focus on relevant nodes, improving efficiency when working on complex models.
Need to identify nodes that don’t own a material? Use:
|
1 |
not pm.om |
Combining logic expressions and short attribute names makes propertyModel a powerful tool in your NSL toolkit.
For more advanced setups, such as toggling visibility across multiple nodes or filtering out items based on custom criteria, dive into the comprehensive examples provided in the NSL documentation.
Next Steps
The propertyModel attribute space enables molecular modelers to manage complex properties with precision and clarity. From filtering visible nodes to checking material associations, these attributes simplify tasks that would otherwise be tedious.
Learn more about property model attributes and their applications in the official SAMSON documentation: click here.
SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON at SAMSON Connect.
