Easily Select Conformations by Atom Count with NSL in SAMSON

When working on molecular models, it’s common to deal with large ensembles of structural conformations. Whether you’re sampling protein flexibility, filtering through docking poses, or analyzing simulation snapshots, chances are you’ve needed to quickly isolate conformations with a specific number of atoms.

Doing this manually can be error-prone and time-consuming — especially when you’re working with hundreds or thousands of conformations. Fortunately, the Node Specification Language (NSL) in SAMSON makes this task fast and repeatable.

A Quick Intro to Conformation Filtering in NSL

Conformations are a special kind of node in SAMSON, and you can filter them using attributes in the conformation attribute space, which has a short name: co.

One particularly useful attribute is numberOfAtoms, which lets you select conformations based on how many atoms they contain. This is helpful in many scenarios, for example:

  • Filtering out incomplete or partial conformations
  • Grouping conformations by molecular size for clustering
  • Spotting unusual or corrupted conformations

The Syntax

You can use the short name co.nat to target the number of atoms in a conformation. Here are a few examples that illustrate how to use this field:

  • co.nat > 100 – selects all conformations with more than 100 atoms
  • co.nat 100:200 – selects all conformations with between 100 and 200 atoms (inclusive)
  • co.nat <= 50 – selects conformations with 50 atoms or fewer

Want to combine it with other filters? Not a problem. For instance, if you only want conformations with more than 150 atoms that are also selected in the viewport, you could use:

co.nat > 150 and co.selected

Why It Matters

Molecular modelers often rely on batch algorithms, and the ability to target specific conformations by size ensures that analyses such as RMSD calculations or clustering algorithms are applied to relevant data only. Instead of writing custom scripts or manually deselecting nodes, NSL puts the control directly at your fingertips inside SAMSON’s interface.

This eliminates overhead and enables reproducible workflows — an important goal in computational molecular science.

Want to Try It?

Open the Find Editor in SAMSON, type a query like co.nat 80:150, and only the conformations in that atom range will be selected. You can then apply all kinds of operations (visualization, comparison, export) only to those selected conformations.

To explore more NSL features for conformations, you can visit the full documentation page here.

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

Comments are closed.