A molecular structure can contain many chains, and the one you need is not always obvious from a quick visual inspection. You may be looking for a particular chain ID, a long chain, or one with a specific number of segments. Searching at the chain level gives you a practical way to narrow the structure before moving on to more detailed analysis.
In SAMSON, the Node Specification Language (NSL) uses the chain attribute space to match chain nodes. Its short prefix is c. That distinction matters: a chain-level query describes properties of a chain, rather than directly selecting individual atoms or residues.
Start with identity
If you know the chain ID, use c.id. For example, c.id 1 matches a chain whose ID is 1. You can also express a range and an additional ID: c.id 2:4, 6 matches chain IDs between 2 and 4, as well as ID 6.
This is useful when you want to focus on a known chain or compare a small set of chains without manually locating each one in a crowded structure. The full attribute name is chain.chainID; the shorter form is convenient for repeated queries.
Use size to narrow the search
When the chain ID is not enough, chain size can help. The number of residues is available as c.nr. For example, c.nr > 100 matches chains with more than 100 residues, while c.nr 100:120 matches chains in the documented 100–120 range.
Other counts answer different questions:
c.ns < 3looks for chains with fewer than three segments.c.nsg > 10looks for chains with more than ten structural groups.c.nat < 1000uses the inherited number-of-atoms attribute to identify chains below an atom-count threshold.
These measurements are related, but they are not interchangeable. Residues, segments, structural groups, and atoms describe different aspects of a chain. Choose the count that matches the question you are trying to answer; for instance, use c.nr when the criterion is residue count, not simply because it sounds like a general measure of chain size.
Think of queries as filters for a specific question
A useful habit is to write down what you need to distinguish before choosing an attribute: “Which chain has this ID?”, “Which chains exceed this residue count?”, or “Which chains have several segments?” Then select the corresponding attribute and value. This keeps a search interpretable and makes it easier to adjust a threshold when the first result is too broad or too narrow.
Chain nodes also inherit attributes from other NSL spaces. For example, c.n can match a chain name, and inherited structural-group attributes include counts such as c.nC for carbons and c.nO for oxygens. Boolean properties such as visibility can be queried with c.v or not c.v. These inherited options can help when identity or chain-level counts alone do not describe the selection you need.
For a quick starting point, try the relevant query on its own: c.id 1 for a known ID, c.nr > 100 for a residue threshold, or c.ns 2:4 for a segment-count range. The attribute reference lists the full names, short names, value types, and additional examples.
Learn more in the SAMSON chain attributes reference.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
