When working with complex molecular systems, modelers often face a common challenge: how to efficiently pick and analyze only the molecules that meet specific structural criteria. Whether you’re trying to extract smaller fragments from massive biomolecules or isolate candidates for simulation based on basic composition, doing this manually can be time-consuming and error-prone.
Fortunately, if you’re using SAMSON, the integrative molecular design platform, the Node Specification Language (NSL) offers a concise and powerful way to query for molecules with desired attributes. In this post, weβll look at practical filters you can use in NSL to quickly pinpoint molecules based on their number of atoms, chains, residues, or elemental composition.
π‘ Practical Use Case: Finding Ligands in a Biomolecular Environment
Imagine you’ve imported a structure containing a protein complex and several small ligands. You want to quickly select the ligands for analysis β not the protein. Ligands typically have:
- Fewer atoms
- Only one chain
- Fewer residues
Using NSL, you can write a simple query:
|
1 |
mol.nat < 100 and mol.nc 1 and mol.nr < 10 |
This matches molecules with less than 100 atoms, exactly one chain, and fewer than 10 residues β effectively isolating many common ligands.
π Attribute Overview
Here are some key molecule attributes exposed in NSL:
mol.nc: number of chainsmol.nr: number of residuesmol.nat: number of atomsmol.nC,mol.nH,mol.nN,mol.nO,mol.nS: number of carbons, hydrogens, nitrogens, oxygens and sulfursmol.fc: formal chargemol.pc: partial charge
Each can be combined with comparison operators (<, >, ==) and ranges (e.g., 10:20).
π― Example Queries
Here are a few practical examples:
mol.nC > 15β Molecules with more than 15 carbon atomsmol.nr 50:100β Molecules with 50β100 residuesmol.nO < 5 and mol.nH > 10β Oxygen-poor, hydrogen-rich molecules
Combining and nesting queries allows you to create highly specific selections while still being readable.
π§ͺ Why It Matters
This filtering capability helps molecular modelers:
- Focus on ligands, cofactors, or fragments inside large structural datasets
- Prepare subsets of molecules for simulation or property calculation
- Standardize selection criteria in workflows to improve reproducibility
Itβs especially useful when dealing with systems like protein assemblies from PDB files, where identifying functional molecules quickly is essential.
You can combine this with visualization filters or export selections for further use in other SAMSON tools or extensions.
To learn more about all available molecule attributes, visit the full documentation page: NSL Molecule Attributes
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
