Find the Right Conformations by Atom Count

When a molecular project contains many conformations, finding the ones relevant to a particular analysis can become a practical bottleneck. A useful first step is to narrow the set by a property you can state clearly: how many atoms each path contains.

In SAMSON, the Node Specification Language (NSL) provides a way to describe which nodes to match. The path attribute space is specifically for conformation nodes. Its short form is p, so you can write a compact query without losing the meaning of the full attribute name.

Filter paths by size

The attribute path.numberOfAtoms, shortened to p.nat, matches paths according to their number of atoms. This is useful when you want to focus on larger or smaller conformations rather than inspect every path one by one.

For example, this expression matches paths containing more than 100 atoms:

p.nat > 100

The full attribute form is path.numberOfAtoms > 100. Both forms express the same filter; the short form is convenient when writing queries, while the full form can be easier to read when you are learning the attribute names.

To look for paths with an atom count in a range, use:

p.nat 100:200

The documentation describes this as matching paths with between 100 and 200 atoms. A range can be a helpful starting point when a project includes conformations of very different sizes and you want to reduce the set to a more manageable group.

Know what the query applies to

The path attribute space matches only conformation nodes. That scope matters: this is not a general filter for every kind of node in a molecular document. If a query returns no matches, first check whether the items you are trying to find are represented as conformation nodes, then check the atom-count threshold or range.

Path nodes also inherit some attributes from the node attribute space. For example, you can refer to a path’s name using p.n, and the examples include name patterns such as p.n "L*". Paths also inherit selected and selectionFlag. The selection state can be written as p.selected or not p.selected; the selection-flag attribute can be written as p.sf or p.sf false.

One small detail can save time: although selected is inherited, it does not have the short name s in the path attribute space. Use p.selected rather than assuming a shortened selection expression will work for paths. By contrast, selectionFlag does have the short name sf.

A simple query-building habit

Start with one condition that expresses the question you have—for example, whether paths contain more than 100 atoms. If that is too broad, adjust the threshold or use a range such as p.nat 100:200. Once you understand which paths match, you can inspect their names or selection-related attributes as needed. Keeping each step explicit makes it easier to spot whether a mismatch comes from the query or from the kind of node being searched.

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.