Find the chain you need without counting residues by hand

When a molecular structure contains many chains, it is easy to lose time checking chain identifiers or counting residues manually. The Node Specification Language (NSL) in SAMSON lets you describe the chains you want to find using attributes such as chain ID, residue count, segment count, and structural-group count. You can use these filters to make a search more specific and repeatable.

Start with chain ID

If you already know a chain’s identifier, use c.id, the short form of chainID. For example, c.id 1 matches chains whose ID is 1. To look for a range of IDs and another individual ID, use c.id 2:4, 6. Comparisons are also available: c.id <= 3 matches chains with IDs no greater than 3.

This is useful when you want to isolate a particular chain or narrow a crowded structure to a small set of candidates. It also makes the search criteria explicit: instead of relying on visual inspection, you can see the identifier condition in the expression itself.

Use chain size to narrow the search

When the identifier is unknown, chain counts can help. Use c.nr for the number of residues. For example, c.nr > 100 matches chains with more than 100 residues, while c.nr 100:120 matches chains with a residue count in that range.

Other counts answer different questions:

  • c.ns refers to the number of segments. Try c.ns > 2 to find chains with more than two segments.
  • c.nsg refers to the number of structural groups. For instance, c.nsg 10:12 matches chains with between 10 and 12 structural groups.
  • c.nat refers to the number of atoms. A condition such as c.nat < 1000 can help identify chains below a chosen atom-count threshold.

These measures are not interchangeable. A residue count describes residues, a segment count describes segments, and a structural-group count describes structural groups. If you are investigating a chain’s size, choose the measure that matches the question you are asking rather than treating all counts as equivalent.

Combine a count with a useful comparison

NSL examples show both comparison operators and ranges for integer-valued attributes. A comparison is handy when you have a cutoff, such as c.nr > 130. A range is useful when you have a window, such as c.ns 1:3. For chain IDs, you can also list values, as in c.id 2:4, 6.

A practical approach is to begin with the clearest condition you know: an ID if you have one, otherwise a count that separates the chain you are looking for from the rest. Then refine the search with another relevant attribute as needed. Keeping each criterion tied to a specific question makes expressions easier to read and easier to adjust when you inspect a different structure.

Remember inherited attributes

Chain queries can also use attributes inherited from other NSL attribute spaces. For example, c.n checks a chain’s name, and c.v checks whether it is visible. The chain page also lists inherited attributes for atom counts, elemental counts, charge, selection, and visibility. This gives you more ways to describe a chain without limiting searches to chain-specific properties.

For the complete list of chain attributes, short names, value types, and examples, see the SAMSON chain NSL reference.

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

Comments are closed.