For molecular modelers, one of the most critical tasks is the ability to select and manipulate specific sets of atoms or groups with precision. The structuralGroup attributes in SAMSON’s Node Specification Language (NSL) provide an essential tool for handling structural group nodes based on their properties. In this post, we’ll dive into how these attributes can make your workflow more efficient and accurate.
Why Structural Group Attributes Matter
Structural groups often play a vital role in molecular modeling projects. From identifying groups of atoms with particular chemical properties to managing visibility for complicated molecular assemblies, these attributes empower modelers to work smarter, not harder. Tasks like filtering by the number of hydrogen atoms or selecting structural groups with specific formal charges can be practically automated using NSL.
Inherited vs Specific Attributes
The attributes available for structuralGroup nodes can be split into two categories:
- Inherited Attributes: Attributes like
hasMaterial,hidden, andvisibilityFlagare inherited from the general node attribute space. These attributes allow you to apply visibility or material-based filters to groups. - Specific Attributes: Structural group-specific attributes such as
formalCharge,numberOfAtoms, andnumberOfHydrogensenable fine-tuned selection of groups based on their chemical composition or properties.
Exploring Key Structural Group Attributes
Here are a few critical structural group attributes and how you can use them:
formalCharge (sg.fc)
This attribute matches groups with a specific total formal charge. For example:
sg.fc 1: Matches structural groups with a formal charge equal to 1.sg.fc 6:8: Matches groups with a formal charge between 6 and 8.
numberOfAtoms (sg.nat)
Are you looking for groups with a specific atom count? Use the number of atoms attribute:
sg.nat > 50: Matches structural groups with over 50 atoms.sg.nat 100:200: Filters groups with 100 to 200 atoms.
numberOfHydrogens (sg.nH)
This attribute allows you to isolate structural groups with specific counts of hydrogen atoms:
sg.nH < 10: Matches groups with fewer than 10 hydrogen atoms.sg.nH 5:15: Finds groups with 5 to 15 hydrogen atoms.
partialCharge (sg.pc)
If your workflow requires filtering groups by their total partial charge, this attribute is indispensable:
sg.pc > 1.5: Matches groups with a partial charge greater than 1.5.sg.pc 1.0:2.0: Filters groups with partial charges between 1.0 and 2.0.
structureID (sg.id)
Each structural group comes with a unique ID. This is helpful when working with specific groups in larger molecular models:
sg.id 5:10: Matches structural groups with IDs in the range from 5 to 10.sg.id >= 100: Filters groups with IDs greater than or equal to 100.
Practical Use Cases
The combination of these attributes facilitates countless applications. Here are a few examples:
- Selective visualization: Use
visibilityFlagandhiddenattributes to isolate specific structural groups while hiding the rest of the model for clarity. - Analysis based on atom types: Filter specific functional groups by their counts of carbon, oxygen, hydrogen, or other atoms.
- Charge localization: Focus on groups with specific formal charges to identify charged regions in your molecular model.
Learn More
These examples only scratch the surface of what you can achieve with structural group attributes in SAMSON. To dive deeper and explore further examples, check out the official documentation.
SAMSON and all SAMSON Extensions are free for non-commercial use. Get started today at SAMSON Connect.
