When a molecular project contains several conformations, it can be hard to find the ones relevant to a particular task. A useful first step is to filter by a simple, measurable property: how many atoms each conformation contains. In SAMSON, the Node Specification Language (NSL) lets you express that filter directly.
The key detail is that this attribute applies to conformation nodes. It is not a query for individual atoms. The attribute is called numberOfAtoms, and its short form is nat. Because the conformation attribute space has the short name co, the compact expression is co.nat.
Find conformations above a size threshold
Suppose you want to identify conformations containing more than 100 atoms. Use:
co.nat > 100
This matches conformations whose atom count is greater than 100. The full attribute-space form is conformation.nat > 100. Both forms express the same condition; the short form is handy for a quick query, while the full form can make a longer expression easier to read.
A threshold is useful when you already have a rough size in mind—for example, when you want to narrow a collection before inspecting individual conformations. It replaces a manual scan with a condition that states exactly what you are looking for.
Focus on a range
If you are interested in a specific size band rather than everything above a cutoff, use a range:
co.nat 100:200
This matches conformations with a number of atoms between 100 and 200. The long-form equivalent is conformation.nat 100:200. A range can be a more focused starting point when a broad threshold would return too many candidates.
Use the attribute name nat for these searches. The documentation’s detailed examples show co.nat for both the greater-than condition and the range condition; relying on that form avoids confusing the atom-count query with the separate name attribute, n.
Combine size with other conformation properties
Conformations also inherit node attributes such as name, selected, and selectionFlag. For example, names can be queried with co.n, and the selection flag can be queried with co.sf. The selected attribute is available as co.selected or not co.selected; unlike the general node attribute space, it has no short name s for conformations.
These distinctions are useful when building a query: co.nat describes atom count, co.n describes name, and co.selected describes selection state. Each filters conformation nodes, but each answers a different question. Keep the attribute space explicit when writing a query so it is clear that you are targeting conformations.
A practical way to use the filter
- Decide whether you need a minimum size or a bounded interval.
- Write the corresponding expression:
co.nat > 100for a threshold, orco.nat 100:200for a range. - Adjust the numeric values to fit the conformations you want to examine.
- If needed, refine the query using another conformation attribute, such as its name or selection state.
The value of this approach is its simplicity: atom count becomes an explicit, readable criterion instead of an informal guess. It can help reduce a large set to a more manageable group, while leaving the scientific judgment about which conformations matter to you.
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.
