When working on complex molecular models, it doesn’t take long before your document becomes cluttered with atoms, residues, molecules, and larger structural elements. One underused — but highly effective — way to keep things organized in SAMSON is by leveraging Node Group Attributes. These are simple yet powerful tools for filtering, selecting, and labeling groups of nodes, making model management much easier — especially when models become large and detailed.
Why Node Groups Matter
In SAMSON, a node group is a container that can hold other nodes. You can use this to logically organize sections of your model, such as separating ligand clusters from protein chains, or splitting different stages of a simulation.
But the true versatility of node groups comes from the attributes you can assign to them — specifically, within the nodeGroup attribute space, also known by the short name ng.
Attributes You Can Filter By
There are three useful node group attributes you can use in queries:
- name (
ng.n) — lets you match node group names using strings. This helps you identify groups by label, which is especially useful for bulk selections. - selected — a Boolean attribute that lets you filter based on selection status (works like a toggle).
- selectionFlag (
ng.sf) — another Boolean flag related to whether a node has a ‘selection flag’ set. This is slightly different from selected, and can be used in combination for more precise control.
Examples in Practice
To find all node groups whose name starts with the letter ‘L’, simply use:
|
1 |
ng.n "L*" |
This is often helpful when you name node groups in a structured way (e.g., Ligand1, Ligand2, LigandComplex).
You can also combine attributes using logical operators. For example, to select all node groups that are flagged but not currently selected, write:
|
1 |
ng.sf and not ng.selected |
Tips for Molecular Modelers
- Use naming conventions: This makes filtering and querying much more consistent.
- Group early and often: Right from early modeling stages, organizing into node groups minimizes confusion later on.
- Use selection flags for intermediate states: This lets you control visibility or export data without changing core selections.
This approach gives you far greater control over complex systems and lets you build scripts or selections that adapt as your model evolves. Once you start using node group attributes regularly, you may find yourself navigating large structures much faster, and with less manual clicking.
To explore the full documentation on node group attributes, including practical examples and a detailed attribute table, visit the official documentation page.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.
