How to Quickly Filter Molecular Models by Atom and Residue Counts

When working on complex molecular systems, molecular modelers often face the tedious task of identifying subsets of their model with specific structural characteristics. Whether it’s finding models with more than 100 residues, selecting folders based on carbon atom counts, or narrowing down results to structures with fewer than three chains, this process can be time-consuming—especially if done manually.

Fortunately, SAMSON’s Node Specification Language (NSL) provides a powerful and compact syntax for filtering molecular models using folder attributes. In this guide, we explore how to use folder-specific attributes to streamline your search within SAMSON.

Why It Matters

Modelers often work with large and fragmented structural datasets. Being able to filter and isolate structures that meet exact criteria—such as “at least 10 nitrogen atoms” or “formal charge between 6 and 8”—can significantly improve analysis efficiency, visualization clarity, and preparation workflows for simulations.

Working with Folder Attributes

Folder attributes in NSL let you perform queries on folders that represent molecular models or structural units. You can match based on atom counts, molecular composition, formal charges, and more—all using a straightforward syntax.

Basic Attribute Syntax

Each folder-level attribute has a short name and expects values in a specific format. Examples include:

  • f.nat: Number of atoms (integers)
  • f.nC: Number of carbon atoms
  • f.nr: Number of residues
  • f.pc: Partial charge (floats)

Queries can use comparison operators:

  • f.nat > 100 — Folders with more than 100 atoms
  • f.nr 100:130 — Residue count between 100 and 130
  • f.pc 1.5:2.0 — Partial charge between 1.5 and 2.0

Examples You Might Use Today

Need to filter structures with limited complexity?

Looking for models likely to represent proteins?

Interested in charged structures?

Querying Multiple Properties

You can combine attributes to be more specific:

This query selects folders that contain 2–4 molecules, more than 100 residues, and a partial charge less than 2.0.

What’s Included in Folder Attributes

The documented folder-specific attributes include:

  • Structural composition: numberOfAtoms (f.nat), numberOfChains (f.nc), numberOfMolecules (f.nm)
  • Elemental composition: numberOfCarbons (f.nC), Hydrogens (f.nH), Nitrogens (f.nN), Oxygens (f.nO), Sulfurs (f.nS)
  • Properties: formalCharge (f.fc), partialCharge (f.pc)
  • Topology: numberOfResidues (f.nr), numberOfSegments (f.ns), numberOfStructuralModels (f.nsm)

Each can be used to precisely filter models for visualization, exporting, or further simulation steps.

Folder attributes are accessible directly in NSL, and are well-integrated with the rest of SAMSON’s search and workflow ecosystem. Regular use of these features can save hours of manual inspection and scripting.

Learn more about folder attributes and other filtering options in SAMSON’s documentation: 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.