Molecular modelers know that efficient workflows require clear and concise tools for querying and manipulating models. SAMSON, an integrative molecular design platform, offers a convenient way to interact with property model attributes using short abbreviations for common operations. This can save time and improve productivity, especially when working on large and complex models.
In the propertyModel attribute space (short name: pm), each attribute is associated with a meaningful short name. These attributes match only property model nodes, and many of them are inherited from the general node attribute space. Here, we will explore some of the most commonly used attributes and their short names to help streamline your work.
Important Attributes and Their Short Names
- hasMaterial (
hm): This attribute indicates whether a property model node has material. It can take valuestrueorfalse. Examples:pm.hm,not pm.hm. - hidden (
h): Indicates whether a node is hidden. Values:true,false. Examples:pm.h,not pm.h. - name (
n): Refers to the name of the node. Use strings in quotes to query it. Examples:pm.n "A",pm.n "L*". - ownsMaterial (
om): Indicates whether a node owns material. Values:true,false. Example:pm.om. - selected: Indicates whether a node is selected. Note that this attribute does not have a short name. Values:
true,false. Examples:pm.selected,not pm.selected. - selectionFlag (
sf): Indicates a flag for selection-related operations. Values:true,false. Examples:pm.sf false,pm.sf. - visibilityFlag (
vf): Determines visibility settings. Values:true,false. Examples:pm.vf false,pm.vf. - visible (
v): Specifies whether a node is visible. Values:true,false. Examples:pm.v,not pm.v.
Using these short names significantly reduces the complexity of queries, particularly for repetitive tasks. For instance, adjusting visibility across multiple nodes or filtering nodes based on specific properties becomes faster and more intuitive with these shorthand attribute names.
Tips for Practical Use
- When in doubt about the full meaning of a short name, remember that they are intuitive abbreviations of the full attribute name, and check the SAMSON documentation for exact details.
- Take advantage of attributes like
pm.nto efficiently query for specific nodes by their name patterns. - Experiment with negations (e.g.,
not pm.h) when working with logical flags likehiddenorvisible.
Understanding how to use property model attributes effectively allows molecular modelers to engage with SAMSON’s extensive functionality using streamlined, code-efficient approaches. Whether you are customizing visibility, selecting particular nodes, or filtering based on material ownership, these attributes provide a structured, time-saving toolset.
To dive deeper, check out the full SAMSON documentation page on property model attributes.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can learn more and download SAMSON at https://www.samson-connect.net.
