When a molecular model contains many structural groups, finding the relevant backbone can take longer than inspecting it. Maybe you need to locate groups with an unusual atom count, check for nonzero formal charge, or distinguish visible from hidden groups. In SAMSON, the Node Specification Language (NSL) lets you describe these criteria as queries instead of checking each group one by one.
This guide focuses on a practical subset of backbone attributes: composition, size, charge, and basic display or selection state. The examples use the bb prefix shown in the backbone reference. Backbone attributes include properties inherited from the structuralGroup and node attribute spaces, so a backbone query can use both chemical-group properties and general node properties.
Start with the size of the group
A useful first pass is to narrow the search by atom count. The nat short name refers to numberOfAtoms, and the documentation gives these examples:
bb.nat < 1000finds backbone groups with fewer than 1,000 atoms.bb.nat 100:200specifies a range of 100 to 200 atoms.
These filters can help when a model contains groups of very different sizes: rather than searching visually, you can begin with a size range that fits the structures you want to inspect. The reference also lists counts for individual elements, including carbon (nC), hydrogen (nH), nitrogen (nN), oxygen (nO), and sulfur (nS). For example, bb.nO 10:20 describes a backbone group with 10 to 20 oxygens, while bb.nC < 10 selects groups with fewer than 10 carbons.
There is also a count for coarse-grained atoms, ncga. Use the same documented comparison and range styles, for example bb.ncga < 1000.
Check charge-related properties
If charge is relevant to your inspection, NSL exposes both formalCharge (fc) and partialCharge (pc). The reference shows integer comparisons and ranges for formal charge, such as bb.fc > 1 and bb.fc 6:8. For partial charge, which accepts floating-point values, examples include bb.pc > 1.5 and bb.pc 1.5:2.0.
The distinction matters when writing a query: use the attribute that corresponds to the charge data you mean to inspect, and use a numeric range appropriate to that attribute. These expressions describe attribute criteria; they do not replace understanding what the charge values represent in your model.
Use names and state to narrow the result
Not every useful filter is chemical. The inherited name attribute accepts quoted strings, with examples such as bb.n "A" and bb.n "L*". The page also lists boolean attributes for visibility, hidden state, selection, and material. For example, bb.v tests visibility, while not bb.v tests the opposite; bb.h and not bb.h express the same kind of check for hidden state.
For selection, the full attribute name is selected: use bb.selected or not bb.selected. The reference notes that this attribute has no short name in the backbone attribute space. Other available short forms include sf for selectionFlag and vf for visibilityFlag; documented examples include bb.sf false and bb.vf false.
A simple way to build a query
Begin with one property that captures your immediate need: a size range, an element count, a charge threshold, or a display state. Check that the attribute belongs to the kind of object you want to match—this page describes attributes for backbone nodes—then refine the criterion using another relevant property if needed. Keeping the first pass focused makes it easier to see whether the filter is addressing the right problem before adding more conditions.
In short, backbone NSL attributes can turn common inspection tasks into explicit, repeatable criteria: count atoms, look at particular elements, examine charge values, or check node state. For the full attribute list and syntax examples, see the SAMSON backbone attributes reference.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
