Quickly Find Folders with Specific Molecular Content in SAMSON

When working with complex molecular projects in SAMSON that include multiple structural models, segments, and numerous atoms, simple navigation can become time-consuming. If you’ve ever tried to locate specific types of folders—say, those containing more than 1000 atoms or including a precise formal charge—this post might save you valuable time.

The Node Specification Language (NSL) in SAMSON provides a concise, readable way to filter folder nodes based on their attributes. In particular, NSL supports a wide range of folder-specific queries that help you hone in on exactly what you’re looking for in your molecular system.

Why Use Folder Queries?

Imagine you’re cleaning up or analyzing a molecular project that spans hundreds of structural groups across different folders. You may want to:

  • Focus on folders containing a specific number of atoms or chains
  • Find folders with an excessive formal or partial charge
  • Examine hydrogen-rich segments for dynamics simulation

The NSL lets you do all of this and more in just a few characters.

Attribute Filters at Your Fingertips

Folder attributes in NSL include both inherited node properties (like hidden and name) and folder-specific attributes that delve into structural contents.

Here’s a quick overview of some helpful folder-specific queries:

  • f.nat > 1000 – folders with more than 1000 atoms
  • f.nr 100:150 – folders with 100 to 150 residues
  • f.pc > 1.5 – folders where total partial charge exceeds 1.5
  • f.nC < 10 – folders containing fewer than 10 Carbon atoms
  • f.nsm 2:4 – folders with between 2 and 4 structural models

These expressions are part of SAMSON’s search interface, helping you retrieve nodes interactively without having to visually browse large models.

Range Matching and Comparative Operators

You can use standard comparison operators such as >, <, or even ranges using the : notation. For example:

This finds all folders where the total formal charge falls between 6 and 8. This is especially useful when visualizing different oxidation states or filtering based on expected ionic properties.

A Real Use Case: Setting Up a Coarse-Grained Simulation

Suppose you're preparing a project for a coarse-grained MD simulation. You want to select only folders that contain a limited number of coarse-grained atoms, and exclude folders with too many chains.

You could use:

This would immediately filter your model down to just the folders you're ready to simulate.

Composability with Other NSL Components

Folder queries can be composed with others. For instance:

This finds folders that are currently visible and contain more than 50 residues—a typical requirement before exporting for structural analysis or publication.

On Searching by Folder Name

Of course, if you're categorizing folders manually, you can also search by name with:

This returns all folders whose names begin with BindingSite.

Creating these types of queries takes only seconds and scales well to extremely large and complex molecular datasets.

You can read the full documentation on folder attributes here: https://documentation.samson-connect.net/users/latest/nsl/folder/

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

Comments are closed.