When a molecular structure contains many chains, it is easy to lose time inspecting them one by one. A chain may be longer than expected, split into several segments, or identified by an ID that is not obvious from a quick look. SAMSON’s Node Specification Language (NSL) lets you describe chain-level criteria directly, so you can narrow your search using attributes such as chain ID, residue count, and segment count.
Start with the chain ID
If you already know which chain to inspect, use the chainID attribute, abbreviated c.id. For example, c.id 1 matches a chain whose ID is 1. To match IDs in a range and another individual ID, use c.id 2:4, 6. This is a useful first check when a structure has several chains and you want to focus on a specific subset.
The documented values for this attribute are integers. If you are thinking of a chain label such as A, use the chain name attribute instead: c.n "A". Names are strings and must be written in quotes. The distinction matters: an ID query and a name query test different attributes.
Use residue count to find unusually long chains
Chain length is often the quickest way to spot a chain that deserves closer inspection. The numberOfResidues attribute has the short name c.nr. For example, c.nr > 130 matches chains with more than 130 residues, while c.nr 100:130 matches chains in the documented 100-to-130 range.
These two forms answer slightly different questions. A threshold is handy when you want to find chains above a size of interest; a range is useful when you are looking for chains within a known size window. The same pattern works for several other numerical attributes: use a comparison such as c.nat < 1000 for atom count, or a range such as c.ns 1:3 for segment count.
Don’t confuse residues, segments, and structural groups
Three counts can sound similar but describe different things. c.nr is the number of residues, c.ns is the number of segments, and c.nsg is the number of structural groups. For example, c.ns > 2 finds chains with more than two segments, whereas c.nsg > 10 finds chains with more than ten structural groups.
Choosing the attribute that matches your question helps avoid misleading filters. If you are checking chain length, use the residue count rather than assuming that a segment or structural-group count means the same thing. If you are investigating how a chain is organized, segment count may be the more relevant starting point.
A simple chain-triage routine
-
Check identity with
c.id 1or, for a quoted chain name,c.n "A". -
Check size with a threshold such as
c.nr > 130, or use a range such asc.nr 100:130. -
If organization matters, inspect segment and structural-group counts with
c.nsandc.nsg. -
Use atom count, for example
c.nat < 1000, when the question is about the total number of atoms rather than residues.
Each expression above is a focused chain-level query. The chain attribute space matches chain nodes, and it also exposes inherited attributes, including visibility, selection state, and chemical counts such as numbers of carbons, nitrogens, and oxygens. That makes it possible to choose a criterion that fits the task instead of relying on one generic notion of chain size.
For the complete attribute reference and additional examples, see the SAMSON chain attributes documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
