When a molecular project contains many conformations, finding the ones worth inspecting can become a small but persistent source of friction. Names may be inconsistent, and opening items one by one just to check their size is not a useful way to spend modeling time. In SAMSON, the Node Specification Language (NSL) provides a direct way to filter path nodes by their number of atoms.
This is particularly useful when you need to narrow a collection to larger or smaller conformations before reviewing them. The path attribute space matches only conformation nodes. Its numberOfAtoms attribute has the short form nat, so a query for paths with more than 100 atoms is:
path.nat > 100
The equivalent short form is p.nat > 100. Both express the same filter: match paths whose number of atoms is greater than 100. Using a threshold can be a practical first pass when the collection is too large to inspect manually, or when you want to separate paths by approximate system size.
Use a range when a threshold is too broad
A single cutoff may return more paths than you need. To look within a particular interval, use a range expression:
path.nat 100:200
The short version is p.nat 100:200. The documentation describes this as matching paths with a number of atoms between 100 and 200. This gives you a compact way to focus on a size band rather than everything above or below one cutoff.
For example, imagine that you are reviewing a set of conformations and want to concentrate on paths in that range. Instead of relying on names to communicate size, the query makes the criterion explicit. You can adjust the numbers to suit the question you are investigating. Atom count is only a size-based filter, though: it does not tell you whether a conformation is chemically plausible, structurally similar to another, or otherwise suitable for your analysis.
Combine size with inherited attributes
Path nodes also inherit attributes from the general node attribute space. That includes name, selected, and selectionFlag. For example, p.n "L*" uses the path name attribute, while p.selected and not p.selected express selection state. The path-specific size attribute can help narrow the target set, while inherited attributes provide additional ways to describe nodes.
One detail worth remembering: selected is available for paths, but it does not have the short name s in this attribute space. Use p.selected rather than assuming the node-space abbreviation applies. By contrast, selectionFlag has the short form sf, as in p.sf or p.sf false.
A simple filtering habit
- Decide whether you need a cutoff or a bounded range.
- Write the query with
path.nat, or use the shorterp.nat. - Check that the result is useful for your modeling question; atom count narrows by size, not by structural quality.
- If needed, refine the description using inherited path attributes such as name or selection state.
This keeps the query focused and makes the filtering criterion easy to revisit later. For the full list of path attributes and examples, see the SAMSON path attributes reference.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
