As a molecular modeler, the complexity of molecular systems can be daunting, especially when dealing with intricate property data of individual nodes. SAMSON’s Node Specification Language (NSL) simplifies this process with its propertyModel attribute space, allowing users to define and manipulate property model attributes with precision.
In this blog post, we will explore the property model attributes available in SAMSON, what they represent, and how they can be used effectively in molecular design workflows. Whether you’re trying to filter, classify, or analyze molecular models, understanding these attributes will make your work more efficient.
What Are Property Model Attributes?
Property model attributes are part of the propertyModel space (short name pm) within the Node Specification Language (NSL) in SAMSON. These attributes enable you to query and manipulate property model nodes. For instance, you can identify whether a node has certain materials, whether it is visible in the interface, or even its name. With these attributes, molecular designers can apply logic and constraints to finely control their models.
Key Attributes and Their Usage
Here are some key attributes included in the propertyModel space, along with their short names, possible values, and example usage:
- hasMaterial (
hm): Determines whether the node has material. Possible values aretrueorfalse. Example:pm.hm - hidden (
h): Specifies whether the node is hidden. Example:not pm.h - name (
n): Allows filtering by a node’s name (string). Example:pm.n "L*"matches nodes with names starting with ‘L’. - ownsMaterial (
om): Indicates whether the node owns a specific material. Example:pm.om - selected: Identifies whether the node is selected. Unlike other attributes,
selecteddoes not have a short name. Example:pm.selected - visibilityFlag (
vf) and visible (v): Help in managing the visibility of nodes. Example:not pm.v
These attributes make it easy to filter and identify specific nodes based on their properties. For example, you could specify pm.n "A" to focus on property model nodes named “A” or use pm.hm to find nodes associated with materials.
Practical Example: Managing Visibility
Imagine working on a large molecular scene where some nodes need to remain hidden for clarity. Instead of manually toggling their visibility, you can use the visible (v) and visibilityFlag (vf) attributes.
For example:
|
1 |
pm.v</code> // Shows visible nodes<br><code>not pm.v</code> // Filters out all visible nodes |
Combining this with selection techniques helps declutter your working area efficiently, resulting in better insights and visualization.
For a complete reference, including detailed examples and explanations of the propertyModel attributes, visit the SAMSON documentation page: Property Model Attributes.
SAMSON and all SAMSON Extensions are free for non-commercial use. Start exploring advanced molecular modeling today by downloading SAMSON at https://www.samson-connect.net.
