When dealing with large molecular systems in SAMSON, selecting just the right subset of molecules for analysis or simulation can quickly become overwhelming. Suppose you’re working with a structural model containing hundreds of molecules and you only want to isolate those with a specific number of residues or chains. Manually browsing and selecting is tedious and prone to error. Fortunately, SAMSON provides a set of structured attributes within its Node Specification Language (NSL) that makes molecule filtering both robust and intuitive.
In this post, we’ll focus on using molecule-level attributes in SAMSON’s NSL to help you filter molecular models quickly and precisely. These include attributes like numberOfChains, numberOfResidues, numberOfSegments, and numberOfStructuralGroups.
Why Attribute-Based Filtering Matters
The Node Specification Language allows you to define queries like:
mol.nr > 130to select molecules with more than 130 residuesmol.nc < 3to find molecules with fewer than 3 chainsmol.ns 1:3to get molecules with 1 to 3 segmentsmol.nsg > 10to isolate molecules with more than 10 structural groups
This kind of fine-grained filtering makes it possible to script selections in seconds – useful whether you’re configuring a simulation, setting up a molecular dynamics trajectory, or preparing a visualization.
Use Cases
Here are specific scenarios where these filters can significantly ease your workflow:
- Identify candidate proteins with a certain residue count range using
mol.nr. - Find small molecules or ligands by combining
mol.nc < 2andmol.nr < 50. - Pick multi-chain macromolecules by selecting
mol.nc > 1. - Isolate noisy or fragmented molecules by checking
mol.nsand eliminating those with large segment numbers.
Understanding Ranges and Conditions
Another useful aspect is that you don’t need to specify exact values. Instead, you can write queries like:
|
1 |
mol.nr 100:130 |
Which selects all molecules with residue counts from 100 to 130. This is especially helpful when filtering simulation snapshots or analyzing binding site neighborhoods.
Combined Queries
You can also combine multiple conditions to narrow down your results further. For example:
|
1 |
mol.nc > 1 and mol.nr > 150 |
This selects multi-chain molecules with more than 150 residues.
For a full list of molecule attributes you can filter by—including atoms, hydrogens, partial charges, and more—visit the official documentation linked below.
To learn more, check the full documentation page: SAMSON Molecule Attributes Documentation.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
