Quickly Find Molecular Folders by Structure with NSL Filters

Working with large molecular systems often means dealing with hundreds or even thousands of folder nodes. Each folder can represent a different structure, model, or logical group, and knowing which one contains what kind of content — and how much of it — can become a challenge.

If you’ve ever found yourself manually browsing the node inspector to find folders that contain, for example, more than 3 molecules or those with fewer than 100 atoms, you’re not alone. Fortunately, SAMSON provides a smart solution for this: the Node Specification Language (NSL) lets you filter molecular folders efficiently using their attributes.

Use Case: Quickly Identify Large or Specific Folders

Imagine you’re modeling a molecular assembly and want to isolate all folders (representing structures) that contain:

  • More than 1000 atoms
  • At least 10 structural models
  • A specific formal charge

Here’s how to do that in SAMSON using NSL attributes:

This line filters all folders with more than 1000 atoms, more than 10 structural models, and a formal charge of exactly 2. The simplicity of this syntax saves time and avoids tedious manual labeling or inspection.

Common Folder Attributes That Help

Here are several folder-specific NSL attributes you can combine and use to your advantage:

  • f.nat – Number of atoms
  • f.nm – Number of molecules
  • f.nC – Number of carbon atoms
  • f.nH – Number of hydrogen atoms
  • f.fc – Formal charge
  • f.nsm – Number of structural models
  • f.ns – Number of segments

These can be combined logically using and / or to refine your selection. Let’s look at a few more examples.

Examples

  • f.nm 2:4 – Folders with 2 to 4 molecules
  • f.nC < 10 – Folders with fewer than 10 carbon atoms
  • f.fc 6:8 – Formal charge between 6 and 8

Why It Matters

In large models such as protein complexes, supramolecular assemblies, or simulation setups, you may need to isolate specific subsystems based on a structural property. Maybe you need the chain with the highest number of residues, or perhaps only the segments with 10–12 oxygen atoms. Instead of clicking through the GUI and checking each node’s properties manually, these filters help you go directly to what you need.

Even better, once you define your NSL string, this selection can feed directly into Python scripts or automation pipelines in SAMSON, improving reproducibility.

Getting Started

You don’t need to memorize the attribute names. Right-click the NSL text bar and browse suggestions based on the context. And remember, the folder-specific attributes extend what is available in basic node filtering, giving you more power for structural queries.

To learn more and explore the full attribute list for folders, visit the full documentation page.

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

Comments are closed.