Understanding Property Model Attributes in SAMSON’s NSL

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.hm returns true if a node has material, while not pm.hm ensures only nodes without material are considered.
  • hidden (h): This attribute can help reveal or filter hidden nodes in the property model. For instance, pm.h identifies nodes marked as hidden.
  • name (n): A flexible attribute for node identification by name. For example, use pm.n "A" to target nodes named “A,” or pm.n "L*" to identify nodes with names starting with “L.”
  • ownsMaterial (om): This indicates whether a node owns material data. A simple query, such as pm.om, can help you find nodes with materials they own.
  • selected: This attribute determines whether a node is selected. For example, use pm.selected to filter for selected nodes or not pm.selected for unselected ones.
  • selectionFlag (sf) and visibilityFlag (vf): These allow you to manipulate selection and visibility states of nodes efficiently. For example, pm.sf false disables a selection flag for a node.
  • visible (v): This attribute controls whether a node is visible. Use pm.v to identify visible nodes or not pm.v to 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:

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.

Comments are closed.