When a molecular project contains several conformations, it can be difficult to locate the one you need by name alone. A practical first step is to filter by a property you can count: the number of atoms in each conformation. In SAMSON, the Node Specification Language (NSL) provides a dedicated attribute for this purpose.
Start with the atom-count filter
Conformation attributes live in the conformation attribute space, abbreviated co. The attribute for atom count is numberOfAtoms, with the short name nat. That gives you two equivalent ways to write a query:
conformation.numberOfAtoms > 100co.nat > 100
Both expressions match conformations containing more than 100 atoms. The short form is convenient for repeated use; the full form can be easier to read when you are learning the language or sharing a query with someone unfamiliar with its abbreviations.
Use a range when a cutoff is not enough
A threshold is useful when you want to exclude small conformations, but sometimes you already know the approximate size you are looking for. NSL supports a range expression:
co.nat 100:200
This matches conformations with a number of atoms between 100 and 200. For example, this can help narrow a search to a size band rather than returning every conformation above a single minimum. The documentation also gives the long-form equivalent: conformation.numberOfAtoms 100:200.
Keep the target type in mind
The co attribute space matches only conformation nodes. This matters when interpreting a query: the filter is about conformations, not a general search for any node that happens to have a related name or property. If a result is not what you expected, first check that you are expressing the intended target type and using the conformation attribute space.
Names and selection state are inherited
Conformations also inherit several attributes from the general node attribute space. You can refer to a conformation’s name with co.n, using a quoted string such as co.n "A". The documentation also shows a wildcard-style name example, co.n "L*". Conformations inherit selected and selectionFlag as well; for example, co.selected checks selection state, while co.sf false refers to the selection flag. The inherited selected attribute does not have the short name s in this attribute space.
These inherited attributes can help describe or inspect conformations alongside the atom-count attribute. Keep each condition purposeful: begin with the count threshold or range that addresses your search, then add other criteria only when they help distinguish the conformations you are looking for.
A small syntax detail worth remembering
For atom-count filtering, use nat as the short name: co.nat. The short name n refers to name, not number of atoms. That distinction is easy to miss when writing a compact query, and checking the attribute name can save time when a search does not express the intended criterion.
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 at samson-connect.net.
