When a molecular system contains many conformations, it can be tedious to locate the paths that are large enough to matter for a particular analysis. Opening paths one by one just to check their atom counts adds friction before the scientific work even begins. In SAMSON, the Node Specification Language (NSL) lets you describe a path by its number of atoms and match paths that meet a size criterion.
The key attribute is path.numberOfAtoms, abbreviated p.nat. It applies to conformation nodes in the path attribute space. That distinction matters: this is a path-specific filter, not a general-purpose atom-count query for every kind of node.
Start with a threshold
If you want to find paths containing more than 100 atoms, use:
p.nat > 100
The full attribute form is path.nat > 100. Both forms express the same criterion: match paths whose atom count is greater than 100. This is useful when a fixed cutoff is the clearest way to separate smaller paths from larger ones.
Use a range when size has a window
Sometimes the useful paths are not simply all paths above a minimum. You may be comparing conformations within a particular size band, or trying to narrow a large set before inspecting it. The documented range expression is:
p.nat 100:200
This matches paths with a number of atoms between 100 and 200. A range can make the intent of a query easier to read than a sequence of separate lower- and upper-bound conditions. It also gives you a compact way to adjust the window as your analysis changes.
Read the attribute space correctly
Path attributes include some properties inherited from the broader node attribute space. For example, paths can be matched by name with p.n "A" or p.n "L*". They also inherit selected and selectionFlag. The selection attribute can be written as p.selected or negated as not p.selected; the selection flag has the short form p.sf.
One small detail can prevent confusing queries: the inherited selected attribute does not have the short name s in the path attribute space. For selection-flag queries, the documented short name is sf. When in doubt, use the full attribute name or check the path attribute reference.
A practical way to work
-
Decide whether you need a minimum size or a bounded range.
-
Use
p.nat > valuefor a threshold, orp.nat lower:upperfor a range. -
Adjust the numeric values to suit the paths you need to examine; the examples are patterns, not universal cutoffs.
-
If you need to identify paths by a name or selection state as well, consult the inherited attributes listed for the path space and build from the relevant documented syntax.
The benefit is straightforward: instead of relying on a visual scan to find paths of a particular size, you can state the size criterion directly. That makes the search easier to repeat and the intent easier to communicate to someone else working with the same structure.
For the complete attribute list and syntax details, see the SAMSON path attribute reference.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
