Find the chain you need before the model gets complicated

A crowded molecular structure can be hard to work with before any analysis begins. Several chains may be present, and a chain’s identifier alone may not tell you which one is worth inspecting. Rather than clicking through the structure one node at a time, use SAMSON’s Node Specification Language (NSL) to narrow the search by chain ID, residue count, or other chain-level properties.

The key distinction is that the chain attribute space matches chain nodes only. Its short name is c. That makes chain attributes useful when your question is about whole chains—not individual atoms or residues.

Start with chain identity

If you know the chain ID you want, specify it directly:

This selects chains whose chain ID equals 1. To check a set of IDs, the documented range-and-list form is:

This matches chain IDs from 2 through 4, as well as ID 6. The full attribute name works too: chain.id 1. Using the short form is convenient when you are writing or revising several expressions.

Use size to find candidates

When you do not know which chain is the one you need, residue count offers a practical first pass. For example:

This matches chains with more than 100 residues. If you have a useful size interval in mind, use a range instead:

These two searches answer different questions. A threshold is handy when you want to find chains above or below a rough cutoff; a range helps when you already expect a chain to fall within a particular span. The long form, chain.numberOfResidues, is available when clarity matters more than brevity.

Check chain organization

Residue count is not the only useful clue. A chain can also be searched by its number of segments or structural groups:

The first expression matches chains with more than two segments; the second matches chains with 10 to 12 structural groups. These attributes can help you distinguish chains by organization as well as by approximate size.

A small, repeatable triage routine

  1. Search by ID if you already know which chain label to inspect: try c.id 1 or a documented list/range such as c.id 2:4, 6.
  2. Search by residue count if you need to locate chains of a plausible size: try c.nr > 100 or c.nr 100:120.
  3. Refine by organization when useful, using c.ns for segments or c.nsg for structural groups.

This staged approach keeps the first question simple: which chain nodes meet the criteria I can state now? You can adjust the cutoff or switch attributes as you learn more about the structure, without relying on a long chain of manual selections.

Chain attributes also inherit properties from other NSL spaces. For example, the chain space includes node-level properties such as visibility and name, and structural-group properties such as atom counts and partial charge. The complete reference lists the available attributes, their short names, and examples.

For the full attribute reference, see Chain attributes in the SAMSON documentation.

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

Comments are closed.