Molecular modelers often face the challenge of working with complex systems containing a multitude of structural groups. Efficiently identifying and filtering these structural groups based on specific criteria can save significant time and effort. The Node Specification Language (NSL) in the SAMSON Integrative Molecular Design Platform provides a robust solution by allowing users to apply powerful filtering rules to structural groups. In this post, we will explore how to leverage the structuralGroup attributes in NSL to simplify molecular modeling workflows, along with practical examples.
Why Use Structural Group Attributes?
In molecular modeling, you often need to focus on specific structural groups of interest. This might include selecting groups with a certain number of atoms, specific formal charges, or distinctive composition. By using structuralGroup attributes with NSL, you can define precise filters and queries, enabling a more targeted analysis of molecular systems.
Understanding the Attribute Space
In SAMSON, the structuralGroup attributes represent properties inherent to a structural group. This attribute space focuses exclusively on structural group nodes and includes both inherited attributes (from the general node space) and attributes specific to structural groups. Each attribute has potential values (e.g., true or false, integers, or floats) and short names for brevity.
Here’s an overview of key attributes:
- Inherited Attributes: For example,
hasMaterial(sg.hm),hidden(sg.h), orselected(sg.selected) allow you to work with general node properties. - Structural Group-Specific Attributes: Attributes like
formalCharge(sg.fc),numberOfAtoms(sg.nat), andnumberOfCarbons(sg.nC) enable deeper exploration of the chemistry of the structural groups.
Practical Examples
Let’s dive into a few examples to see how NSL queries can help refine your analyses:
1. Filtering by Formal Charge
The formalCharge attribute (sg.fc) matches structural groups with a specific formal charge.
For instance:
sg.fc 1: Finds structural groups with a formal charge of 1.sg.fc 6:8: Selects structural groups with a formal charge between 6 and 8.
2. Identifying Groups by Atom Count
The numberOfAtoms attribute (sg.nat) lets you match structural groups with specific atom counts.
For example:
sg.nat > 100: Finds structural groups containing more than 100 atoms.sg.nat 100:200: Matches structural groups with atom counts between 100 and 200.
3. Filtering by Specific Element Counts
If you need to filter structural groups by specific atoms like Carbons, Nitrogens, or Hydrogens, use attributes such as numberOfCarbons (sg.nC) or numberOfNitrogens (sg.nN). These work similarly to numberOfAtoms. For example:
sg.nC < 10: Selects structural groups with fewer than 10 Carbon atoms.sg.nN 5:15: Matches structural groups with 5 to 15 Nitrogen atoms.
4. Querying Structural Groups by Partial Charge
With the partialCharge attribute (sg.pc), you can identify structural groups with specific partial charges. For example:
sg.pc 1.5:2.0: Filters groups with partial charges ranging from 1.5 to 2.0.
Applying NSL Filters
NSL filters can be combined to form complex queries. For example, if you are searching for structural groups with Carbon atoms between 10 and 20 and a partial charge greater than 1.5, your query would look like this:
|
1 |
sg.nC 10:20 and sg.pc > 1.5 |
Conclusion
Mastering structuralGroup attributes opens up new possibilities for efficiently analyzing molecular systems. By tailoring filters in NSL, molecular modelers can streamline their workflows, uncover meaningful insights, and focus on specific areas of interest within complex structures.
To explore the full list of structural group attributes and examples, visit the official documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Download SAMSON at SAMSON Connect.
