Find the Molecular Backbones That Matter: Filter by Size, Elements, and Charge

When a molecular structure contains many components, finding the backbone you need can be harder than inspecting it. A quick visual scan may not tell you which backbones are unusually large, rich in a particular element, or carry a charge worth checking. SAMSON’s Node Specification Language (NSL) lets you describe these properties as queries, so you can narrow your search using the information already associated with backbone nodes.

This is especially useful when you want to investigate composition or charge without relying on names alone. The backbone attribute space matches backbone nodes and includes attributes inherited from the structuralGroup and node spaces. In the examples below, bb is the prefix used for backbone attributes.

Start with size

To look for backbones with fewer than 1,000 atoms, use:

bb.nat < 1000

The short name nat refers to numberOfAtoms. If you are looking for a range rather than a cutoff, the documented form is:

bb.nat 100:200

This gives you two useful ways to frame a search: a comparison for a threshold, or a colon-separated range for a bounded interval. The same integer-style pattern is available for element counts. For example, to examine backbones with fewer than 10 carbons, use bb.nC < 10; to look for 10–20 nitrogen atoms, use bb.nN 10:20. The corresponding short names include nH for hydrogens, nO for oxygens, and nS for sulfurs.

Use composition to narrow a review

Element counts can help turn a broad structural inspection into a more focused one. If you are checking whether a backbone contains an unexpectedly high number of oxygen atoms, for instance, bb.nO > 10 expresses that threshold. If your question is about carbon count instead, bb.nC 10:20 describes the interval shown in the reference. These queries are not a substitute for chemical interpretation; they are a way to identify which backbone nodes deserve a closer look.

For coarse-grained structures, the reference also lists numberOfCoarseGrainedAtoms, with the short name ncga. An example threshold is bb.ncga < 1000. This is distinct from numberOfAtoms, so choose the attribute that matches the count you mean to inspect.

Check charge with the right kind of value

Charge attributes use different value types. formalCharge (fc) is an integer attribute; the documented examples include bb.fc > 1 and bb.fc 6:8. partialCharge (pc) uses floating-point values, with examples such as bb.pc > 1.5 and bb.pc 1.5:2.0. This distinction matters when translating a scientific question into a query: use the attribute that represents the charge measure you intend to inspect, and use values of the appropriate type.

Prefer clear prefixes when learning

The backbone attribute space has the short name s, but the reference examples use bb. Using the explicit bb prefix while learning makes it easier to recognize that each expression targets backbone attributes. One detail worth remembering: selected is inherited from the node attribute space, but it has no short name in this context. The documented form is bb.selected, not a shortened form based on s.

A practical workflow is to begin with one question—such as “Which backbones have fewer than 1,000 atoms?”—and express it with one attribute. Then try a composition or charge attribute that matches the next question. Keeping each expression understandable makes it easier to verify that the query reflects what you mean before using its results in your model-review process.

For the complete list of backbone attributes and examples, see the SAMSON backbone NSL reference.

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

Comments are closed.