Find the right-sized conformation without counting atoms by hand

When a molecular project contains several conformations, finding one with a suitable number of atoms can turn into a tedious visual check. Names may not describe molecular size, and opening conformations one at a time to inspect them is an inefficient way to answer a simple question: which ones are above a threshold, or fall within a size range?

In SAMSON, the Node Specification Language (NSL) lets you express that criterion directly. The conformation attribute space matches conformation nodes, and its numberOfAtoms attribute is designed for filtering by atom count.

Start with the question you need to answer

For conformations containing more than 100 atoms, use:

co.nat > 100

Here, co is the short name for the conformation attribute space, and nat is the short name for numberOfAtoms. The expression is a compact way to state the criterion: match conformations whose atom count is greater than 100.

If you are looking for conformations in a particular size band, use a range instead:

co.nat 100:200

The full attribute name works too: conformation.numberOfAtoms > 100 or conformation.numberOfAtoms 100:200. The long form can be easier to read when you are learning NSL or revisiting an expression later; the short form is convenient when you already know the attribute.

Make the filter answer a useful modeling question

Atom count is a simple, reproducible way to narrow a set of conformations before you inspect them further. For example, you might want to locate conformations larger than a chosen threshold, or reduce a long list to those whose atom counts fall in a range relevant to your current comparison. The expression records the criterion explicitly, so you do not have to rely on memory or on names that may not communicate size.

A practical habit is to translate the question into the attribute before writing the query:

  • “More than 100 atoms?” → co.nat > 100
  • “Between 100 and 200 atoms?” → co.nat 100:200

This also helps avoid confusing an atom-count query with a name query. In the conformation attribute space, n is the short name for name, while nat means numberOfAtoms. For instance, co.n "A" refers to a conformation name, not an atom count. Use the attribute that matches the property you are trying to filter.

Keep the conformation context in mind

The co prefix matters: these attributes belong to the conformation attribute space and match conformation nodes. The page also lists inherited node attributes. You can refer to whether a conformation is selected with co.selected or not co.selected; in this context, selected does not use the short name s. The inherited selectionFlag attribute has the short name sf, as in co.sf or co.sf false.

One detail worth checking when copying examples: the number-of-atoms attribute is nat. Write co.nat 100:200 for the atom-count range, not co.n 100:200, because n refers to the name attribute.

Using an explicit atom-count condition is a small change that can make a repetitive search more consistent. For the complete attribute reference and additional context, see the SAMSON conformation attributes documentation.

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

Comments are closed.