Understanding Property Model Attributes in SAMSON’s NSL

If you're a molecular modeler, you've probably encountered challenges in efficiently organizing, identifying, and filtering nodes or components within complex molecular models. SAMSON's Node Specification Language (NSL) provides a solution to this with its property model attribute space, abbreviated as pm. This blog post will walk you through its structure and application to help streamline your molecular modeling workflows.

What are Property Model Attributes?

Property model attributes in SAMSON are specialized attributes used to define and filter property model nodes. These attributes allow users to streamline their operations by focusing on specific properties, such as visibility, material ownership, or specific names of the nodes. For molecular modelers, these tools are invaluable in managing complex systems.

Key Attributes and What They Do

The property model attribute space includes several attributes inherited from the broader node attribute space. Each provides a targeted way to manage and manipulate nodes. Here's a short overview:

  • hasMaterial (hm): Defines whether the property model node has a material. Possible values are true or false. Example: pm.hm.
  • hidden (h): Indicates if the node is hidden. Possible values: true or false. Example: pm.h.
  • name (n): Refers to a string representing the name of the node. Example: pm.n "MyNode".
  • ownsMaterial (om): Specifies if the node owns material. Possible values: true or false. Example: pm.om.
  • selected: Indicates if the node is selected. While it does not have a short name in this context, it can be checked with expressions like pm.selected.
  • selectionFlag (sf): A flag for selection status. Example: pm.sf false.
  • visibilityFlag (vf): A flexible visibility indicator. Example: pm.vf false.
  • visible (v): Defines if the node is visible. Example: pm.v.

Putting It into Practice

Let's consider a scenario: you're handling a molecular model with several property nodes, some of which represent specific materials, while others are hidden. Using property model attributes, you could write expressions like the following to streamline your work:

  • pm.hm: Retrieve nodes that have material.
  • not pm.h: Filter nodes that are not hidden.
  • pm.n "L*": Identify nodes whose names start with 'L'.
  • pm.om and pm.v: Find nodes that own material and are visible.

With these tools, molecular modelers can efficiently focus on specific components within their models without manually sifting through complex structures.

Where to Learn More

For a deeper dive into the property model attribute space in SAMSON and to see additional examples, head to the official documentation: Property Model Attributes Documentation.

SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON from SAMSON Connect.

Comments are closed.