If you’ve ever worked on a large molecular system in SAMSON, you know how challenging it can be to find the exact folders that contain specific subsets of data—especially when dealing with deeply nested models or extensive molecular datasets. One common and time-consuming pain point molecular modelers face is filtering folders based on the number of atoms or specific atom types. Thankfully, the Node Specification Language (NSL) in SAMSON offers a convenient way to query and isolate folders based on their atomic composition.
If you’re not taking advantage of folder attribute queries such as f.nat, f.nH, f.nC, and others, this may be the simple productivity boost you’ve been missing.
Why Use Folder Attribute Filters?
Let’s say you’ve imported a large molecular system and you want to identify structures with:
- More than 1000 atoms
- Between 10 to 20 Hydrogen atoms
- Multiple chains or a specific number of residues
Manually clicking through folders or expanding the visual tree is not practical. Instead, with folder attribute filters, this becomes a single-line query. For example:
|
1 |
f.nat > 1000 |
This filters all folders whose structures have more than 1000 atoms.
Available Filters at a Glance
Here are some of the most useful folder-level attributes you can use when filtering in NSL:
f.nat– Total number of atomsf.nH– Number of Hydrogensf.nC– Number of Carbonsf.nO– Number of Oxygensf.nc– Number of chainsf.nr– Number of residuesf.nsm– Number of structural models
These attributes accept both range and comparison operators. For example:
|
1 |
f.nH 10:20 |
Matches folders where structures contain between 10 and 20 Hydrogen atoms.
Make Selections Smarter
Combining multiple attributes helps pinpoint exactly what you’re looking for. For instance, to find folders with fewer than 500 atoms and more than 10 sulfur atoms:
|
1 |
f.nat < 500 and f.nS > 10 |
This is especially handy when reviewing results from molecular dynamics simulations or when preparing for coarse-graining workflows.
Quality Control or Insight Discovery
Need to verify that imported models have expected counts of hydrogens or identify unusual partial charges? NSL allows you to spot-check and even select folders that deviate from expected ranges:
|
1 |
f.pc > 1.0 |
This could help find ionized structures or outliers in a dataset.
Pro Tip: Use Short Names for Speed
The short names like f.nH, f.pc, and f.nr are convenient to type without sacrificing precision. They also match only folder nodes, reducing accidental matches.
Try It Yourself
Next time you’re opening a complex project in SAMSON, don’t waste time expanding folders one by one. Use folder attribute filters to quickly highlight what matters to you, whether it’s structures matching certain atomic compositions or filtering out low-resolution segments.
To learn more about all available folder filters and attributes, visit the full documentation page.
SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON here.
