One of the recurring challenges in molecular modeling is selecting atoms based on structural properties – particularly geometry. For instance, identifying atoms with tetrahedral geometry can be important for understanding chemical reactivity, assigning force field parameters, or preparing input for quantum calculations. Instead of manually inspecting atoms, you can leverage the powerful filtering capabilities of the Node Specification Language (NSL) in SAMSON.
This guide walks you through how to use the atom.geometry attribute in NSL to target atoms of specific geometrical types programmatically. These geometry types must be computed beforehand in SAMSON (i.e., assigned), but once available, you have a precise filter at your fingertips.
Why Geometry Matters 🧬
Mapping molecular geometry helps chemists and modelers classify atoms not just by their elements or charges, but by their spatial arrangements – crucial in docking, dynamics, and structure analysis. Tetrahedral vs. linear vs. trigonal planar – these distinctions influence how a molecule behaves chemically and biologically.
Using NSL to Filter Atom Geometry
In SAMSON’s NSL, geometry-based filtering uses the attribute atom.geometry or its short version a.g.
Here’s a quick lookup of a few common geometries and their short codes:
tetrahedral→tetlinear→ltrigonalplanar→tploctahedral→oundefined→u
To select all tetrahedral atoms:
|
1 |
a.g tet |
To select atoms with either octahedral or dodecahedral geometry:
|
1 |
a.g o, d |
All geometry aliases are supported, so you can use either the full name or the short form (a.g tetrahedral or a.g tet work the same!).
Combining Geometry with Other Filters
Maybe you’re interested in tetrahedral carbon atoms only. Simple:
|
1 |
a.s C and a.g tet |
Or planar atoms with resonance:
|
1 |
a.pl and a.reso |
This flexibility lets you build very specific queries without writing a line of code.
Important: Computing Geometry First
Geometry in SAMSON isn’t automatically assigned. You need to ensure that geometry has been computed for your model. This can often be done through an extension that analyzes molecular structures. If not computed, filtering by geometry will return empty results.
Best Uses and Common Applications
- Pre-selecting atoms for ab initio or QM/MM simulations
- Understanding hybridization environments
- Filtering ligands and active site atoms by coordination geometry
- Studying chirality and stereochemistry in organic compounds
This approach saves time, improves reproducibility (no more manual clicks!), and integrates seamlessly into scripting workflows in SAMSON using NSL.
To learn more and view all available atom geometry options, visit the full documentation page: https://documentation.samson-connect.net/users/latest/nsl/atom/
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
