Find the Right Conformations by Atom Count

When a molecular project contains several conformations, finding the one you need can take longer than expected. A name may not tell you how large a conformation is, and selecting individual atoms is not the same as identifying a conformation node. If your immediate question is “Which conformations contain more than 100 atoms?” or “Which fall within a particular size range?”, the conformation.numberOfAtoms attribute offers a direct way to express it in SAMSON’s Node Specification Language (NSL).

Filter conformations, not atoms

The distinction matters: the conformation attribute space matches conformation nodes only. Its short prefix is co. So co.nat > 100 is a query about the number of atoms in each matching conformation; it is not a request to select every atom whose count somehow exceeds 100.

This can make a size-based search easier to reason about. Instead of scanning names or opening conformations one by one, describe the criterion you care about and let the query identify conformations that meet it. The documentation gives two useful patterns:

  • co.nat > 100 matches conformations with more than 100 atoms.
  • co.nat 100:200 matches conformations with a number of atoms between 100 and 200.

The full attribute name works too: conformation.numberOfAtoms > 100. The short form is simply more compact for repeated use. The range form is especially handy when a broad project contains conformations of very different sizes and you want to focus on a middle-sized group. The documentation describes the range as “between” 100 and 200; if the treatment of endpoints matters to your task, check the behavior in your SAMSON version rather than assuming whether the endpoints are included.

Use the attribute that answers your question

For a quick threshold check, use a comparison such as co.nat > 100. For a bounded search, use the range expression. Keeping the criterion explicit helps make a query easier to inspect later: the number in the expression records the size condition you intended, rather than leaving that choice implicit in a manual selection.

Conformations also inherit several attributes from the general node attribute space. You can query their name with co.n "A", check whether a conformation is selected with co.selected, or use not co.selected to match unselected conformations. The inherited selectionFlag attribute has the short name sf; for example, co.sf false and co.sf are documented forms. These attributes answer different questions: nat describes atom count, while name and selection-related attributes describe other properties of the conformation node.

A small query can reduce a lot of searching

When reviewing a set of conformations, start by stating the property that will narrow the search. If size is the deciding factor, use co.nat; if you need a specific name or selection state, use the corresponding inherited attribute. This keeps the search focused on the kind of node you mean to inspect and makes the filter easier to understand when you return to it.

For the complete list of conformation attributes and examples, see the SAMSON conformation NSL reference.

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

Comments are closed.