Find the Backbone Needles in Your Molecular Haystack

When a molecular model contains many structural groups, manually checking each one for atom composition or charge can become tedious. A useful first step is to narrow the search to backbone nodes, then describe the property you want to inspect with a Node Specification Language (NSL) query.

In SAMSON, the backbone attribute space uses the prefix bb (its short name is s). It matches backbone nodes only. Its attributes include properties inherited from the structuralGroup and node attribute spaces, so you can query both chemical composition and general node properties.

Start with the question you need to answer

Suppose you want to find backbone nodes with fewer than ten oxygen atoms. The documented query is:

bb.nO < 10

Here, nO is the short name for numberOfOxygens. Similar count attributes are available for carbon (nC), hydrogen (nH), nitrogen (nN), sulfur (nS), total atoms (nat), and coarse-grained atoms (ncga). For example, bb.nC 10:20 specifies a carbon-count range, while bb.nat < 1000 specifies a total-atom threshold.

These expressions can help turn a broad visual inspection into a targeted check: choose the count that corresponds to your concern, then use a threshold or range that makes sense for your structure. The examples are query patterns, not recommendations for universal cutoffs; appropriate values depend on the model and the question being investigated.

Keep charge types distinct

Backbone nodes expose two different charge attributes. formalCharge (short name fc) takes integer values. partialCharge (short name pc) takes floating-point values. That difference matters when you are translating a scientific question into a search: formal and partial charge are separate properties, not interchangeable labels.

For instance, bb.fc > 1 queries formal charge greater than one, and bb.fc 6:8 gives a formal-charge range. For partial charge, the documented examples include bb.pc > 1.5 and bb.pc 1.5:2.0. Use the attribute that matches the charge representation you want to examine.

Use names and node state for orientation

Composition is not the only way to narrow a search. The inherited name attribute accepts quoted strings: bb.n "A" and bb.n "L*" are examples. Backbone queries also expose state-related attributes, including visible (v), hidden (h), and selected. For example, not bb.v expresses a query for nodes that are not visible, while bb.selected refers to selection state.

One small syntax detail is easy to miss: selected has no short name in the backbone attribute space. Use bb.selected, rather than assuming that the backbone prefix itself can stand in for that attribute.

A practical way to build a query

  1. Decide what you are trying to locate: a composition, a charge value, a name, or a visibility/selection state.
  2. Choose the matching attribute and its documented short name, if available.
  3. Begin with one clear condition, such as bb.nO < 10 or bb.pc 1.5:2.0.
  4. Check the resulting matches in the context of your model before drawing conclusions. A query narrows the candidates; scientific interpretation still depends on the structure and the question.

Working from a specific question helps avoid a common source of confusion: treating every numeric property as the same kind of measurement. Atom counts are integers, formal charge is an integer, and partial charge uses floating-point values. The backbone attribute space gives you a consistent way to express these different checks while keeping the search focused on backbone nodes.

For the complete attribute list and further examples, see the backbone attributes reference.

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

Comments are closed.