If you’re a molecular modeler, you’ve likely encountered challenges in managing and organizing property models, especially when dealing with complex molecular structures and data. One of the helpful tools available in SAMSON’s Node Specification Language (NSL) is the propertyModel attribute space. It provides a structured way to interact with property model nodes using attributes.
Let’s dive into how the propertyModel attribute space can ease some of your workflow pains and help you create cleaner, more efficient molecular models.
What Are Property Model Attributes?
The propertyModel attribute space is specifically designed for property model nodes. By leveraging these attributes, you can work with properties like visibility, selection, material ownership, and more. These attributes allow for better customization and management of molecular structures.
The attributes within the propertyModel space are:
| Attribute name | Short name | Possible values | Examples |
|---|---|---|---|
| hasMaterial | hm |
true, false |
pm.hm, not pm.hm |
| hidden | h |
true, false |
pm.h, not pm.h |
| name | n |
strings in quotes | pm.n "A", pm.n "L*" |
| ownsMaterial | om |
true, false |
pm.om |
| selected | – | true, false |
pm.selected, not pm.selected |
| selectionFlag | sf |
true, false |
pm.sf false, pm.sf |
| visibilityFlag | vf |
true, false |
pm.vf false, pm.vf |
| visible | v |
true, false |
pm.v, not pm.v |
How to Use These Attributes
The usefulness of these attributes lies in their ability to act as filters or operators in the NSL. For instance:
pm.hm: Checks if a node has material.pm.n "A": Finds nodes with the name “A.”pm.v: Identifies visible nodes in your property model.
Using these attributes allows you to define targeted operations on nodes, making it simpler to navigate intricate molecular structures.
Inherited Attributes
Many of the attributes in propertyModel are inherited from the node attribute space but are specialized for property model nodes. For example:
hasMaterial: Indicates whether a node has material.hidden: Marks if a node is hidden.visible: Flags if a node is visible.
These inheritance-based attributes bring consistency and extend broader functionalities into the property model scope.
Why Use Property Model Attributes?
For molecular modelers, time and clarity are essential. By mastering the propertyModel attribute space, operations such as filtering nodes based on conditions (e.g., only working with visible nodes or nodes that have materials) can be much more efficient.
It reduces the manual effort involved and helps in building well-organized molecular models.
To learn more about these attributes in-depth, visit the official documentation.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.
