A molecular structure can contain thousands of atoms, but a binding-site question is usually much narrower: Which receptor atoms are close to the ligand? Which nearby residues should I inspect? Are there waters or polar groups in the same region? Rebuilding these selections by hand can be tedious—and small changes in what you select (atoms versus residues, for example) can change the result substantially.
SAMSON’s Node Specification Language (NSL) lets you express these questions as reusable selections. The examples below focus on a practical workflow for exploring ligand contacts, starting with a simple distance query and then adding chemical and structural filters.
Start with the contact definition
For receptor atoms within 5 Å of a ligand, the example expression is:
(n.t a in n.c rec) w 5A of n.c lig
Read it from the inside out: n.c rec identifies the receptor, n.t a in ... specifies atoms in that receptor, and w 5A of n.c lig limits the selection to those within 5 Å of the ligand. This gives you a concrete starting point for inspection without first deciding which residue types matter.
The selected level matters. If the goal is to list nearby residues rather than atoms, use a residue selection:
n.t r w 5A of n.c lig
That distinction is useful when moving between questions such as “Which atoms make close contacts?” and “Which residues line the pocket?”
Add chemistry only when it answers a question
Once you have the contact region, narrow it to the chemical feature you want to study. To select receptor polar oxygen and nitrogen atoms within 3 Å of the ligand:
(a.s O,N in n.c rec) w 3A of n.c lig
To focus on aromatic residues within 5 Å—a useful way to identify candidates for further inspection—use:
r.t PHE,TYR,TRP,HIS w 5A of n.c lig
For water molecules near the ligand, the corresponding selection is:
n.c wat w 4A of n.c lig
These are different kinds of questions, so their distance cutoffs need not match. A 3 Å selection of polar atoms is not interchangeable with a 5 Å selection of aromatic residues; choose the cutoff and node type to fit the contact you are examining.
Combine conditions without losing their meaning
NSL expressions can combine proximity with other filters. For example, receptor residues near the ligand with a pI below 6 are expressed as:
(n.t r w 5A of n.c lig) and (r.pI < 6.0)
When excluding a group, make the scope of not explicit with parentheses. The example for ligand heavy atoms (non-hydrogen atoms) is:
(n.t a in n.c lig) and not a.s H
For a pocket defined by residues 30–50 in chain A, then selecting their atoms, the example is:
n.t a in (r.id 30:50 in c.n "A")
These patterns help keep a query readable: first describe the group or region of interest, then add the contact or chemical condition. When a selection is broader or narrower than expected, inspect the expression in smaller pieces—such as the receptor, chain, residue range, and distance condition—before combining them.
Ask a more specific contact question
Many useful analyses are intersections of simple selections. To find water oxygens within 3 Å of both receptor and ligand, the example is:
(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)
To find ligand atoms within 2 Å of receptor oxygen or nitrogen atoms:
(n.t a in n.c lig) w 2A of (a.s O,N in n.c rec)
And to identify close approaches between ligand and receptor heavy atoms, excluding hydrogens on both sides:
((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 expressions make the intent explicit: which side of the interaction is being selected, what counts as a contact, and which atoms are excluded. That clarity makes selections easier to revisit and adapt—for example, changing a cutoff or switching from atoms to residues while keeping the same biological question in view.
For more NSL selection patterns, see the NSL examples documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
