Easily Identify Polymer Chains by Atom Count in SAMSON

When working with complex molecular structures, especially large biomolecules or polymers, it can be difficult to quickly filter and focus on chains of interest. Often, molecular modelers need to isolate chains according to their size or composition, such as finding chains with fewer than a thousand atoms or identifying chains rich in specific elements.

This is where the Node Specification Language (NSL) in SAMSON can help. With NSL, you can express powerful filtering commands to explore your model precisely. In particular, chain attributes such as numberOfAtoms, numberOfCarbons, or numberOfHydrogens allow you to select parts of your system based on atomic composition.

When would this be useful?

Imagine loading a protein-ligand complex or a multichain assembly from a structural database. You want to:

  • Isolate all chains with fewer than 500 atoms for visualization simplicity.
  • Find the chains with a high concentration of hydrogen atoms, possibly indicating internal structure detail.
  • Ignore or hide chains without any carbon atoms (e.g., inorganic cofactors).

Instead of manually counting or visually inspecting large structures, you can use simple queries such as:

Each of these searches is nearly instantaneous, letting you spend more time understanding your model and less time navigating it.

A closer look at key attributes

The following chain attributes are particularly useful for composition-based filtering:

  • numberOfAtoms (short: nat): The total number of atoms in a chain.
  • numberOfCarbons (nC), Hydrogens (nH), Nitrogens (nN), Oxygens (nO), Sulfurs (nS): Let you focus on organic composition.
  • numberOfCoarseGrainedAtoms (ncga): Useful if you are working with simplified models or coarse-grained simulations.

Each of these attributes accepts ranges and comparison operators. For example:

Combining expressions with logical operators enhances the filtering:

This command selects chains with more than 20 carbon atoms and more than 50 hydrogen atoms. It’s a great way to spot larger, more complex chains at a glance.

Improving your workflow

This feature doesn’t just help with selection; it streamlines downstream tasks:

  • Quickly hide or show chains to declutter your workspace.
  • Set material properties or assign visual styles only to matching chains.
  • Export subsets of your system more efficiently.

You can also use this as a sanity check when importing complex data: ensure that your structure has the expected atomic counts per chain, or detect anomalies indicating import errors.

To explore all available chain attributes for filtering, visit the NSL chain documentation page.

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

Comments are closed.