When a molecular structure is large, finding the residue you need can feel like searching for one label in a wall of atoms. Maybe you want to inspect a particular sequence position, locate every histidine, or distinguish helical residues from loops. Selecting by residue attributes in SAMSON’s Node Specification Language (NSL) gives you a more direct way to describe what you are looking for.
Residue queries use the residue attribute space. Its short forms are res and r, so the examples below use the compact r prefix. A useful habit is to start with one clear criterion, check what it matches in your structure, and then refine the query if needed.
Start with residue identity
To find a particular amino acid type, use r.t followed by its three-letter code. For example, r.t HIS matches histidine residues, while r.t LYS, PRO matches lysines and prolines. You can also search for nucleic-acid residue types, such as r.t A or r.t DA.
This is useful when an experiment or analysis refers to residue identity rather than an atom name. If you specifically need atoms inside matching residues, the documented expression "CA" in r.t VAL matches alpha carbons named CA in valines. That distinction helps avoid confusing a residue-level selection with a search for individual atoms.
Use sequence numbers carefully
When you know a position, r.id searches by residue sequence number, also called the structure ID. For example, r.id == 42 matches residue number 42. To search multiple intervals, use r.id 1:10, 20:30.
Ranges are especially handy when you already have a list of regions to inspect. The documentation also shows r.id 42:50, 60:70. Remember that this attribute is a sequence number—not a residue type—so it answers “which numbered position?” rather than “which amino acid?”
Sort residues by structural or chemical properties
Secondary structure is searchable with r.ss. The query r.ss h finds residues in alpha helices; r.ss a, b matches alpha-helical and beta-strand residues. Aliases make the values readable in different ways: for example, helix and h both refer to alpha structure, while loop and l refer to unstructured regions.
For amino-acid side-chain charge, use r.c: r.c neg finds negatively charged residues, and r.c neu, pos matches neutral or positively charged ones. Polarity is available through r.p; for instance, r.p polar matches residues with polar side chains. These classifications can help narrow a visual inspection to a chemically meaningful group without manually checking every residue.
Check completeness and nonstandard names
Missing backbone atoms can complicate structural work. The attribute r.caab identifies residues with a complete amino-acid backbone. Residue naming can also matter: r.srn matches residues with standard PDB residue names, while r.nsrn matches those without standard names. These are useful starting points when investigating unusual residues or checking whether a structure contains naming exceptions.
Residue attributes are not limited to these examples. The reference also documents atom counts, formal and partial charge, terminal status, hydrophobicity, and more. Rather than memorizing every abbreviation, choose the question first—identity, position, structure, or chemistry—then look up the corresponding attribute and its accepted values.
For the complete attribute list and additional examples, see the SAMSON residue attributes reference.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
