Molecular modelers often work with large, complex systems made up of multiple chains, molecules, and atoms. When managing dense structural data, it can become overwhelming to manually search, select, and manage folders that contain specific types or quantities of atoms. This challenge becomes even more evident when handling biomolecular assemblies or large compound libraries.
In SAMSON, the Node Specification Language (NSL) introduces a convenient and efficient way to handle this. In particular, the folder attribute space provides a powerful mechanism to filter and select folders that match specific atom count criteria. Whether you’re interested in selecting folders that contain a certain number of Carbon atoms or finding models with a specific range of residues, NSL enables this in a clear and readable syntax.
Using Atom Count Filters in Folder Selections
Let’s say you’ve loaded multiple structures and you want to perform batch operations (e.g., visualizing, exporting, or analyzing) on only those that meet specific conditions such as having fewer than 1000 atoms or more than 10 structural groups. Here’s how you can do it using NSL’s folder filters:
Example 1: Select folders with fewer than 1000 atoms
|
1 |
f.nat < 1000 |
This expression selects folders where the total number of atoms is less than 1000. The keyword nat stands for numberOfAtoms.
Example 2: Select folders containing between 100 and 200 atoms
|
1 |
f.nat 100:200 |
This expression selects all folders whose structures contain from 100 to 200 atoms, inclusive.
Example 3: Focus on Carbon-rich models
|
1 |
f.nC > 50 |
Selects all folders with more than 50 Carbon atoms. Similarly, you can use other element-specific filters such as nH, nO, and nN to filter by Hydrogen, Oxygen, and Nitrogen atoms respectively.
Example 4: Retrieve folders by number of molecules
|
1 |
f.nm 2:4 |
Returns all folders that contain 2 to 4 molecular entities—useful when screening multicomponent systems.
Example 5: Filter based on residues
|
1 |
f.nr > 130 |
Quickly locate folders that have more than 130 residues, which could indicate larger proteins or protein-ligand complexes.
These filters can be combined with logical operators and integrated into selection workflows for precise control.
Why This Matters
Trimming down a project to only the structures that meet specific criteria is critical for reducing analysis time and preventing visual clutter. It also ensures that numerical simulations, such as energy minimization or docking, are run only on the relevant subset of models. These filtering capabilities empower researchers to create cleaner, more reproducible workflows based on data-driven queries—directly within SAMSON.
Using these folder filters, modelers can avoid spending time manually sifting through structures. The syntax is intuitive, consistent across attribute types, and integrates seamlessly into custom visualization or computational pipelines.
To dive deeper into these attributes and see the full range of folder-related filtering capabilities, visit the official SAMSON documentation page: 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.
