From a crowded model to a focused backbone search

When a molecular model contains many structural groups, finding the backbone you need can be more difficult than inspecting it. You may be looking for a group with a particular atom count, a carbon-rich composition, or a charge value within a chosen range. In SAMSON, the Node Specification Language (NSL) lets you express these properties as searches in the backbone attribute space.

Start with the right target

Backbone attributes apply to backbone nodes. The documentation identifies s as the short name for the backbone attribute space, and its examples use the prefix bb, as in bb.nC or bb.fc. These are useful search expressions to keep at hand when you want to focus on backbone groups rather than searching without specifying that attribute space.

Use composition to narrow the search

If the main question is how many atoms of a certain element a backbone contains, use the element-count attributes. For example, bb.nC < 10 searches by carbon count below 10, while bb.nC 10:20 expresses a range from 10 to 20. The same pattern works for hydrogen, nitrogen, oxygen, and sulfur counts:

  • bb.nH 10:20 — hydrogen count in a range.
  • bb.nN < 10 — nitrogen count below a threshold.
  • bb.nO 10:20 — oxygen count in a range.
  • bb.nS < 10 — sulfur count below a threshold.

This makes element counts a practical first step when a structure is visually dense: use a measurable property to focus attention before inspecting candidates in detail. If elemental composition is not the only concern, the broader atom-count attribute is available too. For example, bb.nat 100:200 searches by total number of atoms, while bb.ncga < 1000 refers to the number of coarse-grained atoms.

Check charge using the appropriate value type

Formal charge and partial charge are separate attributes, so choose the one that matches the question you are asking. Formal charge uses integer values; the documented examples include bb.fc > 1 and bb.fc 6:8. Partial charge uses floating-point values, with examples such as bb.pc > 1.5 and bb.pc 1.5:2.0. That difference matters: an integer-style charge search and a decimal-valued partial-charge search are not interchangeable.

A useful habit is to begin with a broad, relevant attribute, then refine your search using another documented attribute as needed. For instance, you might first look at a backbone’s atom count and then inspect its formal or partial charge. The examples on this page show each expression individually; use the NSL examples reference if you need guidance on how to combine conditions into a single expression.

Keep search expressions readable

Short names make repeated searches more compact: nC means number of carbons, nat means number of atoms, fc means formal charge, and pc means partial charge. When sharing a search with a colleague, it can help to explain the attribute in plain language alongside the expression. For example: “bb.nC 10:20 — backbones with 10–20 carbons.” This small bit of context can prevent confusion between an element count and a total atom count.

Backbone nodes also inherit general node attributes such as name, visible, and selected. These can help identify or manage nodes, while the composition and charge attributes support searches based on molecular properties. One small detail: the documentation notes that selected has no short name in this attribute space, so use bb.selected rather than assuming it has a shorter alias.

For the complete attribute list and additional details, see the SAMSON backbone attributes reference.

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

Comments are closed.