Molecular modelers often rely on precise attribute filtering and categorization when working with complex molecular systems. In SAMSON’s Node Specification Language (NSL), property model attributes play a pivotal role in enabling this functionality. This blog post introduces you to the key property model attributes and helps you see how they can simplify and improve your workflow.
What Are Property Model Attributes?
Property model attributes are a set of parameters defined in the propertyModel attribute space (short name: pm), designed specifically to interact with property model nodes in SAMSON. By leveraging these attributes, you can filter, match, or manipulate nodes according to your requirements. Some of these attribute names may already be familiar to you from the general node attribute space, but they are tailored to property models here.
Key Attributes and Their Utility
Here’s a breakdown of the most important property model attributes available in SAMSON’s NSL:
hasMaterial (hm): Use this attribute to determine whether a node has material data associated with it. For example,pm.hmreturns true if a node has material, whilenot pm.hmensures only nodes without material are considered.hidden (h): This attribute can help reveal or filter hidden nodes in the property model. For instance,pm.hidentifies nodes marked as hidden.name (n): A flexible attribute for node identification by name. For example, usepm.n "A"to target nodes named “A,” orpm.n "L*"to identify nodes with names starting with “L.”ownsMaterial (om): This indicates whether a node owns material data. A simple query, such aspm.om, can help you find nodes with materials they own.selected: This attribute determines whether a node is selected. For example, usepm.selectedto filter for selected nodes ornot pm.selectedfor unselected ones.selectionFlag (sf)andvisibilityFlag (vf): These allow you to manipulate selection and visibility states of nodes efficiently. For example,pm.sf falsedisables a selection flag for a node.visible (v): This attribute controls whether a node is visible. Usepm.vto identify visible nodes ornot pm.vto focus on nodes that are hidden.
Example Use Case
Let’s say you want to identify hidden nodes in your property model that do not own material. You could construct a query like this:
|
1 |
not pm.hm and pm.h |
This simple NSL expression will isolate nodes that fit those specific criteria, helping you focus only on nodes of interest without manually analyzing each one.
Why It Matters
Property model attributes streamline workflows by offering granular control over node selection, filtering, and categorization. Whether you are organizing nodes based on material ownership, visibility status, or name-based patterns, these attributes make the task manageable and efficient.
To explore all the details about these attributes, including more advanced use cases, visit the official documentation page.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at samson-connect.net.
