Find the right conformation by counting atoms

When a molecular project contains many conformations, it can be difficult to find the ones worth inspecting. A useful first filter is often surprisingly simple: the number of atoms. In SAMSON, the Node Specification Language (NSL) lets you search conformation nodes by this property, helping narrow a large set to a manageable group before you inspect names or selection state.

Start with an atom-count threshold

The conformation attribute numberOfAtoms has the short name nat. To match conformations with more than 100 atoms, use:

co.nat > 100

The longer equivalent is conformation.nat > 100. The short prefix co identifies the conformation attribute space, and nat refers to its atom-count attribute. The comparison is useful when you already have a rough idea of the scale of the structures you need—for example, when you want to set aside smaller conformations and focus on larger ones.

Search within a range

If a threshold is too broad, specify a range instead:

co.nat 100:200

This matches conformations with a number of atoms between 100 and 200. The documentation also gives conformation.nat 100:200 as the longer form. Values for this attribute are integers, so use whole numbers for the atom count.

Use names and selection state as context

Atom count is only one way to orient yourself in a project. Conformations also inherit several attributes from the general node attribute space. For example, co.n "A" searches by name, while co.selected matches selected conformations and not co.selected matches those that are not selected. The name attribute accepts strings in quotes; the selection attribute accepts true or false.

There is also an inherited selectionFlag attribute, with the short name sf. The documented examples include co.sf and co.sf false. These attributes can help you distinguish nodes by their names or selection-related state when atom count alone does not answer your question.

A practical filtering habit

Rather than scanning every conformation by eye, begin with a concrete question: “Am I looking for structures above a particular size, or within a size interval?” Use co.nat > 100 for a threshold, or co.nat 100:200 for a range. Then use the documented name and selection attributes when those provide useful context. Keeping the query focused makes it easier to understand what your search is matching and to adjust the criterion when the result set is too broad or too narrow.

These examples are starting points, not assumptions about what a particular project should contain. Choose the numbers that fit the structures you are working with, and remember that numberOfAtoms applies to conformations. The co attribute space is specifically for matching conformation nodes.

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

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

Comments are closed.