A molecular structure can contain thousands of atoms, while the question you need to answer may concern only a few residues around a ligand. Selecting that region by clicking through the model is slow, and small differences in what you include—waters, side chains, or backbone atoms—can make an analysis hard to repeat.
In SAMSON, Node Specification Language (NSL) lets you describe these selections as expressions. A useful way to approach a busy binding site is to build the selection in stages: first define the nearby receptor residues, then narrow to the atoms or chemical features relevant to your question.
Start with a residue-level neighborhood
To find receptor residues within 6 Å of any ligand while excluding glycine and alanine, use:
((n.t r and not r.t GLY,ALA) in n.c rec) w 6A of n.c lig
This expression combines three ideas: n.c rec identifies the receptor category, n.c lig identifies the ligand, and w 6A of applies a distance-based neighborhood. The residue-type condition excludes GLY and ALA. The parentheses make the intended grouping visible: define the receptor residues of interest, then select those within the distance cutoff of the ligand.
That structure is helpful when adapting an expression. For example, changing 6A to 5A tightens the neighborhood; changing the excluded residue names changes the mutagenesis focus. Make one change at a time so it is easier to see which part of the selection is responsible for the result.
Choose the level that matches the question
Residues and atoms are not interchangeable selection targets. If you want the atoms that make up residues near a ligand, use an atom selection around the residue selection:
n.t a in (n.t r w 5A of n.c lig)
This is useful for defining pocket atoms from nearby residues. By contrast, if the question is specifically about backbone nitrogen contacts, select those atoms directly:
(a.s N in n.t bb) w 3A of n.c lig
The first expression gathers atoms belonging to nearby residues; the second targets nitrogen atoms in the backbone within 3 Å. That distinction matters when comparing a broad pocket view with a chemically specific contact set.
Keep waters and ligand atoms separate
Waters can be important in a binding site, but mixing them into a receptor selection can obscure what you are examining. To select waters within 4 Å of a ligand, use:
n.c wat w 4A of n.c lig
For a focused view of ligand heavy atoms, use:
(n.t a in n.c lig) and not a.s H
These expressions give you distinct sets to inspect: nearby waters, ligand atoms, and receptor residues or atoms. Keeping those categories separate makes it easier to ask follow-up questions, such as whether a water lies near the ligand or whether a receptor atom is part of the pocket.
Build complex selections carefully
NSL can combine criteria, but longer expressions are easier to maintain when each logical step is grouped clearly. For example, receptor atoms within 5 Å of a ligand and more than 3 Å from water oxygen atoms are described by:
(n.t a in n.c rec) and (n.t a w 5A of n.c lig) and (n.t a b 3A of (a.s O in n.c wat))
This illustrates a useful pattern: specify the object class, add the ligand-distance condition, then add a second spatial condition involving water oxygens. When creating your own selection, begin with a simpler expression and add one condition at a time. If the result is unexpectedly broad or empty, inspect the individual pieces before changing several filters at once.
Distance cutoffs are choices, not universal rules. A 3 Å contact selection and a 6 Å neighborhood answer different questions, so record the cutoff and selection criteria when sharing results or repeating an analysis. The expressions above provide a compact, reusable starting point for exploring a binding site without losing track of what each selection includes.
For more NSL selection examples, see the original documentation page.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
