If you’ve ever worked on a large molecular system, you likely faced this: you want to isolate atoms based on specific chemical or structural properties, but manual selection is tedious and error-prone. Whether you’re preparing a simulation or analyzing hydrogen bonding networks, the ability to precisely filter atoms is essential.
The Node Specification Language (NSL) in SAMSON offers a clean solution. With an extensive set of atom attributes, NSL helps you construct powerful, expressive queries to identify key atoms in your system without writing a script or digging through coordinate files.
What can you filter?
NSL lets you filter atoms using over 50 different attributes. These include basic properties like element and symbol, spatial positions, bonding environment, hydrogen bond roles, hybridization, planarity, and more. Some particularly useful examples:
- Element filtering:
a.s Oselects all oxygen atoms. - Hybridization:
a.hy sp2selects atoms with SP2 hybridization (e.g., in aromatic rings). - In a ring:
a.inRingfinds atoms part of ring structures. - H-bond donors and acceptors:
a.hbd,a.hbato quickly isolate these functional groups. - Aromatic atoms:
a.arto select atoms with aromatic character. - Residue-specific filtering:
a.resi 42matches atoms in residue number 42.
Combining attributes
You can also combine filters to narrow down your selection. For instance:
|
1 |
a.s O and a.hba |
selects oxygen atoms that can act as hydrogen bond acceptors.
Or try:
|
1 |
a.resi 10:20 and a.inRing and a.s N |
to select nitrogen atoms in rings, within residues 10 to 20.
Working with geometry and bonding information
Looking to pinpoint specific geometries? NSL supports geometry-based filtering too. For example:
|
1 |
a.g tet |
selects atoms with tetrahedral geometry.
You can also select atoms based on their number of bonded neighbors:
|
1 |
a.nba > 3 |
selects atoms bonded to more than three atoms.
Use cases in real workflows
- Prepare input for QM calculations: Filter only the atoms in a reaction center with partial charges
a.pc > 1. - Refine hydrogen bonding analysis: Focus on donors and acceptors in proteins:
a.hba or a.hbd - Clean up inputs: Remove low occupancy atoms:
a.oc < 0.5. - Distance filtering combo: Combine with coordinate filters like
a.z > 20Ato isolate spatial regions.
Even better, these filters integrate seamlessly into the SAMSON workspace, making it easier to build selections visually and work with them in simulations or analysis tools.
To explore the full list of attributes and create your own filters, visit the official documentation.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.
