When a molecular project contains many conformations, finding the ones relevant to a particular task can become a small but persistent frustration. Names are not always enough: you may want to narrow the search by the number of atoms represented by a path. In SAMSON, the Node Specification Language (NSL) provides a direct way to describe that filter.
In this attribute space, path refers to conformation nodes. Its short form is p. The path-specific attribute numberOfAtoms, abbreviated nat, lets you match paths by atom count. That makes it useful when you need to distinguish larger paths from smaller ones or focus on a particular size interval.
Start with the size you need
For example, this expression matches paths with more than 100 atoms:
p.nat > 100
The longer form says the same thing:
path.nat > 100
If you are looking for paths with atom counts between 100 and 200, use:
p.nat 100:200
These expressions turn a vague search such as “show me the larger conformations” into a clear, reproducible criterion. You can adjust the threshold or interval to suit the set you are examining.
Use the name when size is not enough
Paths also inherit the name attribute from the node attribute space. For example, p.n "A" and p.n "L*" are documented name queries. This gives you another way to identify paths when their names are meaningful to your project. A size query and a name query address different questions: one describes atom count, while the other describes the node’s name.
Know what a path query can match
The key detail is that the path attribute space matches only conformation nodes. If your target is a different kind of node, a path query is not the appropriate starting point. This is worth checking before adjusting a query that appears to return no matches: confirm that the objects you want to find are paths representing conformations.
Path nodes also inherit selected and selectionFlag from the node attribute space. The documentation shows these forms:
p.selectedandnot p.selectedp.sfandp.sf false
The selected attribute does not have the short name s in the path space. For selectionFlag, the short name is sf. If you need to use either selection attribute in more detail, consult the node attribute reference for its behavior rather than assuming the two attributes mean the same thing.
A quick way to build a useful query
- Check that the objects you want to match are conformation nodes.
- Choose whether your first criterion is atom count or name.
- Use
p.nat > 100for a threshold, orp.nat 100:200for an interval. - If relevant, consult the node attribute documentation for inherited name and selection attributes.
Keeping the query tied to a specific attribute makes it easier to understand later, especially when revisiting a project or sharing a selection criterion with a colleague. For the full 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.
