Quickly Select Chains by Number of Residues in SAMSON

In molecular modeling, navigating complex biomolecular structures often means sifting through large numbers of chains, segments, and residues. Identifying just the chains you need—especially those with a specific size or range of residues—can take time and effort if done manually. Luckily, SAMSON offers a concise way to handle this through its Node Specification Language (NSL), and this post focuses on a handy attribute many users overlook: numberOfResidues for chains.

The numberOfResidues attribute allows modelers to select only those chains that contain a certain number of residues. This is useful when you want to:

  • Exclude small or incomplete chains from analysis or visualization.
  • Focus on larger, more relevant macromolecular chains.
  • Quickly inspect outliers, such as unusually large chains that might indicate an error in the model.

How It Works

Chains in SAMSON can be filtered using the attribute space c (short for chain). To filter by the number of residues, you use the syntax c.nr followed by a condition or range.

Here are a few practical examples:

  • c.nr > 100: Selects chains that have more than 100 residues.
  • c.nr 100:130: Selects chains with 100 to 130 residues inclusive.

This is especially helpful when working with multi-chain protein complexes or models that include small, auxiliary peptide chains. For example, if you downloaded a protein from the PDB that has co-crystallized segments like linkers, these short chains often have fewer than 30 residues. You could hide or ignore them quickly with not c.nr 1:30.

Using This in Practice

In the SAMSON interface, simply open the Find window or use a selection script. Then enter a query like:

Instantly, only chains longer than 120 residues will be selected—no need for manual clicking or guessing chain content based on names or IDs.

Bonus Tip: Combine with Visibility

You can also combine this filter with visibility settings. For example:

This matches chains with more than 100 residues that are also currently visible in the viewport.

Summary

If your molecular model is crowded and you wish to zoom in on the chains that matter most, numberOfResidues is your friend. It’s a simple but highly effective way to bring focus and efficiency to your modeling workflow in SAMSON.

To learn more about NSL and the chain attribute space, visit the full documentation page here.

Note: SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.

Comments are closed.