When working with large molecular systems, it’s common to collect data into folders: protein complexes, membrane aggregates, ligand groups, solvent structures, etc. But when your SAMSON document has dozens—or even hundreds—of folders, how do you efficiently find the ones you need?
This is where folder attributes in SAMSON’s Node Specification Language (NSL) shine. With just a few keystrokes, you can filter folders based on precise structural content—for example, folders containing fewer than 3 chains, or more than 10 residues, or a particular charge range. This helps you stay organized, improve analysis workflows, and save a lot of time.
Why Folder Filtering Matters
Imagine you’re analyzing a molecular dynamics simulation of a protein complex in a solvated environment. You’ve imported multiple conformations, subsets, fragments, and solvent shells—all nested in different folders. You want to isolate all folders with:
- More than 100 atoms
- Exactly 2 chains
- Between 10 and 12 residues
Using folder attributes in NSL, you can query this instantly:
|
1 |
f.nat > 100 and f.nc 2 and f.nr 10:12 |
This granularity gives you tight control over your data, making it easy to extract insights from complex systems.
How It Works: Intro to Folder Attributes
Folder attributes in SAMSON live in the folder (short name: f) attribute space. These include attributes inherited from nodes—like visibility, name, or selection status—as well as folder-specific ones, such as:
- f.fc – formal charge
- f.nat – number of atoms
- f.nc – number of chains
- f.nr – number of residues
- f.nm – number of molecules
- f.pc – total partial charge
Each of these can be combined using logical operators like and, or, and negation (not) to build more complex filters.
Common Examples
Here are a few sample queries and what they match:
f.nC < 10— folders with fewer than 10 carbon atomsf.nsm > 4— folders with more than 4 structural modelsnot f.v— folders that are currently not visiblef.selected— folders that are currently selected
You can even combine terms for more specific searches:
|
1 |
f.nH 20:40 and f.nN > 3 and f.vf true |
This would find folders that have between 20 and 40 hydrogen atoms, more than 3 nitrogen atoms, and visibility flags set to true.
Recommendations
To get the most out of folder attributes:
- Use short codes like
f.nmorf.nCto save time - Chain attributes with logical operators to refine your selection
- Combine with selection tools to automate batch analysis
Whether you’re preparing simulations, organizing structural variants, or cleaning datasets, folder attribute filtering helps you get the job done faster and more reliably.
Learn more in the full documentation page.
SAMSON and all SAMSON Extensions are free for non-commercial use. Download SAMSON here.
