Mastering Folder Queries in SAMSON: A Guide to Node Specification Language Attributes.

Efficient molecular modeling starts with efficient data filtering. Whether you are organizing a large molecular dataset or tailoring specific queries within SAMSON, understanding how to effectively retrieve meaningful subsets is crucial. This post will walk you through how to utilize folder attributes in the Node Specification Language (NSL) to make your molecular modeling work smoother and your queries more precise.

Why folder attributes matter

If you’re working with hierarchical molecular structures, you’ve likely encountered a multitude of folders containing various molecular nodes, chains, or materials. Quickly isolating the right folders based on specific attributes (e.g., how many atoms they contain, their number of structural models, or their selection status) can save hours of manual filtering, enabling you to focus on modeling rather than folder management. This is where folder attributes in NSL come into play.

What are folder attributes?

In SAMSON’s NSL, folder attributes let you specify conditions to match folders based on predefined properties. These attributes range from inherited ones like hidden and name, to folder-specific ones such as numberOfAtoms or numberOfMolecules. Each attribute has a short name for faster queries and can take specific values for filtering folders effectively.

Examples of practical use

Let’s dive into some practical examples of folder attributes:

Filter by the number of atoms

The numberOfAtoms attribute (f.nat) is indispensable when you want to isolate folders based on the size of their molecular content. This query, for example, matches folders containing more than 100 atoms:

If you need folders containing between 100 and 200 atoms, you can use:

Working with molecules

To narrow folders by the number of molecules (using the numberOfMolecules or f.nm attribute), you can apply similar logic. For folders with fewer than three molecules:

And for those containing between two and four molecules:

Handle specific elements or properties

NSL has attributes targeting folders with elements like Carbon, Hydrogen, and Sulfur. For example, if you’re looking for folders with fewer than ten Nitrogen atoms (using numberOfNitrogens or f.nN):

The same structure applies to other attributes like numberOfCarbons (f.nC) or numberOfHydrogens (f.nH).

Intricate structural queries

Attributes specific to structural aspects like numberOfStructuralModels (f.nsm) provide a refined way to tailor your searches. This query, for instance, identifies folders containing more than four structural models:

What’s the benefit?

By mastering folder attributes, you can make your molecular exploration far more efficient and precise. Instead of manually searching for folders that meet your criteria, you can create robust filters in seconds, allowing you to focus more on your core research and reduce redundancy.

Learn more

For a deeper dive into all folder attributes and examples in NSL, visit the official documentation page.

SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON today at SAMSON Connect.

Comments are closed.