Molecular modeling often involves managing and analyzing large, complex molecular systems. As a modeler, you likely recognize the need to fine-tune how individual parts of a molecular system are organized and interact with each other. Node group attributes in SAMSON’s Node Specification Language (NSL) are a handy tool for these tasks. If you’re wondering how node group attributes can make your workflows more efficient and intuitive, this post is for you.
What are Node Group Attributes?
Node group attributes are housed in the nodeGroup attribute space, which is abbreviated as ng. These attributes are specifically designed to apply to node group nodes within SAMSON, offering modelers refined control over grouped entities. What makes node group attributes particularly user-friendly is their inheritance from the more general node attribute space while remaining tailored for grouped nodes.
Key Attributes and Their Usage
The following table summarizes the most commonly used node group attributes, their shorthand names, and examples of how to use them effectively:
| Attribute name | Short name | Possible values | Examples |
|---|---|---|---|
| name | n |
strings in quotes | ng.n "A"ng.n "L*" |
| selected | true, false |
ng.selectednot ng.selected |
|
| selectionFlag | sf |
true, false |
ng.sf falseng.sf |
Details of Key Attributes
Name
The name attribute enables users to label and reference node groups efficiently. This is especially helpful when managing systems with numerous node groups. The attribute uses string values enclosed in quotes. Examples of usage include ng.n "A", to specify a group named “A,” or ng.n "L*", to target groups with names that match the pattern “L*”.
Selected
The selected attribute determines whether a node group is actively selected. You can test whether a group is selected (ng.selected) or not (not ng.selected). This attribute does not have a shorthand name, so its full name must be explicitly written in queries.
SelectionFlag
Similar to selected, the selectionFlag attribute (ng.sf for short) adds another layer of control by flagging specific groups during workflows. It supports two values: true and false. For example, ng.sf false would identify groups without the selection flag.
Streamlining Workflows with Node Group Attributes
Understanding and leveraging node group attributes can significantly improve your efficiency as a molecular modeler. By using attributes like name, selected, and selectionFlag, you can rapidly segment, identify, and manipulate molecular groups. Whether you’re examining specific regions within a biomolecule or isolating subsets of a larger system, these attributes provide granular control to suit your needs.
For further details and examples, please visit the full documentation page here.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.
