Find the Backbone Groups That Matter—Without Inspecting Them One by One

When a molecular structure is large, locating the backbone groups relevant to a question can mean a lot of repetitive inspection. You might be looking for groups with a particular number of atoms, a range of carbon counts, or a specific formal charge. In SAMSON, the Node Specification Language (NSL) lets you express these criteria as queries against backbone nodes.

This is useful when you want to narrow a structure to candidates before examining them more closely. The backbone attribute space includes its own attributes and attributes inherited from the node and structuralGroup spaces. For the examples below, the documentation uses the prefix bb.

Start with composition

Counts of atoms and elements can help turn a vague search into a concrete filter. The backbone attributes include total atom count (numberOfAtoms, short name nat) and counts for carbon (nC), hydrogen (nH), nitrogen (nN), oxygen (nO), and sulfur (nS). They also include numberOfCoarseGrainedAtoms (ncga).

For example, these documented expressions ask for groups below a threshold or within a numeric range:

  • bb.nat < 1000 — fewer than 1,000 atoms.
  • bb.nC 10:20 — a carbon-count range from 10 to 20.
  • bb.nO < 10 — fewer than 10 oxygen atoms.
  • bb.ncga 100:200 — a coarse-grained atom count in the specified range.

The range notation is a compact way to describe a bounded search instead of writing separate queries for individual counts. If you are not sure which cutoff is useful, begin with a broad range and refine it as you learn more about the structure you are examining.

Use charge as another clue

Composition is only part of the picture. The inherited structuralGroup attributes include formalCharge (fc) and partialCharge (pc). Formal charge accepts integer comparisons or ranges; partial charge accepts floating-point values. The documented examples include:

  • bb.fc > 1 — formal charge greater than 1.
  • bb.fc 6:8 — a formal-charge range.
  • bb.pc > 1.5 — partial charge greater than 1.5.
  • bb.pc 1.5:2.0 — a partial-charge range.

Keep the distinction between the two attributes in mind: one is listed as an integer, the other as a float. Choose the one that matches the property you intend to investigate rather than treating “charge” as a single interchangeable criterion.

Recognize the inherited node controls

Backbone nodes also inherit common node attributes. You can query visibility with bb.v or not bb.v, and selection with bb.selected or not bb.selected. Other available attributes include hasMaterial (hm), hidden (h), ownsMaterial (om), selectionFlag (sf), and visibilityFlag (vf).

One small detail can prevent confusing queries: the backbone space is documented with the short name s, but selected has no short name there. The examples therefore use bb.selected, while the separate selectionFlag attribute has the short name sf. When in doubt, the full attribute name is an easy way to make a query more readable.

A practical way to work

Begin by translating the question into one measurable property: atom count, an element count, formal charge, or partial charge. Use the relevant example as a template, replace its threshold or range with values that suit your case, and inspect the matching backbone nodes. Then adjust the criterion if the result is too broad or too narrow. This keeps the search grounded in explicit attributes rather than relying on memory or visual inspection alone.

These are individual query examples from the reference; the page does not specify how to combine multiple conditions. For the complete attribute list and links to inherited definitions, see the SAMSON backbone attributes reference.

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

Comments are closed.