When a molecular project contains many conformations, finding the paths you need can become a small but persistent source of friction. Names may be inconsistent, and scanning a long list to spot the larger or smaller structures is slow. If the distinction you care about is how many atoms a path contains, SAMSON’s Node Specification Language (NSL) lets you express that criterion directly.
Filter paths, not individual atoms
The path attribute space matches conformation nodes. Its short name is p. For filtering by atom count, the key attribute is numberOfAtoms, abbreviated as nat. Together, these give you a compact way to describe the paths you want to match.
For example, to match paths containing more than 100 atoms, use:
p.nat > 100
The full attribute form is path.numberOfAtoms > 100. The short form is easier to type, while the full form can be easier to recognize when you are learning the syntax or revisiting a query later.
Use a range when size alone is not enough
Sometimes the goal is not to find every large path, but to narrow the results to a useful size band. The range expression shown in the documentation is:
p.nat 100:200
This matches paths with a number of atoms between 100 and 200. It can be a more focused starting point than a single threshold when the project contains paths of widely varying sizes.
Why this can help in a real modeling task
Atom count is a simple structural measure, but it can help reduce a crowded set of conformations to a more manageable group. For example, if you already know that the paths relevant to your next inspection contain more than 100 atoms, a query can express that rule consistently instead of relying on visual scanning. If you want to compare a narrower group, the 100-to-200 range gives you a second, more constrained query to try.
These expressions describe a filter criterion; they do not explain why a path has a particular atom count or whether it is scientifically appropriate for your analysis. Treat the result as a way to locate candidate paths, then assess those candidates in the context of your modeling work.
Keep the attribute space straight
NSL also lets paths use attributes inherited from the general node attribute space. For example, you can refer to a path’s name with p.n, or test its selected state with p.selected. The selection flag has the short form p.sf. These inherited attributes are separate from the path-specific atom-count attribute, p.nat.
One detail worth remembering: the inherited selected attribute does not use the short name s in the path attribute space. Use p.selected when expressing that condition. Keeping the prefixes and attribute names explicit can make queries easier to read, especially when you combine criteria.
A quick way to choose your expression
- Use
p.nat > 100when you want paths with more than 100 atoms. - Use
p.nat 100:200when you want paths in the documented 100-to-200 range. - Use
p.nfor a path name, andp.selectedfor its selected state.
The main benefit is precision: instead of searching by eye, you can state a size criterion in a short, reusable expression. For the complete 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.
