For molecular modelers using SAMSON, understanding how to work with the propertyModel attribute space effectively can save a lot of time and effort. If you’re dealing with property model nodes and want to tailor your scripts or queries efficiently, you’ll need to have a solid grasp on the attributes available. This blog post aims to demystify some key propertyModel attributes and their usage.
Why Understanding PropertyModel Attributes Matters
Molecular modeling often requires precise control over different nodes’ states, properties, or visibility. For instance, you may need to isolate specific nodes that have a material attached to them or manipulate the visibility of certain nodes based on their attributes. By leveraging propertyModel, you can target property model nodes directly and use its attributes to manage your molecular models more intuitively.
Key Attributes Overview
The propertyModel attribute space includes several attributes that help streamline node specifications. Here’s a quick summary:
| Attribute Name | Short Name | Possible Values | Examples |
|---|---|---|---|
| hasMaterial | hm |
true, false |
pm.hm or not pm.hm |
| hidden | h |
true, false |
pm.h or not pm.h |
| name | n |
String | pm.n "A" or pm.n "L*" |
| ownsMaterial | om |
true, false |
pm.om |
| selected | N/A | true, false |
pm.selected or not pm.selected |
| selectionFlag | sf |
true, false |
pm.sf false or pm.sf |
| visibilityFlag | vf |
true, false |
pm.vf false or pm.vf |
| visible | v |
true, false |
pm.v or not pm.v |
Real-World Usage
Let’s say you want to filter and isolate nodes that have material attached to them while hiding everything else. By using attributes like hasMaterial and hidden, you can specify your preferences directly:
|
1 |
pm.hm and not pm.h |
This expression identifies all property model nodes with material that aren’t hidden. Similarly, to find and manipulate nodes based on their names (e.g., nodes starting with “L”), you could write:
|
1 |
pm.n "L*" |
Conclusion
The propertyModel attributes offer significant flexibility for anyone working with molecular models. By mastering these attributes, you can fine-tune your models and queries to exactly match your needs, saving time and reducing errors.
To learn more, check out the official documentation here: Property Model Attributes in SAMSON.
SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON today at https://www.samson-connect.net.
