When working on complex molecular models, a recurring challenge is to rapidly select, highlight, or filter specific atoms based on their physical or chemical properties. Whether you’re analyzing binding pockets, optimizing structures, or preparing simulations, effective atom selection can speed up your workflow and improve results.
SAMSON’s Node Specification Language (NSL) provides a powerful system for querying atoms using structured queries. In this guide, we’ll explore one of the most practical and knowledge-rich areas of NSL: atom attributes.
Why atom attributes matter
Atom attributes let you ask questions like:
- Which atoms are in aromatic rings?
- How many atoms have oxidation state greater than +2?
- Which atoms participate as hydrogen bond donors or acceptors?
- Are there any non-polar hydrogens in this substructure?
Selections based on these criteria allow for localized editing, visualization, or property assignment. Knowing how to effectively apply these filters saves time and makes your modeling more precise.
Structure of atom attribute queries
Atom-specific queries use the syntax a.[short_name] [value]. The a stands for atom, and each attribute has a short name for convenience.
For example:
a.arselects aromatic atoms.a.fc > 0selects atoms with formal charge greater than zero.a.s O and a.hbdfinds oxygen atoms that are hydrogen bond donors.
Commonly useful attributes
Here is a short list of popular atom attributes, their short names, and how they’re typically used:
- Aromaticity:
a.ar— matches atoms in aromatic systems. - Element type:
a.e Oxygen, or use symbol witha.s O. - Hydrogen bond roles:
a.hbd(donor),a.hba(acceptor). - Charge:
a.fc(formal charge),a.pc(partial charge). - Hybridization:
a.hy sp2,a.hy sp3. - Bonded atom counts: e.g.
a.nbo 2selects atoms bonded to 2 oxygens.
Advanced selection: filtering by categories
You can also query atoms by their category on the periodic table:
a.hal— halogens (F, Cl, Br, I, At)a.met— metalsa.transitionMetal— transition metalsa.alkali— alkali metals
This is especially useful when preparing molecular dynamics or quantum calculations that are sensitive to atom type.
Combining queries for precision
NSL allows conjunctions with and and disjunctions with or:
a.ar and a.s C— matches aromatic carbon atoms.a.fc < 0 or a.fc > 0— all charged atoms.
Real-world example
If you’re looking for carbons in a six-membered aromatic ring that are part of a resonance structure and participate in hydrogen bonds, your query may look like:
|
1 |
a.s C and a.ar and a.reso and (a.hbd or a.hba) |
This level of granularity makes it easier to narrow down atoms in complex environments and to take targeted actions within SAMSON.
Where to go next
You can explore the full list of atom attributes in the SAMSON NSL documentation, including detailed usage, short names, and value formats.
Whether you’re filtering metal atoms, matching specific geometries, or selecting atoms with defined partial charges, atom attributes in NSL offer a structured and powerful way to work with molecular data.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON here.
