Demystifying Property Model Attributes in Molecular Design

In molecular design, the ability to effectively manage and manipulate properties of different nodes is crucial for building robust simulations and models. This is where property model attributes in SAMSON come into play. If you’ve ever struggled with filtering or configuring nodes based on specific attributes, this post will help clarify how you can use these attributes to enhance your workflows.

What are Property Model Attributes?

Property model attributes are defined within the propertyModel attribute space—abbreviated as pm. These attributes govern the behavior of property model nodes, which specifically handle node properties in SAMSON. If you’re working on tasks like material assignment or visibility control, you’ll likely find these attributes indispensable.

Each attribute comes with a short name for convenience, allowing you to write succinct queries. For instance, instead of repeatedly typing propertyModel.hasMaterial, you can use its short name pm.hm for quick checks.

Key Attributes and Their Use Cases

Attribute Description Short Name Example Query
hasMaterial Checks if a node has material assigned. hm pm.hm, not pm.hm
hidden Filters hidden property nodes. h pm.h, not pm.h
name Filters by node names using quoted strings. n pm.n "A", pm.n "L*"
visible Checks node visibility to control rendering. v pm.v, not pm.v

Example: Filtering Nodes

Imagine you are analyzing a molecular system with material nodes, and you want to filter out nodes that aren’t visible or don’t contain material. Using property model attributes, here’s how you can achieve this:

  • pm.hm: Select nodes with material.
  • pm.v: Ensure only visible nodes are selected.

Combining these attributes, a query such as pm.hm and pm.v ensures that only visible nodes containing material are selected, saving you time and effort in controlling node visibility or compliance.

Inherited Attributes

Most property model attributes inherit their behavior from the broader node attributes but are scoped specifically to property model nodes. For example:

  • hidden: Works similarly to node.hidden, but applies only to property model nodes.
  • hasMaterial: Derived from node.hasMaterial.
  • selectionFlag: Allows selection control for property model nodes.

Conclusion

Property model attributes are powerful tools for tailoring your simulation environment in SAMSON. Whether you’re filtering nodes, managing visibility, or customizing properties, the versatility of these attributes ensures that you can optimize your molecular design workflows.

For a comprehensive guide with examples of all property model attributes, visit the official documentation page.

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

Comments are closed.