Molecular modelers often deal with large datasets containing various conformations of molecules. One common task is filtering conformations based on the number of atoms—whether to identify large supramolecular assemblies, focus on smaller fragments, or prepare subsets for simulation. But scrolling through visual lists or manually verifying atom counts is not only time-consuming, it’s inefficient.
Thankfully, in SAMSON, this task is made much easier and more precise thanks to the numberOfAtoms attribute available in the conformation attribute space of the Node Specification Language (NSL). This feature lets you select or filter conformations based on their atom count using simple, intuitive queries—no scripting or manual counting needed.
What is conformation.numberOfAtoms?
In SAMSON’s NSL, each conformation node has a numberOfAtoms attribute, accessible via its short name nat. It allows you to match nodes based on how many atoms they contain. This is particularly useful when you’re working with dozens (or hundreds) of conformations, and only a range of them meet your modeling or analysis criteria.
Examples of Usage
Here are a couple of practical queries to get you started:
co.nat > 100: Selects conformations with more than 100 atoms.co.nat 100:200: Selects only conformations whose atom count is between 100 and 200.
This kind of query is both readable and efficient. Instead of writing a script or manually checking molecules, you can use a single line of NSL to isolate exactly what you need.
Why It Matters
Filtering by atom count is essential in a number of workflows:
- Simulation Preparation: If your simulation software has limitations on system size, you may need to quickly extract smaller conformations.
- Data Cleaning: Sometimes imported datasets contain irrelevant or incomplete structures (e.g., hydrogen-only molecules, tiny fragments). Atom count provides a fast sanity check.
- Focused Analysis: You may only want to analyze or visualize conformations of a certain complexity, defined by a minimum or maximum number of atoms.
Bonus: Combine with Other Attributes
You can combine numberOfAtoms with other conformation-level attributes like name or selection status. For example:
|
1 |
co.nat > 100 and co.n "Ligand*" |
This query selects all conformations with more than 100 atoms and whose names start with “Ligand”.
Try It in Your Next Project
If you’ve been manually managing conformation filtering, this feature can save you time and help you avoid potential oversights. It’s a small but powerful tool to improve your molecular modeling workflow in SAMSON.
To learn more about the conformation attribute space and integrate it into your own workflows, visit the official documentation page.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON here.
