Find the Right Conformation Paths by Atom Count

When a molecular project contains many conformation paths, finding the ones relevant to a task can become a small but persistent source of friction. A path may be too small for the analysis you have in mind, or you may need to narrow your attention to paths within a particular size range. In SAMSON, the Node Specification Language (NSL) provides a direct way to describe paths by their number of atoms.

The key detail is that path is an attribute space that matches only conformation nodes. Its short name is p. To filter paths by atom count, use the path-specific attribute numberOfAtoms, whose short name is nat.

Start with a threshold

If you want to find paths containing more than 100 atoms, write:

This expresses a straightforward question: which conformation paths have a number of atoms greater than 100? The full attribute spelling is also available:

Using the short form can make repeated queries more compact, while the full form can be easier to read when you are learning the syntax or sharing an expression with someone new to NSL.

Use a range when a cutoff is not enough

Sometimes you are not looking for every path above a minimum. You may instead want to focus on paths with an atom count between two values. For example:

The documented example describes this as matching paths with between 100 and 200 atoms. A range can be a useful way to limit a query to a more manageable size band without having to inspect each path’s atom count individually.

Keep path attributes distinct

NSL also makes inherited node attributes available in the path attribute space. For example, p.n refers to a path’s name, not its number of atoms. Name values are strings in quotes, as in p.n "A" or p.n "L*". For atom counts, use p.nat. Remembering this distinction helps avoid a common source of confusion: the short name n is for names, while nat is for the number of atoms.

Selection-related attributes are inherited too. p.selected checks the selected state, and not p.selected expresses the opposite. The selectionFlag attribute has the short name sf, with examples including p.sf false and p.sf. Unlike the node attribute space, selected does not have the short name s in the path attribute space.

A practical way to use these expressions

  1. Decide whether you need a minimum atom count or a bounded range.

  2. Use p.nat for the count, followed by a comparison such as > 100, or by a range such as 100:200.

  3. Check that the expression describes paths: the path attribute space is specifically for conformation nodes.

  4. If you also need to reason about a path’s name or selection state, use the corresponding inherited attributes rather than treating them as atom-count filters.

The main benefit is clarity: the expression records the criterion you care about, so you can focus on paths by size instead of relying on visual inspection alone. 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.