Quickly select molecular conformations with custom atom counts

When working with large molecular datasets, quickly filtering and identifying specific conformations can become a challenge. Whether you’re cleaning up a complex system, building a dataset for machine learning, or analyzing structural subtypes, a common need for molecular modelers is to select conformations based on the number of atoms they contain.

In SAMSON’s Node Specification Language (NSL), this task can be accomplished easily using the conformation.numberOfAtoms attribute, or its shorter form, co.nat.

Why atom count is useful

Imagine you’re analyzing a system with hundreds of conformations and you want to isolate only those that correspond to small fragments or large ligands. Manually checking each conformation’s atom count is both tedious and error-prone. That’s where co.nat comes in handy.

Filter by number of atoms

You can use simple queries to filter conformations based on their atom count directly in SAMSON’s selection filter, using NSL syntax:

  • co.nat > 100 → selects all conformations that have more than 100 atoms.
  • co.nat 100:200 → selects conformations with 100 to 200 atoms (inclusive).

This is particularly useful when your dataset contains a mix of small molecule fragments, organic ligands, and large molecular scaffolds. You can quickly zoom in on a specific size range to perform calculations or prepare inputs for simulations.

Streamline your modeling workflow

Here’s a practical use case. Say you’re designing a molecular docking experiment and your workflow requires conformations within a particular size range (for example, between 80 and 250 atoms). Instead of manually filtering out invalid molecules by checking their size one by one, you can simply write:

… and immediately highlight what’s relevant to your simulation pipeline.

Combining criteria for advanced filtering

You can also combine co.nat with other attributes. For example:

This selects only conformations with more than 120 atoms whose name starts with “Ligand”. SAMSON supports such combined queries seamlessly, helping reduce the time between data preparation and analysis.

It’s worth noting that this attribute is specific to the conformation attribute space, so when using it make sure your filter context is working on conformations.

Learn more

For more details and examples, you can check the full documentation on Conformation Attributes.

SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.

Comments are closed.