For molecular modelers and designers, effective data representation and filtering are crucial to make informed decisions. One challenge faced by many is navigating through complex hierarchical molecular models to select and define groups of nodes efficiently. This is where SAMSON’s Node Specification Language (NSL) and its nodeGroup attributes can be incredibly useful.
The nodeGroup attribute space in NSL is specifically designed to provide control over grouped nodes in SAMSON. In this blog post, we'll delve into the core attributes of nodeGroup, helping you leverage its functionality for streamlined molecular modeling.
What Are Node Group Attributes?
The nodeGroup attribute space, abbreviated as ng, is tailored for working with node groups in NSL. These attributes help modelers categorize, select, and manipulate groups of nodes effectively. The key attributes of nodeGroup include:
- name (n): Used to specify or filter node groups by their name.
- selected: Indicates whether a node group is selected or not.
- selectionFlag (sf): A boolean attribute that interacts with the selection state of the node group.
Diving Into the Attributes
1. The name Attribute
The name attribute (short name: n) allows you to work with node groups based on their names. Whether searching for specific groups or filtering those that match a pattern, this attribute is essential for organizing large models.
Examples:
ng.n "A": Selects node groups with the name "A".ng.n "L*": Selects node groups with names starting with "L".
By using quoted strings as values, modelers can find and filter the desired node groups with precision.
2. The selected Attribute
This attribute reflects the selection state of node groups. It accepts boolean values (true or false) and is particularly useful when assessing node interaction or isolating certain groups.
Examples:
ng.selected: Filters all currently selected node groups.not ng.selected: Filters all node groups that are not selected.
Whether you're reviewing only the highlighted parts of your model or analyzing unselected groups, selected simplifies your workflow.
3. The selectionFlag Attribute
The selectionFlag (short name: sf) provides another way to interact with the selection state. This is particularly useful during scripting or defining conditions for selection tasks.
Examples:
ng.sf false: Filters node groups whereselectionFlagis set tofalse.ng.sf: Filters node groups with atrueselectionFlag.
While similar to selected, the selectionFlag attribute gives additional flexibility in scripting and conditional filtering.
Start Experimenting
By understanding and leveraging nodeGroup attributes, molecular modelers can streamline operations in SAMSON. Whether filtering node groups by name, understanding or managing selection states, these attributes open possibilities for detailed and efficient customizations.
To dive deeper into these attributes and explore more advanced examples, visit the official documentation page.
SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON at https://www.samson-connect.net.
