Molecular modelers often find themselves dealing with complex systems containing many conformations. When working with such systems, it can be helpful to filter these conformations based on certain properties — such as the number of atoms they contain — in order to focus on a specific subset of molecular models. This is especially useful when comparing conformations, running simulations, or preparing models for presentation or publication.
In SAMSON, the Node Specification Language (NSL) offers a way to do just that, and more. If you’re working with conformations and want to quickly isolate those that meet specific size criteria (for instance, those with fewer than 100 atoms, or between 100 and 200 atoms), this quick guide is for you.
What Are Conformation Attributes?
In SAMSON, conformations are a type of node with attributes that describe their properties. Some of these attributes are inherited from the general node attributes, while others are specific to conformations. One particularly useful conformation-specific attribute is numberOfAtoms
.
Using numberOfAtoms
for Filtering
The numberOfAtoms
attribute – useful when you want to select conformations based on their atom count – can be accessed using its short name: nat
. This makes it convenient to use in the NSL within SAMSON’s search and filtering tools. Both the full and short versions are supported.
Here’s how this works:
conformation.nat > 100
orco.nat > 100
: selects all conformations that have more than 100 atoms.conformation.nat 100:200
orco.nat 100:200
: selects conformations with atom counts between 100 and 200.
Why is this useful? Imagine you’re analyzing a trajectory or result set where some conformations are full models and others are fragments or partial structures. You may want to exclude incomplete ones when performing certain tasks, such as RMSD analysis or visual inspection. By filtering with co.nat
, you can quickly remove conformations that fall below a certain threshold, streamlining your work.
Putting This into Practice
To use this filter in SAMSON, open the search tool and type a query like:
1 |
co.nat > 150 |
The search will return only those conformations in your document whose atom count exceeds 150. You can combine this with other attributes to refine your search even more. For example:
1 |
co.nat > 100 and co.selected |
This will return all selected conformations with more than 100 atoms.
If you’re unsure how many atoms your conformations typically contain, you can use filters interactively and observe the matches in real-time, adjusting your thresholds as needed.
Simplifying Selection with Short Names
One of the strengths of NSL is its support for short names, which makes queries less verbose. Here’s a quick reference:
co.nat
: number of atomsco.n
: name of the conformationco.sf
: selection flag
Using these short names makes it easier to build more compact, readable queries – particularly useful when you’re working with complex NSL filters.
To explore all available attributes including those inherited from nodes (like name
, selected
, and selectionFlag
), check out the full documentation linked below.
🔍 Learn more about conformation attributes in SAMSON’s documentation
SAMSON and all SAMSON Extensions are free for non-commercial use. If you’re not already using SAMSON, you can download it here.