When working with large and complex molecular systems, it’s easy to feel overwhelmed trying to locate structures of interest. Whether you’re screening databases, comparing different models, or cleaning up PDB data, quickly filtering molecules based on specific attributes can save a significant amount of time.
In SAMSON, the Node Specification Language (NSL) provides a concise way to query molecules with precision. In this post, we’ll explore how you can filter molecules based on structural attributes using SAMSON’s mol attribute space. This can help you identify exactly what you’re looking for — whether that’s proteins with a certain number of residues, molecules containing a minimum number of chains, or coarse-grained models with specific features.
Common Molecular Attributes You Can Search
The power of NSL lies in its flexibility. With just a few commands, you can express complex conditions. Here are some of the most commonly used attributes in the mol attribute space:
- mol.nc: number of chains
- mol.nr: number of residues
- mol.ns: number of segments
- mol.nat: number of atoms
- mol.nC, mol.nH, mol.nN, mol.nO: number of specific atoms (carbon, hydrogen, nitrogen, oxygen)
- mol.v: visibility
- mol.pc: partial charge
- mol.fc: formal charge
Practical Examples
Let’s say you have a complex system with many molecules, and you want to isolate only those with more than 100 residues:
|
1 |
mol.nr > 100 |
Or you’re interested in molecules with between 2 and 4 chains:
|
1 |
mol.nc 2:4 |
You can even combine visibility filters to only target visible molecules in this range:
|
1 |
mol.v and mol.nc 2:4 |
Searching Based on Atom Content
Need to find small organic molecules with fewer than 10 carbon atoms?
|
1 |
mol.nC < 10 |
Or perhaps you want to examine molecules with a high partial charge:
|
1 |
mol.pc > 1.5 |
These examples show how easy it is to target specific structures, even in large environments. You can mix filters using boolean logic, negation (not), and numeric ranges. You don’t have to dig through lists or build scripts — the NSL language does the heavy lifting.
Why This Matters
Being able to filter molecules quickly reduces cognitive load and lets you focus analysis on data that actually matters. For molecular modelers dealing with coarse-grained models, multi-chain proteins, or multi-molecule complexes, this is particularly helpful. Whether you’re preparing systems for simulation or extracting biologically relevant features, knowing how to navigate SAMSON with NSL is a practical skill that pays off.
To explore the full list of attributes and examples, visit the original Molecule Attributes documentation page.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.
