Quickly Select Chains Based on Structural Properties in SAMSON

One of the recurring tasks in molecular modeling is selecting specific parts of a model based on meaningful structural properties. When dealing with large or complex biomolecular assemblies in SAMSON, identifying chains with, for example, a specific number of residues or atoms can significantly enhance efficiency in analysis and design workflows.

In this blog post, we explore how to use chain-level attribute filters in SAMSON’s Node Specification Language (NSL) to selectively find chains with desired properties. This can make structural analysis faster, more accurate, and less manually intensive.

Why Filter by Chain Properties?

When modeling large macromolecules or assemblies, it’s common to want to isolate a specific protein chain, such as one with a high number of residues, or analyze chains based on atom counts or elemental composition. Manually inspecting or clicking through chains isn’t scalable—especially if you’re working with structures from databases like the PDB that can contain hundreds of chains and hierarchical elements.

Using NSL: A Simple Query Language

SAMSON’s NSL makes it easy to construct logical filters for nodes. To query chain objects specifically, you use expressions scoped in the chain attribute space with shorthand c. This includes a wide variety of attributes, such as:

  • c.nr: number of residues
  • c.nat: number of atoms
  • c.nC, c.nN, etc.: number of specific element atoms (carbon, nitrogen…)
  • c.fc: formal charge
  • c.pc: partial charge
  • c.id: chain ID

Example 1: Chains with More Than 100 Residues

This selects only chains with more than 100 residues. Useful for isolating large subunits.

Example 2: Chains with a Range of Atom Counts

Matches chains whose total number of atoms is between 500 and 1000.

Example 3: High Sulfur Content

Find chains that may contain disulfide-rich regions or cysteine clusters.

Example 4: Combine Properties in Complex Queries

Selects chains with more than 100 residues and more than 150 carbon atoms. Easily extensible to more attributes.

Use Cases in Everyday Modeling

Here are a few real-world situations where this simple filtering can be especially useful:

  • Cleaning up imported PDB structures by selecting/discarding small peptide chains.
  • Targeting specific domains in multi-chain proteins based on residue counts.
  • Locating relevant chains for docking by filtering on atom types or charges.
  • Batch operations — combining NSL queries with commands or extensions to hide, color, or analyze selected chains.

Final Notes

This functionality might seem hidden at first, but becomes a powerful ally in large-scale molecular modeling. Once you learn a few NSL patterns, you can express almost any selection logic in a compact form. Combined with SAMSON’s interactive interface and modeling capabilities, these chain-level filters offer both precision and flexibility.

If you’re looking for a reference of available chain-level attributes and how to use them, check out the full documentation page here: https://documentation.samson-connect.net/users/latest/nsl/chain/

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

Comments are closed.