When a molecular model contains many conformations, finding the paths that are relevant to a particular task can become a small but persistent source of friction. A path may contain far more atoms than the structures you want to inspect—or fewer. In SAMSON, the Node Specification Language (NSL) lets you describe paths by their attributes, including their number of atoms, so you can make that distinction explicit.
First, what does “path” mean here?
The path attribute space matches only conformation nodes. That detail matters: a query using p is aimed at paths, not at every kind of node in a molecular document. If your goal is to identify conformations by size, the relevant attribute is numberOfAtoms, abbreviated nat.
Use an atom-count threshold
Suppose you want to find paths with more than 100 atoms. The full attribute name and its short form express the same condition:
|
1 2 |
path.numberOfAtoms > 100 p.nat > 100 |
The short form is useful when you are writing or revising queries repeatedly. The condition gives you a direct way to distinguish larger paths from smaller ones without relying on names or visual inspection alone.
Look within a size range
If a threshold is too broad, specify a range instead. For paths with between 100 and 200 atoms, use:
|
1 |
path.nat 100:200 |
This is helpful when you already know the approximate size of the conformations you need. For example, a researcher preparing a manageable subset for closer review could use a range to narrow the candidates before examining them further. The expression describes a selection criterion; it does not itself explain why a path has that atom count or whether it is scientifically appropriate for a particular analysis.
Keep path attributes distinct from inherited attributes
Paths also inherit several attributes from the more general node space. These include name, selected, and selectionFlag. For example, the documentation shows name queries such as p.n "A" and p.n "L*", and selection checks such as p.selected or not p.selected. The selection flag can be checked with p.sf or set as a condition with p.sf false.
One easy detail to miss: although selected is inherited, it has no short name in the path attribute space. Use p.selected, not a presumed short form. By contrast, selectionFlag has the short form sf, and numberOfAtoms has the short form nat.
A practical way to build the query
- Confirm that the objects you want to match are conformation nodes.
- Choose whether you need a lower threshold, such as
p.nat > 100, or a bounded range, such asp.nat 100:200. - If useful, inspect the inherited path attributes—name, selection state, or selection flag—as additional ways to describe the paths you are looking for.
Being explicit about the attribute space and the size condition makes a query easier to understand later, especially when you return to a model with many conformations. 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.
