Filtering molecular folders by atom counts in SAMSON

When working with complex molecular systems, it’s not unusual to accumulate a large number of molecular folders—each potentially comprising various atoms, chains, and structural features. This can make it difficult to quickly isolate the folders you want to work with. For molecular modelers and computational chemists, the ability to filter and navigate through large systems efficiently can save hours of manual effort and prevent mistakes.

In SAMSON’s Node Specification Language (NSL), folders can be filtered using attributes like numberOfAtoms, numberOfMolecules, numberOfResidues, and specific atoms such as numberOfCarbons or numberOfHydrogens. But how does this work, and how can molecular modelers take advantage of it?

Why filter folders?

When handling simulation or modeling outputs that contain dozens (or even hundreds) of molecular structures, identifying specific subsets—such as those containing more than 200 atoms, or those with only a single molecule—can streamline analysis and visualization. Instead of inspecting each folder one by one, queries in NSL allow you to extract relevant folders instantly.

Using NSL to filter folders

Let’s explore a few useful filters you can apply when working with folders in SAMSON:

Filter by total number of atoms

To find all folders containing more than 100 atoms:

To select folders containing between 150 and 300 atoms:

Filter by element type: Carbon, Hydrogen, Nitrogen, etc.

If you want to find folders with fewer than 10 Carbon atoms:

Or between 10 and 20 Nitrogen atoms:

Similar filters exist for Hydrogens (f.nH), Oxygens (f.nO), and Sulfurs (f.nS).

Filter by molecular units: residues, segments, chains

To get folders containing more than 3 chains:

To filter based on the number of residues between 100 and 120:

Partial and formal charges

To filter for folders with a formal charge of exactly 1:

To select folders where the partial charge falls between 1.5 and 2.0:

This enables quick identification of charged species within your system that may be crucial to your analysis.

A workflow enhancement

Instead of browsing through folder hierarchies to find particular molecular groups, NSL empowers users to make fast and accurate selections based on numerical criteria. Whether you’re modeling protein-ligand complexes, studying coarse-grained models, or visualizing charged molecules, this filtering saves time and helps maintain focus.

To learn more about all available folder attributes and filtering options, visit the original documentation page at 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.