Find the Chain, Not Just the Atoms

A familiar molecular-modeling problem: you know roughly which part of a structure you need, but the document contains several chains, and a broad atom-level search returns too much to inspect. Chain-level filtering offers a more direct first step: describe the chain you want, then use its identity or size to narrow the structure.

In SAMSON’s Node Specification Language (NSL), the chain attribute space matches chain nodes only. Its short name is c. That distinction matters: a chain query is a way to find and work with chains, not a claim that the expression directly matches individual atoms or residues.

Start with chain identity

If you know a chain’s ID, use chainID, abbreviated as id:

This matches chains whose chain ID is 1. To search several IDs or a range, the documented syntax supports expressions such as:

That expression matches chains with IDs from 2 to 4, as well as a chain with ID 6. It can be useful when comparing a few known chains without treating every chain in the structure as a candidate.

Chain IDs and chain names are different attributes. If you need to search by a name instead, the inherited name attribute accepts quoted strings. For example, c.n "A" searches for a chain named “A”. Use the attribute that corresponds to the information you actually have: an ID, a name, or a size.

Use residue count to find chains by scale

When the chain ID is unknown—or when the structure has been reorganized—chain length can be a better clue. The numberOfResidues attribute has the short name nr:

This matches chains with more than 100 residues. To search a bounded interval, use a range:

Thinking in terms of chain size is helpful when you need to distinguish a larger protein chain from shorter components, or when you want to reduce a crowded structure to chains in a particular size range before inspecting them further.

Check what “size” means

NSL also provides counts that describe a chain in other ways. For example, c.nat < 1000 filters by number of atoms, while c.ns < 3 filters by number of segments. These are not interchangeable with residue count: atoms, residues, and segments measure different properties. Choosing the right attribute avoids accidentally filtering on a convenient number that does not represent the feature you care about.

A practical workflow is to begin with the strongest clue you have. Use c.id when the chain ID is known; use c.n when you know the chain name; use c.nr when approximate chain length is the useful clue. Then check the matches in the structure before moving on to more detailed selections. For more involved searches, consult the NSL examples for expression syntax rather than assuming separate conditions combine automatically.

This small shift—from searching a large structure immediately to identifying the relevant chain first—can make a selection easier to understand and easier to repeat.

For the complete list of chain attributes and examples, see the SAMSON chain attributes reference.

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

Comments are closed.