When a molecular structure contains several chains, choosing the right one by eye can be slow—and chain IDs alone may not tell you which chain is the long polymer, a short fragment, or a structure split into multiple segments. SAMSON’s Node Specification Language (NSL) lets you match chain nodes using identifiers and structural counts, so you can narrow the search with a query instead of relying only on visual inspection.
Chain attributes use the chain attribute space, abbreviated as c. These expressions match chain nodes. The practical starting point is to decide what you know: an ID, an approximate size, or how the chain is organized.
Start with an ID when you know it
If a chain ID is already known, use c.id. For example, c.id 1 matches chains whose ID is 1. You can also specify several IDs or a range: c.id 2:4, 6 matches IDs from 2 through 4 and ID 6. This is useful when checking a known subset of chains, without having to interpret their names or appearance first.
Use residue counts to find chains by length
When the relevant chain is known by its approximate length rather than its ID, use c.nr, the short name for numberOfResidues. For example, c.nr > 100 matches chains with more than 100 residues, while c.nr 100:120 matches chains in the 100–120 range.
This can be a useful first pass when a structure has chains of very different sizes. It also helps make the search criteria explicit: “the chain with more than 100 residues” is easier to revisit and communicate than “the long-looking one.”
Distinguish segments from structural groups
Two other counts describe different aspects of chain organization. c.ns checks the number of segments, and c.nsg checks the number of structural groups. For example, c.ns < 3 matches chains with fewer than three segments; c.nsg > 10 matches chains with more than ten structural groups.
These counts are not substitutes for residue count. A residue count answers a size question; segment and structural-group counts answer organization questions. If you are trying to identify a chain with a particular structural layout, use the relevant count rather than assuming that a chain with many residues must also have many segments or structural groups.
Choose the simplest useful query
A reliable way to work is to begin with the attribute that most directly describes the chain you want. Use c.id for a known identifier, c.nr for chain length, c.ns for segments, and c.nsg for structural groups. The full attribute names are available too—for example, chain.numberOfResidues > 100 is the long form of c.nr > 100.
NSL also provides inherited chain attributes, including atom and element counts such as c.nat (number of atoms) and c.nC (number of carbons). These can help describe a chain by composition or size, while the chain-specific attributes focus on ID and organization. Treat the examples as building blocks: select the attribute that corresponds to your actual criterion, and use its full or short name as you prefer.
For the complete attribute list and additional examples, see the SAMSON chain attributes reference.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
