When dealing with large biomolecular structures, one of the common pain points for molecular modelers is simply finding the parts of the model they want to work with. Whether you want to isolate specific chains, target macromolecules of interest, or filter based on chain complexity, scouring through extensive molecular trees can be a time-consuming hurdle.
Fortunately, SAMSON’s Node Specification Language (NSL) provides a way to quickly filter molecular chains using meaningful properties like number of atoms, residues, segments, or even elemental composition. These filtering capabilities can save hours of clicking through menus and streamline your modeling workflow.
How to Use Chain Attributes to Filter Molecules
In NSL, chains belong to the chain attribute space (short name: c). Each chain node has a variety of attributes that can be used for filtering. Here are some common attributes molecular modelers often rely on:
- Number of atoms —
c.nat - Number of residues —
c.nr - Number of segments —
c.ns - Number of carbons —
c.nC, hydrogensc.nH, oxygensc.nO, etc. - Partial charge —
c.pc
Examples in Action
Here are a few real-world filtering examples you might find useful when working with large systems:
c.nr > 100— Display only chains with more than 100 residues.c.nat < 1000— Filter out large chains and focus on smaller ones.c.nO > 50— View chains with over 50 oxygen atoms, helpful in analyzing oxygen-rich molecules or active sites.c.pc 1.5:2.0— Narrow down to chains with partial charges in a specific range, often useful in electrostatics studies.
Why This Matters
These attributes let you define filters declaratively: Instead of manually navigating a structure to identify parts of interest, you describe what you want and SAMSON finds it for you instantly. This is especially helpful when you’re working with proteins, multi-chain assemblies, or exploring coarse-grained models where composition and size matter.
Combining multiple attributes in your queries is also supported. For instance:
|
1 |
c.nr > 100 and c.nO > 40 |
This matches chains with more than 100 residues and more than 40 oxygen atoms, which may indicate biologically relevant regions or solvent-accessible areas.
Short Names for Productivity
If you’re using NSL frequently, the short names can accelerate your work. For example:
- Instead of
chain.numberOfOxygens, usec.nO. - Instead of
chain.numberOfResidues, usec.nr.
Clear, fast, and reusable.
Learn More
To explore all the available chain attributes and examples, visit the official documentation here: https://documentation.samson-connect.net/users/latest/nsl/chain/
SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON at https://www.samson-connect.net.
