Find the Right Chain Before the Search Gets Messy

A molecular structure can contain several chains, and the chain you need is not always obvious from its name or position in the model. Maybe you are looking for a long protein chain, checking which chains have multiple segments, or narrowing a selection to a particular chain ID. Clicking through candidates one at a time can turn a simple task into a tedious one.

In SAMSON, the Node Specification Language (NSL) lets you describe chain-level criteria with expressions. The chain attribute space uses the short prefix c. Its attributes can filter chains by identity, size, organization, and some inherited chemical properties.

Start with chain 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 specify several values or a range: c.id 2:4, 6 matches IDs from 2 to 4 and ID 6. This is useful when a structure has many chains and you want to focus on known IDs without relying on their displayed names.

Use residue count to find chains by size

Chain length is often a practical first clue. The c.nr attribute represents the number of residues in a chain. For example, c.nr > 100 matches chains with more than 100 residues, while c.nr 100:120 specifies a range from 100 to 120. This can help distinguish a larger protein chain from shorter chains in the same structure.

Use a threshold when you have a rough idea of the chain size; use a range when you want a narrower group of candidates. The expression describes a criterion rather than a particular chain name, so it can be reused when the structure changes.

Check how a chain is organized

Residue count is not the only measure of chain structure. The c.ns attribute counts segments: c.ns > 2 matches chains with more than two segments, and c.ns 2:4 specifies a range. The c.nsg attribute counts structural groups; for example, c.nsg > 10 matches chains with more than ten structural groups.

These counts answer different questions. Residue count gives a measure of chain length, while segment and structural-group counts describe other aspects of how the chain is represented. If a chain seems unexpected, comparing these attributes can help you characterize it without treating the values as interchangeable.

Look beyond the chain-specific attributes

Chains also inherit attributes from the structural-group and node spaces. For instance, c.nC < 10 filters by carbon count, and c.pc > 1.5 filters by partial charge. Node properties include visibility and selection: c.v matches visible chains, and c.selected matches selected chains. The full reference lists the available attributes, short names, and examples, including formal charge and counts of other elements.

A practical approach is to begin with a criterion you can explain—such as a known ID or a residue-count range—then try another attribute if you still have too many candidates. Keep each expression simple while you are learning what the structure contains. That makes it easier to see which property is doing the filtering and to adjust your query deliberately.

For syntax details and the complete chain attribute reference, see the SAMSON chain NSL documentation. You can also explore the NSL examples.

Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.

Comments are closed.