Molecular modelers often face challenges when trying to efficiently specify groups of nodes in complex molecular systems. If you’ve ever needed a precise and flexible way to manage node group definitions, SAMSON’s Node Specification Language (NSL) offers a powerful solution through its node group attributes. This article dives into how node group attributes work, their practical applications, and concrete examples to get you started.
What Are Node Group Attributes?
In SAMSON’s NSL, attributes defined in the nodeGroup attribute space (short name: ng) allow you to manage and query properties of node groups effectively. By applying these attributes, you can precisely filter, manipulate, and interact with specific groups of nodes in your molecular models. NSL also extends certain attributes from the general node attribute space to nodeGroup, enhancing its functionality.
Core Attributes in nodeGroup
Let’s break down the key attributes available in the nodeGroup attribute space:
| 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 |
Attribute Highlights
name: Enables you to refer to a node group by its name. You can use exact strings in quotes or patterns (e.g.,L*for names starting withL).selected: Checks whether a node group is selected in the workspace (value:true) or not (false).selectionFlag: A more granular check for nodes flagged by selection, wheretrueandfalsedifferentiate states.
Practical Examples
For a more hands-on understanding, let’s look at how these attributes can be used:
ng.n "Group1": Matches a node group namedGroup1.ng.selected: Returns all selected node groups.not ng.sf: Excludes node groups that have theselectionFlag.
Combining these attributes into logical expressions broadens their usability, allowing you to answer specific queries about your model and streamline workflows.
Why Use Node Group Attributes?
Node group attributes are instrumental in tasks requiring efficient filtering and querying within molecular systems. Whether you’re analyzing specific molecular clusters, automating repetitive actions, or isolating regions of interest, these attributes can save valuable time and improve modeling accuracy.
To learn more about how to utilize these and other NSL features, visit the complete documentation at SAMSON Node Group Documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get started today by downloading SAMSON at https://www.samson-connect.net.
