Find the Chain You Need Without Inspecting Every One

When a molecular structure contains several chains, it is easy to lose time clicking through them one by one just to find the long chain, a particular chain ID, or a chain with an unexpected number of segments. SAMSON’s Node Specification Language (NSL) lets you describe chain-level criteria as expressions, so you can search by the properties that matter instead of relying only on visual inspection.

Chain expressions use the chain attribute space, abbreviated c. The examples below show how to match chains using attributes documented for this space. They are useful for narrowing down a structure for inspection, especially when chain names or IDs alone do not tell you which chain you are looking at.

Start with a chain ID

If you know the chain ID, use chain.id or its shorter form, c.id. For example, c.id 1 matches chains whose ID is 1. You can also query a range and an additional value: c.id 2:4, 6 matches IDs from 2 through 4 and ID 6. This is a practical first check when you need to locate a specific chain or compare a small set of chains.

Chain ID and chain name are different attributes. If you want to match a name, use the inherited name attribute instead. For example, c.n "A" matches a chain named A, while c.n "L*" is a documented name-pattern example. Use the full name chain.name if you prefer, and keep the value in quotes.

Find chains by size

A chain’s number of residues is available as c.nr. To find chains with more than 100 residues, use c.nr > 100. To focus on a bounded size range, use c.nr 100:120. These expressions help answer a common inspection question: “Which chain is the long one?” without requiring you to count residues manually.

For a different measure of chain size, use c.nsg, the number of structural groups. For instance, c.nsg > 10 matches chains with more than 10 structural groups, and c.nsg 10:12 matches those with 10 through 12. The documentation also provides c.nat for number of atoms and c.ncga for number of coarse-grained atoms. These are separate properties, so choose the count that fits the question you are investigating.

Check chain organization

When a chain seems unusually fragmented, check its number of segments with c.ns. For example, c.ns > 2 matches chains with more than two segments, while c.ns 2:4 matches chains with two to four. This gives you a direct way to identify chains by segment count rather than infer organization from a crowded view of the structure.

A small, repeatable workflow

  1. Choose the property that describes the chain you are looking for: ID (c.id), name (c.n), residue count (c.nr), segment count (c.ns), or structural-group count (c.nsg).

  2. Start with a broad threshold or range, such as c.nr > 100 or c.ns 1:3.

  3. Use the matching chains as a shortlist for your next inspection step. If the result is not specific enough, try a more focused value or range, or query a different attribute.

NSL also exposes inherited chain attributes. For example, c.v matches visible chains, c.h matches hidden chains, and c.fc > 1 checks formal charge. The chain reference page lists these alongside the chain-specific attributes, including their short names and examples. Treat each expression as a precise filter on the stated attribute; a residue-count query, for example, is not the same as a structural-group-count query.

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.

Comments are closed.