A project can contain many folders, and folder names alone may not tell you what is inside. When you need to find a particular kind of structure—perhaps a large system, a folder with several chains, or a group with a specific charge—opening folders one by one is a slow way to start.
SAMSON’s Node Specification Language (NSL) lets you search folder nodes using properties of the structures they contain. The useful shift is to search by the question you have: size, composition, organization, or charge. Folder attributes use the f short name, so a query such as f.nat > 100 targets folders whose structures contain more than 100 atoms.
Start with the kind of evidence you need
For a broad size check, use numberOfAtoms (f.nat). If you already know an approximate range, specify it directly: f.nat 100:200 matches folders with between 100 and 200 atoms. Similar count attributes let you ask more focused questions without relying on folder labels:
f.nc 2:4looks for folders with between 2 and 4 chains.f.nm < 3looks for folders with fewer than 3 molecules.f.nr > 100looks for folders with more than 100 residues.f.nsm > 4looks for folders with more than 4 structural models.
These counts answer different questions. Atom count is a quick measure of overall structure size; chain and molecule counts describe organization; residue count can help locate larger biomolecular structures; and structural-model count can help identify folders containing multiple models. Choosing the most relevant count first can make a search easier to interpret.
Use composition when size is not enough
Two structures can have similar atom counts but very different compositions. Folder attributes include counts for carbon, hydrogen, nitrogen, oxygen, and sulfur atoms. For example, f.nO 10:20 selects folders with between 10 and 20 oxygen atoms, while f.nC < 10 selects folders with fewer than 10 carbon atoms. Coarse-grained atoms have their own count attribute: f.ncga.
This can be useful when you remember a structural characteristic but not the folder’s name. It also gives you a concrete way to check whether a candidate folder fits a composition-based expectation, rather than treating its label as a reliable description.
Keep formal and partial charge distinct
Charge searches are available through two separate attributes. f.fc refers to total formal charge, while f.pc refers to total partial charge. For example, f.fc 6:8 searches for folders with structures having formal charge between 6 and 8. The expression f.pc 1.5:2.0 searches for structures with total partial charge between 1.5 and 2.0.
These are not interchangeable measures, so choose the one that matches the quantity you want to inspect. The documentation lists formal charge as an integer-valued attribute and partial charge as a real-valued attribute.
A practical search routine
- Choose one defining property. Start with a count, composition, or charge that best describes the target.
- Use a threshold or range. For example, try
f.nat > 100for a lower bound, orf.nc 2:4for a bounded count. - Check the result in context. A matching folder meets the stated attribute condition; the condition alone does not explain why the structure has that value.
- Refine using another relevant attribute. If you need more complex searches, consult the NSL examples for supported expression syntax rather than assuming how multiple conditions should be combined.
Folder attributes also inherit common node properties, including name, visibility, selection, and material-related attributes. For example, f.n "A" searches by folder name, while f.v concerns visibility. The full reference distinguishes these inherited properties from folder-specific structure statistics.
For the complete attribute list and additional examples, see the SAMSON folder attributes reference and the NSL examples.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
