A collection of conformations can become difficult to inspect when it contains paths with very different sizes. If you are trying to focus on larger structures—or narrow a search to paths within a particular size range—checking them one by one is tedious and easy to get wrong. In SAMSON, the path attributes in the Node Specification Language (NSL) let you express that filter directly.
First, know what a path query matches
The path attribute space, abbreviated p, matches only conformation nodes. This matters: a path query is not a general filter for every kind of node in a molecular document. If your intended targets are conformations, the path-specific attributes provide a focused way to describe them.
Filter by the number of atoms
The most useful path-specific attribute for size-based filtering is numberOfAtoms, with the short form nat. Use it to express a threshold or a range:
path.numberOfAtoms > 100, or the shorterp.nat > 100, matches paths with more than 100 atoms.path.numberOfAtoms 100:200, orp.nat 100:200, matches paths with a number of atoms between 100 and 200.
The short form is handy when you are writing or revisiting queries often. The full attribute name can be easier to read when sharing a query with someone who is new to NSL. Both forms refer to the same attribute.
Make the query useful for the task
Before choosing a threshold, consider what you need to examine. A query such as p.nat > 100 is a way to describe paths above a size cutoff; the range form is useful when you want to focus on a bounded group instead. These examples are not a substitute for understanding the structures in your model, but they can reduce the set of paths you need to inspect manually.
If a query returns no results, check that the objects you expect to match are conformation nodes, since the path attribute space is limited to those nodes. Then check the number and comparison in your expression: a threshold above 100 will not match a path with exactly 100 atoms, because the documented example uses “more than 100.” For a range query, confirm that the endpoints reflect the interval you intended.
Names and inherited node attributes
Paths also inherit attributes from the node attribute space. For example, p.n "A" uses the short name for name, and p.n "L*" is another documented name-expression example. The inherited selected attribute can be written as p.selected or negated as not p.selected. Unlike some node queries, the path form does not have the short name s for selected.
The inherited selectionFlag attribute has the short name sf; documented examples include p.sf and p.sf false. These attributes give you additional ways to describe paths, while p.nat addresses the specific problem of filtering by atom count.
A small, explicit query can make a large collection easier to reason about: start with the path attribute space, choose an atom-count threshold or range, and verify that the intended conformations match. For the complete attribute reference and further examples, see the SAMSON path attributes documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
