A project can contain many folders, and folder names alone do not always tell you what is inside. When you need to find a structure by size, composition, or charge, checking folders manually can become a slow and error-prone part of molecular modeling. SAMSON’s Node Specification Language (NSL) lets you search folders using attributes that describe their contents.
The key distinction is that the folder attribute space matches folder nodes. Its short form is f. For example, f.nat > 1000 selects folders whose structures contain more than 1,000 atoms. That gives you a direct way to narrow a large project by a measurable property instead of relying on naming conventions.
Start with the question you need to answer
For a quick size check, use f.nat, the short name for numberOfAtoms. You can compare against a threshold or specify a range:
f.nat > 1000finds folders with more than 1,000 atoms.f.nat 100:200finds folders with between 100 and 200 atoms.
Ranges are useful when you already know the scale of the structures you want to inspect. A threshold is more useful when you are separating broadly large structures from smaller ones. The same integer-style comparisons are available for several other folder attributes, including residue count, chain count, molecule count, segment count, and structural-model count.
Use composition to narrow the search
If atom count is not specific enough, folder attributes can also describe counts of particular elements. For example, f.nC < 10 filters by the number of carbon atoms, while f.nO 10:20 looks for folders with 10 to 20 oxygen atoms. Corresponding short names include f.nH for hydrogen, f.nN for nitrogen, and f.nS for sulfur.
This can help turn a broad search into a more targeted check. Rather than opening every candidate folder, you can first identify folders that meet a simple composition criterion, then decide which structures merit closer inspection. These attributes describe counts; they do not, by themselves, identify where an atom occurs or how it is arranged.
Check charge at the folder level
Two charge attributes are available for folders. f.fc filters by total formal charge, and f.pc filters by total partial charge. For example, f.fc 6:8 matches folders with structures whose formal charge is between 6 and 8. The expression f.pc 1.5:2.0 matches folders with total partial charge in that range.
Keep the distinction in mind: formal charge and partial charge are separate measures, and these folder attributes refer to totals for the structures. A charge filter is therefore a way to shortlist folders by an overall value, not a substitute for examining local charge distribution.
Remember inherited folder attributes
Folders also inherit general node attributes. You can filter by a quoted name, for example f.n "A", or use visibility and selection-related attributes such as f.v and f.selected. The documentation notes that selected has no short name in the folder attribute space, so use the full form rather than assuming a one-letter alias.
A practical approach is to begin with one property that reflects your actual task: size for a scale-based shortlist, element counts for a composition check, or charge for a charge-based shortlist. Use the full attribute names when they are easier to read, and the short forms when you want compact expressions. The examples above are starting points; adjust the comparison or range to fit the structures you are looking for.
For the complete list of folder attributes and examples, see the SAMSON folder attributes reference.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
