For molecular modelers, assigning and managing molecular properties efficiently can be a challenge. Whether you’re analyzing material interactions or designing molecular structures, precise control over property models is essential. This is where the Node Specification Language (NSL) in SAMSON proves invaluable. In this post, we’ll explore the propertyModel attribute space, which is specially designed for handling property model nodes, and show how it can simplify your molecular modeling workflow.
What is the propertyModel Attribute Space?
The propertyModel attribute space, identified with the short name pm, is a subset of the Node Specification Language (NSL) in SAMSON. It allows modelers to interact specifically with property model nodes by using corresponding attributes and expressions. The propertyModel space includes attributes like hasMaterial, ownsmaterial, visible, and others, which control characteristics such as visibility, selection status, and ownership of material.
Key Attributes and How to Use Them
Let’s break down some commonly used propertyModel attributes:
-
hasMaterial(hm): Determines whether a node is associated with a material. Possible values aretrueorfalse. For example:- To check if a node has material:
pm.hm - To filter nodes without material:
not pm.hm
- To check if a node has material:
-
visible(v): Controls the visibility of a node. True makes it visible while false hides it. Example expressions include:- Show all visible nodes:
pm.v - Filter hidden nodes:
not pm.v
- Show all visible nodes:
-
name(n): Targets nodes by their name using string queries. For example:- Find nodes named ‘A’:
pm.n "A" - Search nodes with names starting with ‘L’:
pm.n "L*"
- Find nodes named ‘A’:
-
selectionFlag(sf): Indicates whether a node is flagged as selected. Typical usage:- Search for selected nodes:
pm.sf - Exclude selected nodes from a query:
pm.sf false
- Search for selected nodes:
Check out the complete table in the official documentation that summarizes all attributes, their possible values, and example expressions for efficient usage.
Why This Matters
By leveraging the propertyModel attribute space and its tailored attributes, you can:
- Filter molecular data based on precise criteria (e.g., visibility, ownership of materials).
- Create complex and highly specific queries enabling better data refinement.
- Streamline visualization by controlling node selection and visibility hierarchies effectively.
This can save time, reduce errors, and give you greater control over molecular models, enabling you to focus on the scientific or design objectives at hand.
To learn more and see examples of these attributes in action, visit the full documentation.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.
