When a molecular project contains many conformations, it can be hard to narrow the view to the paths relevant to a particular task. A useful first step is to filter by a concrete property: how many atoms a path contains. In SAMSON, the Node Specification Language (NSL) lets you express that filter directly, so you can focus on paths above a threshold or within a chosen range.
Start with the path attribute space
Path attributes live in the path attribute space, abbreviated p. This space matches only conformation nodes. The path-specific attribute covered here is numberOfAtoms, whose short name is nat. In practice, that means you can write path.nat or the more compact p.nat in a specification.
Filter by a threshold
If you want paths containing more than 100 atoms, use:
p.nat > 100
This is useful when you want to exclude smaller paths from consideration, for example while narrowing a set before inspecting it. The full attribute spelling is also available:
path.nat > 100
The two expressions refer to the same attribute. Short names can make repeated queries less cumbersome; full names can be easier to read when you are learning or sharing a specification.
Keep the search within a range
A threshold is not always enough. If you are interested in paths with a number of atoms between 100 and 200, use the range expression:
p.nat 100:200
The documentation gives the full-name form as path.nat 100:200. A range can be a practical way to turn a broad collection into a more manageable subset without requiring you to inspect each path individually.
Combine size filtering with inherited attributes
Paths also inherit several attributes from the general node attribute space. For example, you can match by name with p.n "A", or use the demonstrated name expression p.n "L*". You can also test selection state with p.selected or its inverse, not p.selected. The inherited selectionFlag attribute has the short name sf; examples include p.sf and p.sf false.
These attributes give you more than one way to describe the subset you need: atom count for size, name for identification, and selection state for whether a node is selected. The examples show each attribute separately; use the relevant expressions for the filtering task you have in mind, and consult the NSL reference for the broader language and syntax.
A quick check before you run a query
- Use
p.natwhen filtering paths by atom count. - Use
>for the documented greater-than threshold example. - Use a colon-separated pair, such as
100:200, for the documented range form. - Remember that
prefers to the path attribute space, which matches only conformation nodes. - For names and selection state, use the inherited attributes shown above;
selecteddoes not have the short namesin this attribute space.
These small distinctions can save time when a query returns a different subset than expected. For the complete attribute table and additional context, see the path attributes reference and the Node Specification Language overview.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
