When a molecular project contains many conformations, locating the paths worth inspecting can become a small but persistent bottleneck. A long list makes it harder to focus on the structures relevant to a particular analysis. In SAMSON, Node Specification Language (NSL) lets you describe which nodes to match. For conformation paths, the path attribute space provides a direct way to filter by atom count.
Start with the path attribute space
Path attributes are written using the path attribute space, or its short form, p. This space matches only conformation nodes. That distinction is useful: a query beginning with p is aimed at paths, rather than indiscriminately describing every kind of node in a molecular document.
The path-specific attribute described here is numberOfAtoms, abbreviated nat. It accepts integer values, so you can express a numeric threshold or a range. For example, to find paths containing more than 100 atoms, use:
|
1 |
path.nat > 100 |
The equivalent short expression is:
|
1 |
p.nat > 100 |
Use a range when a threshold is too broad
A single cutoff is handy when you want to separate smaller paths from larger ones. But if the project includes paths of many different sizes, a range can narrow the search to a more manageable band:
|
1 |
path.nat 100:200 |
Or, using the short attribute-space name:
|
1 |
p.nat 100:200 |
This matches paths with a number of atoms between 100 and 200, according to the documented example. A range can be a practical starting point when you know roughly how large the structures of interest are, but do not want to select every path above a single lower limit.
A small workflow for narrowing a path collection
- Decide what you need to compare. If you only need to exclude paths below a size threshold, start with
p.nat > 100. If you have a target size band, tryp.nat 100:200. - Keep the query focused. The
pprefix makes clear that the expression is about conformation paths. This helps prevent a query from being read as a general node filter. - Check the selection state separately. Paths also inherit the
selectedandselectionFlagattributes from the node attribute space. For example,p.selectedandnot p.selectedexpress selected and not-selected path conditions;p.sfandp.sf falseare documented forms for the selection flag.
One detail worth remembering: although selected is inherited, it does not use the short name s in the path attribute space. Use p.selected rather than assuming that the node-space shorthand applies here. By contrast, selectionFlag has the short name sf.
Path names are inherited too. The documented examples include expressions such as p.n "A" and p.n "L*". If you are combining name-based filtering with atom-count filtering, use the documented attribute names and examples as a reference, and make the atom-count condition explicit so the size criterion is easy to review later.
The main benefit of these expressions is precision without a long manual scan: choose a threshold when you need a broad size cutoff, or a range when you want a narrower group of conformation paths. For the complete attribute reference and additional context, see the SAMSON path attributes documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
