How to filter chains by size and composition in SAMSON’s Node Specification Language

When analyzing complex molecular assemblies, such as large proteins or multi-chain systems, modelers often need to isolate a specific domain or filter chains based on their size or atomic content. This task can be time-consuming when relying solely on visual inspection or manual selection in a GUI.

SAMSON’s Node Specification Language (NSL) offers a structured way to query molecular models and is particularly useful for filtering chains with customized conditions. Whether you’re looking to isolate chains with a small number of residues or chains rich in hydrogens, NSL can help you do this efficiently and reproducibly.

Focusing on chain attributes

NSL allows you to work within the chain attribute space—designated by the short name c. This means you can apply criteria specifically to chain nodes. This is key when working at the domain or chain level, such as parsing protein subunits, nucleic acid strands, or even complex supramolecular assemblies.

Example 1: Finding short chains

Imagine you want to find all chains in your molecular system that have fewer than 50 residues. You can use the numberOfResidues attribute (short name: nr) like this:

This will match all chains where the total residue count is below 50, making it easy to remove or isolate structural fragments or small domains.

Example 2: Selecting heavily charged chains

The formalCharge attribute (short name: fc) lets you filter based on the chain’s net charge. To find chains with a formal charge greater than +2:

This can be useful for identifying charged domains that may interact strongly with solvents or membranes.

Example 3: Targeting chains by atomic content

You might want to find chains with a specific number of atoms—let’s say, chains smaller than 1000 atoms. You can do this with:

Likewise, filtering chains rich in carbon content is as easy as:

This kind of filtering is especially helpful when identifying hydrocarbon-rich segments or membrane-spanning domains.

Combining queries

You don’t have to use only one filter at a time. For instance, to find chains with more than 10 residues and fewer than 500 atoms:

Logical combinations like these allow for very precise selection and data reduction in large structures.

Getting started

You can enter these queries into SAMSON’s selection interface using NSL. Once selected, chains can be hidden, isolated, exported, or modified. This workflow simplifies exploration, especially when dealing with PDBs containing multiple biomolecules or simulations with complex assemblies.

To learn more and see all available attributes applicable to chain nodes, visit the full documentation page: SAMSON NSL Chain Attributes

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

Comments are closed.