When a molecular project contains many conformations, finding the paths relevant to a particular question can become a tedious inspection task. You may be looking for paths with a large number of atoms, checking a size range, or narrowing the list to a named or selected path. SAMSON’s Node Specification Language (NSL) provides a compact way to describe these filters.
The key detail is that the path attribute space matches only conformation nodes. Its short prefix is p. That makes path-specific queries a useful starting point when you want to describe a conformation by its atom count rather than search through unrelated node types.
Filter paths by atom count
The path-specific attribute on this page is numberOfAtoms, abbreviated nat. Use it to express a threshold or a range:
p.nat > 100matches paths with more than 100 atoms.p.nat 100:200matches paths with a number of atoms between 100 and 200.
The full attribute name works too: path.nat > 100 is the documented long-form version of the first query. The short form is convenient when you are writing expressions; the long form can be easier to read when you are learning what an expression means.
A practical way to use these examples is to begin with the question you need answered. If you want to isolate larger conformations, start with the threshold. If you have a useful size band in mind, use the range. These expressions describe the filter; they do not require you to manually count atoms in each path before deciding what to inspect.
Keep names and selection state distinct
Paths inherit several attributes from the general node attribute space. For example, p.n "A" checks a path’s name, and p.n "L*" is another documented name expression. The name attribute is not the atom-count attribute: use p.nat for counts, and p.n for names.
Selection can also be queried. p.selected refers to the inherited selected attribute, while not p.selected expresses the opposite condition. There is no short name s for selected in the path attribute space, so use the full attribute name there. The inherited selectionFlag attribute does have the short name sf; examples include p.sf and p.sf false.
A small syntax check can prevent a frustrating mismatch
When building a path query, check three things: you are targeting the path space (path or p), you chose the attribute that matches your question (nat for atom count, n for name), and your value has the expected form. Atom counts use integers; names are written in quotes; selection attributes use true or false. This simple check can help distinguish a valid-looking expression from one that filters on the wrong property.
For a molecular modeler, the benefit is practical: a question like “which conformations have more than 100 atoms?” becomes a short, readable expression rather than a manual review task. Once the basic distinction between path names, selection state, and atom counts is clear, it is easier to adapt the query to the specific paths you need to examine.
Learn more in the Path attributes reference.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
