A molecular structure can contain thousands of residues, and the useful ones are not always easy to pick out by eye. Maybe you need to inspect a particular sequence segment, compare charged side chains, or find residues in helices without selecting every atom individually. In SAMSON, the Node Specification Language (NSL) lets you describe those targets with residue attributes.
Residue queries are especially useful when your question is about a whole residue rather than one atom. In this attribute space, r is a short name for residue. For example, r.t ALA matches alanine residues. The same attribute patterns can also be written with longer names, such as residue.type ALA.
Start with identity or sequence position
If you know the residue name, query its type directly. To find histidines, use r.t HIS; to match lysines and prolines, use r.t LYS, PRO. The supported type values include standard amino-acid names, several less common residue names, and nucleic-acid codes such as A, DA, and DT.
If the structure’s residue numbering is more useful than its names, use the sequence-number attribute: r.id == 42 matches residue number 42. A range expression such as r.id 1:10, 20:30 covers residues numbered 1–10 and 20–30. This can be handy when you have a region of interest from a structure map or an analysis, while remembering that this attribute refers to the structure ID—not a biological interpretation of the sequence.
Use structural context to narrow the search
To identify residues by secondary structure, use r.ss h for alpha helices or r.ss b for beta strands. The aliases make the query flexible: helix and alpha are accepted for alpha helices, while strand and beta refer to beta strands. For loop or unstructured regions, use r.ss u.
Residue numbering and secondary structure answer different questions: one finds a location in the structure’s numbering, while the other finds a structural category. Choosing the attribute that matches your question helps keep a selection interpretable and avoids relying on visual inspection alone.
Separate chemical concepts that sound similar
Two charge-related attributes are easy to confuse. r.c neg matches amino-acid residues with a negatively charged side chain; r.c pos matches those with a positively charged side chain. By contrast, r.fc refers to the residue’s total formal charge, which can be compared numerically—for example, r.fc > 1. Side-chain charge and total formal charge are not interchangeable, so choose based on what you are trying to examine.
Polarity has its own attribute: r.p polar matches amino-acid residues with a polar side chain, and r.p acidic, basic matches residues with acidic or basic side chains. For hydrophobicity, the page describes values based on the Kyte–Doolittle scale; an example query is r.hydrophobicity < 0. These properties are defined by residue type, so residues of the same type share the same value for them.
Check what the query actually matches
Residue attributes can describe the residue itself or help you reach atoms that belong to matching residues. For example, "CA" in r.t VAL matches alpha carbons named CA in valine residues. Similarly, "CA" in r.ter matches alpha carbons in terminal residues. This distinction is useful when your final target is an atom, but the reason for selecting it is a property of its surrounding residue.
For a quick orientation, the residue reference groups attributes into inherited node properties, structural-group properties, structure-dependent properties, and properties determined by residue type. That organization helps explain why a sequence number may vary from one occurrence to another, while a residue-type property such as polarity is shared by occurrences of the same type.
See the residue attribute reference for the complete list of attributes and examples.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
