When analyzing molecular systems, it’s often useful—if not essential—to filter or select specific molecular conformations based on the number of atoms they contain. This might be relevant when comparing various snapshots during a simulation, isolating smaller or larger fragments, or simply speeding up workflows by focusing only on relevant structures.
If you’re using SAMSON, the integrative molecular design platform, then the Node Specification Language (NSL) offers a direct and concise way to achieve this. In this post, we’ll explore the numberOfAtoms attribute (short name: nat) associated with conformations and how you can use it in practice to streamline your model selection.
Use Case: Why Filter by Atom Count?
Imagine you’re handling a protein-ligand complex and you’ve run multiple simulations that generated dozens of conformations. Some include just the ligand, some include large fragments, and others are full protein systems. If you only care about conformations with, say, 100 to 200 atoms, manually checking each one can be slow and error-prone.
That’s where co.nat comes into play.
Attribute Syntax
The numberOfAtoms attribute belongs specifically to the conformation attribute space. You can use the NSL (Node Specification Language) to select conformations using expressions like:
co.nat > 100: matches all conformations with more than 100 atomsco.nat 100:200: matches conformations with 100 to 200 atoms
Practical Tips
Here are a few best practices to consider when filtering by atom count:
- If you’re not sure of the range of atom counts in your conformations, try using a histogram view or sort them based on atom count first (if your SAMSON workflow includes this option).
- Combine
co.natwith other attributes likeco.n "ligand*"to be even more specific in your selection. - Filtering by atom count is especially useful when preparing structures for QM/MM simulations, where the number of atoms affects computational cost significantly.
Inheriting from node
Don’t forget that conformations in SAMSON inherit several attributes from the general node attribute space. This includes the name (n), selected, and selectionFlag (sf) attributes. These can be combined with co.nat for even more refined queries.
Examples
co.nat > 150 and co.n "ligand*": selects conformations with over 150 atoms whose name starts with “ligand”co.nat < 50: isolates very small conformations, possibly individual residues or fragments
Using co.nat can dramatically simplify the way you interact with molecular systems and speed up downstream tasks involving simulation, rendering, or export.
To learn more about conformation attributes and Node Specification Language in SAMSON, visit the official documentation page.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON here.
