When studying large molecular systems, modelers often need to isolate specific conformations based on size—such as filtering out all conformations with fewer than 100 atoms. Manually scanning through complex molecular systems can be time-consuming and error-prone. Fortunately, the Node Specification Language (NSL) in SAMSON makes this much easier with precise filtering tools based on attributes like the number of atoms in a conformation node.
Why filter by number of atoms?
Many workflows in molecular modeling, such as structural screening, conformation clustering, or preparing simulations, involve sorting through numerous conformations. If you’re working with macromolecular assemblies, polymers, or comparing bound and unbound states, being able to instantly retrieve larger or smaller conformations can save time and provide cleaner, more actionable data.
Meet conformation.numberOfAtoms (or co.nat)
SAMSON’s Node Specification Language provides a concise yet powerful syntax to query molecular systems. One particularly helpful attribute for conformation nodes is numberOfAtoms, accessible via the short name co.nat. This attribute lets you filter conformations based on the number of atoms they contain.
Basic Usage Examples
co.nat > 100— Matches conformations with more than 100 atomsco.nat 100:200— Matches conformations with between 100 and 200 atoms, inclusive
These queries can be used directly in NSL-powered features within SAMSON, such as search capabilities or scripting tools. For example, if you want to highlight or extract all medium-sized conformations within a certain range (say between 100 and 200 atoms), this becomes a one-liner.
Why not just use selection tools?
Most molecular editing software offers manual selection tools, but these don’t scale well when dealing with hundreds or thousands of conformations. NSL queries like co.nat > 100 give you reproducibility, scriptability, and precision. They allow for dynamic filtering in workflows and can be combined with other NSL attributes—such as conformation name or selection status—for even more control.
Combining Filters
Need to find all large conformations that have not been selected yet? Use:
|
1 |
co.nat > 100 and not co.selected |
This kind of logic is especially helpful when preparing structures for simulation, focusing on unprocessed data, or debugging workflows.
Further Possibilities
The co.nat filter is often used in combination with other NSL tools like co.n (name) or co.sf (selection flag). For instance, to select all conformations whose name starts with “L” and has more than 100 atoms:
|
1 |
co.n "L*" and co.nat > 100 |
Once selected, these conformations can be modified, visualized, or analyzed—creating productive workflows without having to guess or manually click your way through molecular structures.
To learn more about conformation attributes in SAMSON and how to write more NSL queries, visit the official NSL conformation documentation.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
