Find the Right Conformations Without Clicking Through Them

When a molecular project contains many conformations, finding the paths that matter can become a small but persistent source of friction. You may need to focus on paths with a particular atom count, narrow the results to a named path, or revisit only the paths already selected. In SAMSON, the Node Specification Language (NSL) lets you describe these criteria as expressions instead of inspecting paths one at a time.

This guide focuses on a practical starting point: filtering paths by atom count, then combining that with inherited path attributes. The key detail is that the path attribute space matches only conformation nodes. Its short prefix is p, so an expression beginning with p. applies to paths rather than to every kind of node.

Start with the question you want to answer

Before writing an expression, translate the modeling task into a simple question. For example: “Which paths have more than 100 atoms?” The path-specific attribute for this is numberOfAtoms, abbreviated as nat. The full expression is path.nat > 100; the shorter equivalent is p.nat > 100.

This is useful when a project contains paths of different sizes and you want to narrow your attention based on atom count. The expression states the criterion directly, making it easier to repeat or adjust than a manual search. If 100 is too low or too high for your task, change the number and keep the same structure.

Use a range when a threshold is too broad

A single cutoff can return paths outside the size band you actually care about. To match paths with atom counts between 100 and 200, use path.nat 100:200, or its short form p.nat 100:200. A range is a compact way to express a more focused size criterion.

For example, if you are trying to review a manageable subset of conformations, first decide what atom-count interval is relevant to your work, then put those bounds in the expression. You can also compare that result with a broader filter such as p.nat > 100. The point is not that one cutoff suits every model; it is that the selection rule can be made explicit and adjusted to the question at hand.

Add context with inherited attributes

Paths also inherit attributes from the node attribute space. The name attribute can be written as p.n, with string values in quotes—for example, p.n "A". The documentation also gives p.n "L*" as an example. This can help when your search is organized around path names as well as their atom counts.

Two other inherited attributes are selected and selectionFlag. For paths, the examples include p.selected and not p.selected, as well as p.sf and p.sf false. Note that selected has no short name in the path attribute space, while selectionFlag uses sf. Keeping those details straight avoids a common source of confusing expressions: assuming every inherited attribute has the same shorthand in every attribute space.

A small checklist for writing path filters

  • Check the node type: the path space matches conformation nodes.
  • Choose the attribute: use nat for atom count, n for name, or an inherited selection attribute.
  • Use a clear criterion: write a comparison such as p.nat > 100 or a range such as p.nat 100:200.
  • Prefer the short form when convenient: p is the short name for path.

These expressions turn a broad path list into a more purposeful starting point: filter by size, add a name or selection criterion when useful, and refine the values to match the modeling question. For the complete attribute reference and examples, see the SAMSON path attributes documentation.

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

Comments are closed.