Filtering Structural Models by Atom Count in SAMSON

When working with complex molecular systems, it’s easy for modelers to get overwhelmed by the amount of structural data—especially when switching between projects or exploring large repository folders. An important question that often arises is: How can I quickly identify structures that match specific criteria, like the number of atoms or formal charge?

In SAMSON, structures can be organized into folders, and these folders can be searched and filtered using the Node Specification Language (NSL). If you’re trying to isolate folders containing structures with a very specific composition—such as between 100 and 200 atoms—you don’t have to inspect them manually one by one. You can leverage folder attributes to get exactly what you’re looking for in seconds.

Using folder.numberOfAtoms in NSL

SAMSON includes a powerful attribute called numberOfAtoms that enables you to match folders based on their atomic content. This attribute is accessible via the short name f.nat.

Some examples of how to use this attribute:

  • f.nat > 100 — matches folders with more than 100 atoms
  • f.nat 100:200 — matches folders with atoms ranging between 100 and 200

This is particularly useful in workflows where you want to:

  • Find smaller molecular systems for quick simulations
  • Identify large structures for detailed structural analysis
  • Select molecules within a certain size bracket to ensure uniformity in comparative studies

You can also stack this filter with others. For instance, you may combine f.nat with f.nC (number of Carbon atoms), f.pc (partial charge), or even visibility flags like f.v to ensure you’re only working on visible elements.

Best Practices

If you’re using NSL filters directly in the Find panel of SAMSON, try saving frequently used queries to speed up repetitive filtering operations. Also, remember that NSL not only improves your efficiency, it reduces the risk of missing important data hidden in large folder structures.

This seemingly minor feature—searching by number of atoms—can have a big impact when managing dozens or hundreds of structures, especially in high-throughput modeling or when supporting multi-model simulations.

Learn More

To explore more options like filtering by number of Hydrogen, Oxygen or Nitrogen atoms, check out the full documentation page here:

https://documentation.samson-connect.net/users/latest/nsl/folder/

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

Comments are closed.