Molecular modelers often face the challenge of efficiently identifying, organizing, and querying molecular groups within complex models. The structural group attributes available in SAMSON’s Node Specification Language (NSL) are a powerful way to address this problem—allowing users to filter and operate on specific molecular groups with precision. Whether you’re handling large protein structures or detailed molecular simulations, these attributes can save you valuable time and effort while ensuring accuracy in your workflows.
Understanding Structural Group Attributes
Structural group attributes (structuralGroup attribute space) are designed to specify and query molecular groups, such as residues or chains. These attributes focus on properties ranging from the number of atoms to visibility states, making it possible to tailor your queries to the specific needs of your project. For convenience, many attributes even feature short names such as sg.vf for visibilityFlag.
Two Types of Attributes
The structural group attributes are divided into two categories:
- Inherited attributes: These are borrowed from the generic ‘node’ attribute space and apply broadly to NSL nodes. Examples include
structuralGroup.name(sg.n) to filter by name, andstructuralGroup.hidden(sg.h) to target hidden groups. - Specific attributes: These apply exclusively to structural groups and provide deeper insights. For instance, attributes like
structuralGroup.numberOfAtoms(sg.nat) orstructuralGroup.partialCharge(sg.pc) enable a level of granularity tailored to particular modeling needs.
Practical Use Cases
Here are some examples of how these attributes might be applied in molecular modeling workflows:
- Counting Specific Elements: Need to filter structural groups with a certain number of Nitrogen atoms? Use
sg.nN. Example:sg.nN > 5targets all groups with more than 5 Nitrogen atoms. - Analyzing Formal Charges: To identify charged groups, you can query
sg.fc(formalCharge). Example:sg.fc 2matches groups with a formal charge of 2. - Visibility Management: Simplify rendering by toggling visibility. Example:
not sg.vfilters out groups that are not visible, aiding in decluttering views of large systems. - Making Selections Easier: Retrieve only selected groups using
sg.selected. Example:sg.selectedisolates groups you’ve already marked as relevant in your project.
Example: Filtering by Atom Count
Let’s break down a real-world example. Suppose you are working on a large molecule and want to focus on groups with atom counts between 100 and 200:
sg.nat 100:200
This query matches all structural groups where the number of atoms falls within the range 100–200, ensuring targeted operations without handling irrelevant data.
Helpful Documentation to Deepen Your Understanding
While the above examples serve as a starting point, SAMSON’s documentation offers a wide range of detailed descriptions for each attribute, including practical examples. Be sure to visit the Structural Group Attributes documentation to dive deeper into how these features can enhance your molecular modeling experience.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.
