When a molecular project contains many folders, finding the one you need can turn into a repetitive task: open a folder, inspect its contents, close it, and try the next. If you already know something about the structure—its size, chain count, residue count, or total charge—you can use SAMSON’s Node Specification Language (NSL) to search folders by those properties instead.
The key idea is to ask a focused question about a folder, rather than inspect every item manually. Folder-specific attributes use the folder attribute space, abbreviated f. These attributes match folder nodes and can describe properties of the structures they contain.
Start with the property that narrows your search
For a large structure, try filtering by atom count. For example, f.nat > 1000 matches folders with more than 1,000 atoms, while f.nat 100:200 matches folders whose atom count is between 100 and 200. Use a threshold when you know a minimum or maximum; use a range when you have a useful interval in mind.
The same pattern works for several other counts. To look for folders with fewer than three chains, use f.nc < 3. To find folders with two to four molecules, use f.nm 2:4. To narrow by residue count, f.nr > 100 selects folders with more than 100 residues.
For a composition-based check, use the element-count attributes. For instance, f.nC < 10 searches by the number of carbon atoms, and f.nO 10:20 searches by the number of oxygen atoms. Related attributes are available for hydrogen (f.nH), nitrogen (f.nN), and sulfur (f.nS). These are handy when you remember a rough composition but not a folder name.
Use charge when composition is not enough
Two folders can have similar sizes yet represent structures with different charge. For total formal charge, use f.fc; for total partial charge, use f.pc. 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 searches by total partial charge in that interval.
Formal charge takes integer values, while partial charge can use real numbers. That distinction helps you choose the right attribute for the question you are asking. If you are filtering by a known exact value, the same syntax supports examples such as f.fc 1 and f.pc 1.
Remember what the result represents
These expressions are folder-level filters, not instructions to select individual atoms. A result identifies folders matching the requested property of their structures. If your goal is to find a particular atom or another type of node, use an appropriate attribute space rather than assuming a folder query is an atom query.
Not every useful filter is numerical. Since folders inherit several node attributes, you can also search by name with f.n "A", or check visibility and selection state with expressions such as f.v and f.selected. The folder reference notes that selected has no short name in this attribute space. For inherited attributes and their behavior, consult the node attributes reference linked from the documentation.
A practical way to build a query
- Decide what you remember: size, composition, charge, or a structural count.
- Choose the matching attribute, such as
f.natfor atoms orf.nrfor residues. - Use an exact value, a comparison such as
>or<, or a range such as100:200. - Check whether the matching folders make sense for your search, then refine the criterion if needed.
This approach turns vague recollections—“the larger model,” “the folder with several chains,” or “the positively charged structure”—into explicit, repeatable searches. For the full attribute list and additional examples, see the SAMSON folder attributes documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
