Quickly Find Conformations with Over 100 Atoms Using NSL

When working with large molecular systems or ensembles of conformations, it’s common to face the challenge of filtering specific structures based on their size. For example, a modeler might want to isolate conformations with more than 100 atoms, or those that fall within a precise size range. Without a systematic query mechanism, this task can become tedious and time-consuming.

The Node Specification Language (NSL) in SAMSON provides a flexible way to search for and filter molecular model elements, including conformations, based on various attributes. In this post, we’ll focus on how to use the numberOfAtoms attribute to streamline your workflow and isolate only the conformations you care about.

What is conformation.numberOfAtoms?

The numberOfAtoms attribute belongs to the conformation attribute space in NSL. It allows you to specify a filter based on the number of atoms in a conformation node. The short name for this attribute is nat, so you can write compact queries like co.nat > 100.

Why is this useful?

Let’s say you’re studying a protein-ligand complex and want to exclude all small fragments or ligands under a certain atomic size. Or perhaps your algorithm generates thousands of candidate conformations and you want to process only those with a suitable level of complexity (e.g., more than 150 atoms). NSL provides a readable syntax for filtering these directly, without needing to script externally or manually review structures.

Examples

  • co.nat > 100: Match all conformations with more than 100 atoms.
  • co.nat 100:200: Match conformations with atom counts between 100 and 200.

And because NSL allows combining multiple conditions, you could pair atom count filters with other attributes as well, such as conformation name or selection status. For example:

This would match all conformations starting with the name “Ligand” and containing more than 100 atoms.

What if I want to find conformations that are selected?

This is also possible. NSL allows access to a selected attribute (inherited from the node attribute space). You can combine it as follows:

This will retrieve all selected conformations with more than 100 atoms.

Compact Syntax for Efficient Work

NSL supports concise short names to make your queries quick to write. In this case:

  • co is short for conformation
  • nat is short for numberOfAtoms

This makes co.nat > 100 easy to type and remember when working in SAMSON’s search bar or scripting environment.

No Need for Manual Counting

Instead of clicking through each conformation and checking atom counts individually, you can now use a simple query like co.nat > 100 to instantly see only the structures that meet your criteria. This reduces errors, saves time, and scales effortlessly when handling large data sets.

Try for Yourself

If you’re already using SAMSON, try these filters in your current project. Just enter the NSL expression in the search bar, and see how quickly you can isolate the conformations you want to focus on.

To learn more about NSL and conformation attributes in SAMSON, visit the official documentation page: https://documentation.samson-connect.net/users/latest/nsl/conformation/.

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

Comments are closed.