Finding the atoms you need in a molecular structure can be surprisingly fiddly. A residue may contain many atoms, a structure may include several chains and alternate locations, and a selection that looks right in the viewport can be hard to reproduce later. SAMSON’s Node Specification Language (NSL) lets you describe selections as explicit criteria, so you can refine them step by step instead of relying on repeated manual picking.
Atom attributes live in the atom attribute space, abbreviated a. A useful way to build a query is to start with one clear condition, then combine it with additional filters using and. For example, to match heavy atoms in chain A, use:
node.type atom and atom.chain A and atom.heavy
The short form is n.t a and a.c A and a.nonH. Here, node.type atom limits the selection to atom nodes, atom.chain A specifies the chain, and atom.heavy excludes hydrogen atoms. This kind of combination is useful when a broad selection is too inclusive but a long list of individually clicked atoms would be tedious.
Start with the biological region
For a protein backbone-focused selection, the aminoAcidBackbone attribute matches heavy atoms belonging to an amino-acid backbone. Add a residue-number range to narrow the result:
atom.aminoAcidBackbone and atom.residueSequenceNumber 40:50
Short form: a.aabb and a.resi 40:50. This expresses the intent directly: backbone atoms in residues 40 through 50. If you are comparing chains, add a chain criterion, such as and atom.chain B. The documentation’s example also shows how to focus on named backbone atoms: "CA" and atom.aminoAcidBackbone.
Use chemical properties to refine the selection
Attributes can describe chemistry as well as structure. To select aromatic carbon atoms, combine the element symbol with the aromatic flag:
atom.symbol C and atom.aromatic
That is more specific than selecting every aromatic atom, which could include atoms of other elements. For a ring-focused query, combine atom.inRing with atom.ringSize, for example:
atom.inRing and atom.ringSize 5,6
This matches atoms in rings of size five or six. The documented ring-size behavior reports the smallest ring size when an atom belongs to rings of different sizes, so keep that in mind when interpreting the result.
Find records that may need attention
Structure quality fields can help you locate atoms worth inspecting. For example, atom.occupancy < 0.3 finds atoms with low occupancy, while atom.temperatureFactor > 75 finds atoms with high temperature factors. These queries identify candidates for review; they do not, by themselves, explain why a value is low or high.
Alternate locations can also be queried explicitly. atom.altLocation B matches atoms assigned alternate location B, and atom.altLocation B, C matches either B or C. This is useful when you want to inspect a particular conformational alternative rather than mixing alternate positions into one selection.
Be precise about what an attribute means
Some similarly named concepts are not interchangeable. In particular, atom.hetatm refers to atoms whose record type is HETATM in a Protein Data Bank file; it is not simply a general test for “not part of the protein.” Likewise, atom.heavy means non-hydrogen, not “important” or “non-water.” Combining a few well-understood attributes is safer than relying on a label that sounds broader than its documented definition.
When a query returns an unexpected result, temporarily remove one condition at a time. This makes it easier to see whether the mismatch comes from the chain, residue range, atom type, or a property that has not been assigned. Some attributes explicitly require prior computation or assignment: geometry must be computed before it can be queried, and hybridization or SYBYL types may need to be assigned first.
NSL selections are most useful when they capture the question you are asking in a form you can inspect and reuse: which atoms, in which region, with which chemical or structural properties? For the complete attribute reference and additional examples, see the SAMSON atom attributes documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
