Molecular modelers often struggle with organizing and customizing the properties of molecular nodes during their design workflows. Whether you’re sorting structures based on visibility, material ownership, or custom naming, the Property Model attribute space in SAMSON simplifies these processes significantly.
The Property Model attribute space (propertyModel, or its short name: pm) in SAMSON’s Node Specification Language (NSL) lets you precisely define and query attributes for nodes related to molecular properties. These attributes, summarized below, can make node selection and filtering much clearer and more dynamic.
Why Use Property Model Attributes?
Imagine you need to select or modify nodes based on whether they have associated materials, are visible, or match particular parameters, without manually sorting through extensive data. The Property Model attributes allow for streamlined expressions such as:
|
1 2 |
pm.hm // Check for nodes that have material not pm.v // Select nodes that are not visible |
These queries can quickly narrow down the nodes you’re interested in, saving time and avoiding errors.
A Breakdown of Key Attributes
Below are some of the most useful Property Model attributes, along with examples of how to use them:
- hasMaterial (
pm.hm): Indicates whether the node has material. Example:pm.hmmatches nodes with material, whilenot pm.hmmatches those without. - hidden (
pm.h): Checks if a node is hidden. Use cases include identifying elements you may need to reveal for inspection or debugging. - name (
pm.n): Matches nodes by custom names. For instance,pm.n "A"will match nodes named “A”, whilepm.n "L*"finds nodes with names starting with ‘L’. - ownsMaterial (
pm.om): Flags nodes that specifically own material. Distinguish between mere association versus direct ownership. - visible (
pm.v): Helps identify which nodes are currently visible. For example,not pm.vcan highlight hidden components in complex systems.
More attributes, such as selectionFlag (pm.sf) and visibilityFlag (pm.vf), add further customization to node interactions, ensuring total control over your molecular modeling process.
Example Applications
Simplifying Visualization: As a molecular modeler, you might want to highlight only the visible elements of a molecular system to export a clean image or simplify further computations. Using pm.v can make this selection efficient and error-free.
Material-Specific Analysis: For nodes that own or interact with specific materials, queries with pm.hm or pm.om provide quick access, allowing you to focus on chemistry or physics-specific subsets of your system.
Ready to Explore?
Understanding these attributes and using them in simple or complex queries can dramatically improve your molecular modeling workflow. These tools streamline node management and remove manual complexity associated with intricate systems.
For a more detailed reference, visit the official documentation on Property Model attributes: https://documentation.samson-connect.net/users/latest/nsl/propertyModel/.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON from https://www.samson-connect.net.
