Find the Conformations That Carry the Atom Count You Need

When a molecular project contains many conformations, it can be difficult to spot the paths that deserve closer inspection. A path may represent a small or large structure, and scanning names alone does not tell you how many atoms it contains. In SAMSON, the Node Specification Language (NSL) lets you filter conformation nodes by their atom count, helping you narrow a search to paths of a useful size.

Start with the path attribute space

The path attribute space matches only conformation nodes. Its short form is p. This distinction matters: a path query is aimed at conformations, not at every kind of node in a molecular document.

The path-specific attribute for atom count is numberOfAtoms, abbreviated nat. You can use either the full form or the short form. For example, these expressions ask for paths with more than 100 atoms:

  • path.nat > 100
  • p.nat > 100

The short version is useful when you are writing queries repeatedly; the full version can be easier to read when sharing an expression with someone who is new to NSL.

Choose a threshold or a range

A threshold is helpful when the question is simply, “Which paths are larger than this?” The expression p.nat > 100 makes that condition explicit. Change the number to set a different cutoff for your task.

If you want to focus on paths within a particular size band, use a range instead:

path.nat 100:200

The short form is p.nat 100:200. The documentation describes this as matching paths with a number of atoms between 100 and 200. A range can be useful when you want to compare conformations in a bounded size group rather than include every path above a single threshold.

Keep the query’s scope in mind

These expressions filter paths by their number of atoms; they are not a general-purpose atom-selection query. If your goal is to locate individual atoms, the path attribute space is not the right scope on its own. First confirm that the objects you want to match are conformation nodes, then apply the atom-count condition.

Paths also inherit some attributes from the general node space. For example, you can refer to a path’s name with p.n "A", and the documentation lists p.n "L*" as another example. Paths inherit selected and selectionFlag as well. Note that the inherited selected attribute has no short name in the path space, while selectionFlag can be written as p.sf. These are separate attributes from atom count, so use them when the question concerns a path’s name or selection state rather than its size.

A practical way to use the filter

Start with the simplest expression that answers your question: use p.nat > 100 for a lower-bound search, or p.nat 100:200 for a bounded group. If the result is not the set you intended, check two things: whether you are querying conformation paths, and whether the threshold or range reflects your intended atom-count cutoff. This small check can prevent a common source of confusion: applying a valid-looking condition to the wrong kind of node.

For the complete attribute reference and additional examples, see the SAMSON path attributes documentation.

Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.

Comments are closed.