A molecular project can quickly fill with folders containing structures of very different sizes and compositions. When you need a compact system, a particular element count, or a charge range, opening folders one by one is a slow way to find it. SAMSON’s Node Specification Language (NSL) lets you describe folder-level properties as queries, so you can narrow the search using counts and charges instead.
Folder queries use the folder attribute space, abbreviated f. This distinction matters: these attributes match folder nodes, not arbitrary nodes. For example, f.nat < 1000 looks for folders whose structures have fewer than 1,000 atoms. The full attribute name is also available: folder.numberOfAtoms < 1000.
Start with the size of the structure
Atom count is a useful first filter when a project contains systems that vary greatly in size. Use a comparison to set a threshold, or a range to describe a band of interest:
f.nat < 1000finds folders with fewer than 1,000 atoms.f.nat 100:200finds folders with between 100 and 200 atoms.
The same style applies to several other counts. For example, f.nc 2:4 searches by number of chains, f.nm 2:4 by number of molecules, and f.nr 100:120 by number of residues. These distinctions can be useful when atom count alone does not describe the kind of system you are trying to locate.
Filter by composition, not just total size
Two folders can have similar atom counts but very different compositions. Folder attributes include counts for carbon, hydrogen, nitrogen, oxygen, and sulfur atoms. For instance, f.nO < 10 specifies a limit on oxygen atoms, while f.nC 10:20 specifies a carbon-count range. The available short names are nC, nH, nN, nO, and nS.
There are also attributes for coarse-grained atoms, chains, molecules, residues, segments, structural groups, and structural models. Their short names include ncga, nc, nm, nr, ns, nsg, and nsm. For example, f.nsm > 4 searches for folders with more than four structural models. Using the attribute that reflects your actual selection criterion can save you from treating every structure as if atom count were the only relevant measure.
Keep formal and partial charge separate
Charge filters help identify folders by the total charge of their structures. Use f.fc for formal charge and f.pc for partial charge. For example, f.fc 6:8 specifies a formal-charge range, while f.pc 1.5:2.0 specifies a partial-charge range. They are different attributes, so choose the one that corresponds to the property you need; a query for one should not be read as a query for the other.
A practical way to use the attributes
Begin by translating your question into a measurable property: “under 1,000 atoms,” “two to four chains,” or “between 10 and 20 nitrogen atoms.” Then use the matching folder attribute and its example syntax as a starting point. If you are unsure which property will best separate the structures, try a broad count first, then inspect which additional count or charge property would make the result more specific. The reference lists both long attribute names and compact names, so you can choose whichever is easier to read in your queries.
Folder nodes also inherit general node attributes, including name, visible, hidden, and selected. A name query such as f.n "L*" can help locate folders by name, while a numeric attribute can narrow by structural content. These are different kinds of criteria: one describes the folder’s name or state, and the other describes properties of the structures it contains.
For the complete attribute list and additional examples, see the SAMSON folder attributes reference.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
