For molecular modelers using SAMSON, the Node Specification Language (NSL) offers powerful ways to navigate and manipulate molecular data. Among its various features, node group attributes stand out as a significant tool for working with nodeGroup nodes. In this article, we will clarify what node group attributes are, why they matter, and how to use them effectively in your modeling workflows.
Why Node Group Attributes Matter
Node group attributes open up a new level of control for users who need to work with nodeGroup nodes—collections of nodes grouped within SAMSON. By understanding this functionality, users can:
- Efficiently filter node collections using their attributes.
- Query precise groups based on custom or inherited attribute values.
- Streamline workflows by constructing targeted expressions.
This is particularly helpful when working on large or complex molecular systems, as it enables more focused data manipulation.
An Overview of Node Group Attributes
Attributes in the nodeGroup attribute space have the unique short name ng and apply exclusively to nodes of type nodeGroup. Three key attributes can be defined and used:
name(short name:n)selected(no short name)selectionFlag(short name:sf)
Practical Examples of Attribute Usage
Here’s how you can put node group attributes to use:
The name Attribute
This attribute allows you to directly query the name of a nodeGroup. You can use exact matches or wildcards to find nodes quickly.
Examples:
|
1 |
ng.n "A" |
This expression identifies a group node named “A”.
|
1 |
ng.n "L*" |
This identifies all node groups whose names begin with the letter “L”.
The selected Attribute
This boolean attribute helps determine whether a nodeGroup is selected. Selective identification can significantly optimize workflow during large-scale molecular exploration.
Examples:
|
1 |
ng.selected |
This checks if the node group is selected.
|
1 |
not ng.selected |
This checks the inverse—whether the node group is not selected.
The selectionFlag Attribute
Much like selected, this boolean attribute is used to toggle selection status, adding another layer of customization for users managing large datasets.
Examples:
|
1 |
ng.sf false |
This sets the selection flag to false.
|
1 |
ng.sf |
This queries node groups with the selection flag.
Efficiency Through Attribute Inheritance
All these attributes are inherited from the broader node attribute space while being refined specifically for nodeGroup. For instance, the name attribute in nodeGroup inherits the broader node.name capability and adapts it for targeted group use.
More Resources
The nodeGroup attributes are a small but powerful part of what NSL offers to molecular modelers. To explore the full details of node group attributes, visit the SAMSON documentation page on node group attributes.
SAMSON and all SAMSON Extensions are free for non-commercial use. To get started with SAMSON, visit SAMSON Connect.
