Find the backbone you need by composition, charge, or name

When a molecular model contains many structural groups, finding a particular backbone by eye can be slow. You may be looking for a group with a certain number of atoms, a specific elemental composition, a charge range, or a recognizable name. SAMSON’s Node Specification Language (NSL) lets you describe those criteria with backbone attributes instead of relying on visual inspection alone.

This is especially useful when you want to make your search criteria explicit and repeatable. Rather than remembering which group looked right, you can write down the property you are checking and refine it as needed.

Start with the backbone attribute prefix

The backbone attribute space has the short name s. The reference page’s examples use bb before an attribute, such as bb.nat for number of atoms or bb.fc for formal charge. The examples below follow that documented form.

For a quick search by size, the number-of-atoms attribute is nat. For example, bb.nat < 1000 describes backbones with fewer than 1,000 atoms, while bb.nat 100:200 gives a range to search within. The range form is handy when you have a target scale in mind but do not need one exact count.

Use composition to narrow the search

Backbone attributes include counts for carbon, hydrogen, nitrogen, oxygen, and sulfur. Their short names are nC, nH, nN, nO, and nS. If you are checking for a relatively small number of a particular element, the documentation shows patterns such as bb.nO < 10 and bb.nN 10:20.

There are also attributes for total atoms and coarse-grained atoms: nat and ncga. This distinction can help you ask the right kind of size question. For example, bb.ncga < 1000 refers to the number of coarse-grained atoms, whereas bb.nat < 1000 refers to the number of atoms. Choose the attribute that matches what you are trying to compare.

Keep charge types distinct

The reference lists two charge attributes. fc is formal charge and takes integer values; an example is bb.fc 6:8. pc is partial charge and takes floating-point values; examples include bb.pc > 1.5 and bb.pc 1.5:2.0.

That difference matters when translating a scientific question into a search. If your criterion is an integer formal-charge value, use fc. If you are comparing a decimal partial-charge value, use pc. Mixing up the two can make a query express a different property from the one you intended.

Search by name or inspect state

Backbones inherit the node name attribute. It accepts strings in quotes; the page gives bb.n "A" and bb.n "L*" as examples. The reference also documents state-related attributes such as bb.selected, bb.v for visible, and bb.h for hidden. These can help express whether a backbone is selected or visible, rather than describing its chemical composition.

One detail worth noticing: selected is documented without the short name s. The page shows it as bb.selected. Other node attributes have short forms, including hm for hasMaterial, om for ownsMaterial, sf for selectionFlag, and vf for visibilityFlag.

A practical way to build a query

Begin with the property that best separates the backbone you want from the others: atom count, an element count, charge, or name. Use a comparison such as < or > when a threshold is meaningful, or a range such as 10:20 when you have lower and upper bounds. Then check that you have selected the correct attribute—especially for total atoms versus coarse-grained atoms, and formal versus partial charge.

These examples are starting points, not a substitute for choosing the property that fits your model and question. For the complete list of backbone attributes and their documented forms, see the Backbone attributes reference.

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

Comments are closed.