Parsing through molecular systems to select the atoms or residues you need can often feel like finding a needle in a haystack. Whether you’re isolating ligands, identifying backbone atoms, or filtering for residues near an active site, manually selecting nodes can be both tedious and error-prone. Fortunately, SAMSON offers a powerful solution: the Node Specification Language (NSL).
NSL allows you to define sophisticated molecular selections using short, expressive queries. Whether you’re working with thousands of atoms or just a few specific residues, NSL simplifies the process and integrates seamlessly into SAMSON’s Document view and Find command functionalities.
Why NSL Makes a Difference
NSL helps reduce repetitive clicking and makes your workflows automated and reproducible. For example, instead of manually highlighting every alanine backbone in a protein, a single expression like "ALA* Backbone" does the job instantly.
Here’s a visual example showing how NSL is used right inside SAMSON’s Find command:

Even better, the Find box supports Tab completion. Start typing a name like "ALA and press Tab to explore all name-suggestions starting with “ALA”.
Common Use Cases
1. Select Ligands and Receptors:
node.category ligand, receptor or n.c lig, rec
2. Select Residue Ranges:
residue.id 20:40, 50:60 or r.id 20:40, 50:60
3. Hide Hydrogens:
H — matches hydrogen atoms
4. Atoms by Chain:
atom.chain A, B or simply a.c A,B
5. Topological Queries:
Need to find atoms connected to sulfur within 3 bonds? Try:
a.s C wb 3 of a.s S
Shortcuts and Symbolism
Each node type has a shorthand to make expressions more compact. The attribute space residue is short for r, atom becomes a, and node is simply n. So n.t r and not r.t CYS means: select all residues that are not cysteines.
Proximity Searches
Need to find atoms close to a site? You can use spatial queries like:
n.t a within 5A of "GLN 2" out of "GLN 2"
This will return all atom nodes within 5 angstrom of GLN 2 — but not those in GLN 2 itself.
Let the AI Help You
Still learning the syntax? SAMSON’s AI Assistant can generate NSL queries tailored to your current document. Just click the
next to the selection string or filter field. It’s contextual, which means it understands your current molecular document.
NSL dramatically boosts efficiency and accuracy when working with complex molecular models. Learning to write even basic NSL expressions pays dividends quickly, and SAMSON makes it easy to get started, thanks to auto-completion and AI assistance.
To learn more about NSL, explore the official documentation.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net
