When a molecular project contains many conformations, it can be difficult to identify the paths worth inspecting. A name may not tell you how large a conformation is, and opening items one by one just to check their atom counts can interrupt your workflow. SAMSON’s Node Specification Language (NSL) lets you describe a path filter directly, including a simple test for the number of atoms.
Start with the path attribute space
In NSL, the path attribute space matches conformation nodes. Its short name is p, so you can write either the full form, such as path.numberOfAtoms > 100, or the shorter form, p.nat > 100. The short form is useful when you are composing or revising queries; the full form can be easier to recognize when you return to an expression later.
Filter by atom count
The path-specific attribute numberOfAtoms, abbreviated nat, accepts integers. Use a comparison when you have a threshold in mind:
p.nat > 100matches paths with more than 100 atoms.
This is useful when your immediate question is simply whether a conformation is larger than a chosen cutoff. The query makes the criterion explicit, rather than relying on a visual scan or a remembered name.
If you are looking for a bounded size range, use a colon between two integers:
p.nat 100:200matches paths with a number of atoms between 100 and 200.
For example, if you want to focus your review on medium-sized conformations, this expression gives you a direct way to state that interval. You can adjust the two values to suit the question you are investigating. The documentation describes the range as “between” the values; if the exact treatment of boundary values matters to your analysis, check the behavior in your SAMSON version rather than assuming a boundary convention.
Combine size with inherited attributes
Paths also inherit several attributes from the general node attribute space. That means you can describe a path by its name or selection state as well as by its atom count. For example, the name attribute accepts quoted strings, and the documented examples include p.n "A" and p.n "L*". These can help when you already use naming conventions for conformations.
The inherited selected attribute can be written as p.selected; its negation is shown as not p.selected. This gives you a way to distinguish selected paths from paths that are not selected. The inherited selectionFlag attribute has the short name sf, with examples p.sf and p.sf false.
For instance, you might first use p.nat 100:200 to define a size-based set, then consider whether a name or selection condition is also relevant. Keeping these criteria separate while you formulate the query helps make it clear what you are asking NSL to match. The examples here describe individual expressions; use the NSL query workflow in SAMSON to apply and refine them for your project.
A small syntax detail that can save confusion
The short name for the path attribute space is p, and the short name for atom count is nat. Therefore, use p.nat for atom-count queries. The general name shorthand is n, as in p.n; it is not the atom-count attribute. Also, although selected is inherited, the path reference specifically notes that it does not use the short name s. Writing p.selected avoids relying on that shorthand.
When a collection of conformations becomes hard to inspect manually, a precise filter can turn a broad browsing task into a targeted one. Start with the property that matters—here, atom count—then add inherited attributes only when they help narrow the set.
For the complete attribute reference and additional details, see the SAMSON path attributes documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
