A common molecular-modeling task sounds simple: find the residues around a ligand. But a useful analysis often needs more than “everything nearby.” You may want residues rather than atoms, exclude particular amino acids, distinguish tight contacts from a broader pocket, or identify waters that could participate in binding. Repeating those selections manually is tedious—and makes it harder to apply the same criteria consistently.
In SAMSON, Node Specification Language (NSL) lets you express these criteria as reusable selections and filters. The examples below show how to build a small, practical workflow around a ligand. The key idea is to be explicit about what kind of node you want to select and how far away it should be.
Start with residues, not atoms
If your goal is to inspect the pocket’s amino-acid composition, select residues within 6 Å of the ligand and exclude glycine and alanine:
((n.t r and not r.t GLY,ALA) in n.c rec) w 6A of n.c lig
This expression combines three filters: n.t r specifies residues, n.c rec restricts the search to the receptor, and w 6A of n.c lig keeps nodes within 6 Å of the ligand. The residue-type condition removes GLY and ALA from the result. This is useful when you want a manageable list of candidate side chains—for example, as a starting point for a mutagenesis review.
To select atoms belonging to nearby residues instead, change the requested node type:
n.t a in (n.t r w 5A of n.c lig)
That distinction matters. A residue-level selection is convenient for identifying pocket contributors; an atom-level selection is more useful when you need to inspect the precise contacts or prepare an atom-focused analysis.
Separate the pocket from direct contacts
A 5 Å neighborhood can help define the binding pocket, while a tighter cutoff can highlight close contacts. For example, select ligand atoms within 2 Å of receptor atoms with:
(n.t a in n.c lig) w 2A of n.c rec
For a steric-clash-oriented screen, the example narrows both sides to non-hydrogen atoms and uses a 2.2 Å cutoff:
((n.t a in n.c lig) and not a.s H) w 2.2A of ((n.t a in n.c rec) and not a.s H)
These selections answer different questions. A broad neighborhood helps describe the pocket; a short-distance selection calls attention to close approaches that may warrant inspection. A cutoff is a selection criterion, not by itself a conclusion about whether an interaction is favorable or unfavorable.
Check waters and polar contacts separately
Waters can be important in a binding site, so it can help to inspect them independently from protein residues. To find waters within 4 Å of the ligand, use:
n.c wat w 4A of n.c lig
To find water oxygens within 3 Å of both receptor and ligand, combine the two proximity tests:
(a.s O in n.c wat) and (n.t a w 3A of n.c rec) and (n.t a w 3A of n.c lig)
This is a useful way to identify candidate bridging waters for closer examination. It does not establish that a water forms a favorable bridge; it selects atoms meeting the stated distance criteria.
You can also focus on polar receptor atoms near the ligand:
(a.s O,N in n.c rec) w 3A of n.c lig
Or reverse the selection to find ligand atoms near receptor backbone nitrogen atoms:
(n.t a in n.c lig) w 3A of (a.s N in n.t bb)
Make complex selections easier to check
When an expression combines several conditions, build it in stages. First select the relevant node type and molecular category; then add the distance condition; finally add exclusions or chemical properties. This makes it easier to spot whether a result is empty because of the distance, the node type, or a category restriction. Parentheses also help keep combined conditions readable.
For example, the distance operator w appears in the documentation’s within-distance selections, while b is used for beyond-distance selections, such as finding ligand atoms more than 6 Å from receptor atoms:
(n.t a in n.c lig) b 6A of n.c rec
That can help separate atoms in contact with the receptor from atoms that remain outside the chosen neighborhood. As with any cutoff-based selection, adjust the distance to suit the question and inspect the resulting structure before drawing conclusions.
These patterns make a good starting point for a repeatable binding-site workflow: identify nearby residues, inspect their atoms, check close contacts, and review waters and polar groups as separate cases. For more NSL expressions and selection examples, see the NSL examples reference.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
