Find the Conformations That Fit: Filter by Atom Count in SAMSON

When a molecular project contains many conformations, finding the ones relevant to a particular task can become a small but persistent source of friction. You may want to focus on larger structures, or narrow a list to conformations whose atom counts fall within a useful range. In SAMSON, the Node Specification Language (NSL) lets you express that kind of filter directly with the conformation attribute space.

Start with the question you need to answer

The conformation-specific attribute described here is numberOfAtoms, abbreviated nat. It matches conformations according to their number of atoms, so the first step is simply to turn your selection goal into a number-based condition.

  • To match conformations with more than 100 atoms, use co.nat > 100.
  • To match conformations in the 100-to-200 range, use co.nat 100:200.

The longer form of the attribute space is also available: conformation.nat > 100 and conformation.nat 100:200. The short prefix co is a convenient way to keep a query compact; the longer prefix can make the meaning easier to recognize when you return to a saved expression later.

Why atom-count filters are useful

Atom count is a simple structural property, but it can be a practical first pass when you are organizing or inspecting a set of conformations. For example, if you are looking for structures above a particular size, a threshold query can help you focus on that subset instead of checking each conformation individually. If you already know the approximate size you need, a range expression offers a concise way to describe that target interval.

These filters describe atom count only. They do not, by themselves, tell you whether a conformation is chemically appropriate for a particular analysis, whether two conformations are similar, or why their atom counts differ. Treat the result as a way to narrow your attention—not as a substitute for checking the structures and context relevant to your work.

Keep attribute names straight

One detail worth remembering is that co.nat means “number of atoms,” while co.n is the short name for the inherited name attribute. Names are matched using quoted strings, as in co.n "A" or co.n "L*". If your goal is to filter by size, use nat, not n. This distinction is easy to miss when writing a query quickly.

The conformation attribute space also inherits node attributes. For example, co.selected checks whether a conformation is selected, and co.sf refers to its selection flag. The inherited selected attribute does not have the short name s in this space. These attributes can help you understand the available vocabulary, but the atom-count examples above are the specific filters to use when your criterion is size.

A quick check before using a query

  1. Decide whether you need a threshold or a range.
  2. Use co.nat for atom count.
  3. Use co.n only when you mean the conformation’s name.
  4. Review the matched conformations in the context of your molecular model before drawing conclusions from the filter.

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

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

Comments are closed.