If you’ve ever needed to filter biomolecular chains based on atom count or elemental composition, you’re not alone. Molecular modelers often need to isolate chains with specific structural properties — such as chains with fewer than 500 atoms, or chains that contain at least a certain number of carbon atoms for stability analysis. However, many platforms require running separate scripts or tools to get these filters working.
In SAMSON, the Node Specification Language (NSL) allows you to filter chains directly using built-in attributes. This can streamline workflows for simulations, visualization, or exporting model subsets. Let’s see how you can filter chains using key atomic, elemental, and electrostatic properties.
Common Filtering Attributes for Chains
All examples below use the c prefix, which refers to the chain attribute space in SAMSON’s NSL.
1. Total Number of Atoms
Use numberOfAtoms (short name: nat) to select chains by size:
c.nat < 1000: chains with fewer than 1000 atomsc.nat 100:500: chains with between 100 and 500 atoms
2. Element-Specific Filters
You can select chains with a particular number of atoms of specific elements:
c.nC > 10: chains with more than 10 carbon atomsc.nO 5:15: chains with between 5 and 15 oxygen atoms
Supported elemental filters include:
nC: number of carbon atomsnH: number of hydrogen atomsnN: number of nitrogen atomsnO: number of oxygen atomsnS: number of sulfur atoms
These can be combined for fine-grained selection, e.g.:
|
1 |
c.nC > 10 and c.nO < 5 |
3. Formal Charge and Partial Charge
Understanding the charge distribution can be critical for electrostatics simulations. Use fc (formal charge) and pc (partial charge):
c.fc > 0: chains with a net positive formal chargec.pc 1.5:2.0: chains with partial charge in the specified range
This proves useful when pre-selecting molecules intended for charge-sensitive environments or docking experiments.
Why This Matters
Being able to define molecular subsets using precise structural criteria within the modeling platform avoids the overhead of exporting, scripting, or switching tools. SAMSON’s chain attributes let you interrogate and manipulate models more efficiently and reproducibly.
Filter combos can also be saved and reused as part of workflows or SAR studies. Whether you’re working with large complexes or preparing systems for simulation, these NSL expressions can accelerate your pre-processing work.
Learn More and Experiment
The SAMSON documentation provides even more attributes and advanced options for filtering and combining search criteria. Visit the full page on https://documentation.samson-connect.net/users/latest/nsl/chain/ to explore all available chain attributes and examples.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON here: https://www.samson-connect.net.
