Understanding and Using Property Model Attributes in SAMSON
For molecular modelers working with SAMSON, understanding the propertyModel attribute space can be a crucial step to enhance workflows and improve efficiency. These attributes allow you to define and interact with property model nodes using specified parameters, empowering you to fine-tune your molecular modeling tasks. This guide breaks down some key propertyModel attributes, their meanings, and how to use them effectively.
The propertyModel attribute space (short name: pm) organizes attributes that specifically apply to property model nodes. Utilizing these attributes effectively can help you manage material properties, visibility flags, selection properties, and more.
Key Property Model Attributes
Here are some frequently used attributes, their meanings, and examples of how they can be applied:
hasMaterial(hm): This attribute checks whether a property model node has material attached to it. Values can betrueorfalse. Example usage:pm.hm(checks if a node has material),not pm.hm(checks if it doesn’t).hidden(h): This indicates whether the node is hidden. Again, it supportstrueorfalsevalues. Example usage:pm.h(checks if the node is hidden),not pm.h(checks if it is visible).name(n): This allows you to query nodes based on their name. You can use strings in quotes, along with wildcards. Example usage:pm.n "A"(checks if the node name is “A”),pm.n "L*"(checks if the node name starts with the letter “L”).ownsMaterial(om): This checks whether the node owns material, with possible valuestrueorfalse. Example usage:pm.om(checks if the node owns material).selected: This attribute detects whether the node is selected. This does not have a short name. Example usage:pm.selected(checks if the node is selected),not pm.selected(checks if it’s not selected).selectionFlag(sf): Used for selection flags, this attribute works withtrueorfalse. Example usage:pm.sf false,pm.sf.visibilityFlag(vf): This attribute checks the visibility flag of a node. Example usage:pm.vforpm.vf false.visible(v): Indicates whether the node is visible. Example usage:pm.v(checks if the node is visible) ornot pm.v.
Efficient Filtering and Querying
A practical use of these attributes is filtering and querying nodes effectively. For instance, if your molecular model contains thousands of nodes, using attributes like pm.n with wildcards can help you quickly identify relevant parts by name. Similarly, toggling visibility or selection flags (pm.v, pm.selected) makes it easier to focus on specific parts without manually combing through complex visualizations.
Inherited Properties
Most of the propertyModel attributes are inherited from the general node attribute space. However, they are specialized to work on property model nodes specifically, giving you more precise control when compared with generic node filters.
Each attribute is part of a larger language designed to bring mathematical precision to your molecular design tasks. Whether you’re organizing materials, analyzing visibility, or tagging nodes by name, these attributes form the building blocks for more advanced modeling workflows.
For a full list and detailed explanations of available property model attributes, visit the official SAMSON documentation.
SAMSON and all SAMSON Extensions are free for non-commercial use. Download SAMSON at https://www.samson-connect.net.
