When a molecular structure contains many residues or structural groups, finding the right backbone can become a small but persistent source of friction. You may need to identify groups with a particular atom count, inspect those with a substantial partial charge, or simply distinguish visible from hidden backbones. Node Specification Language (NSL) lets you express these checks as compact attribute queries.
The useful detail is that the backbone attribute space matches backbone nodes. Its short name is s, and the documentation’s examples use bb as the prefix for backbone queries. This keeps the intent of a query clear: you are testing a property of a backbone, rather than writing a separate test for every atom in it.
Start with the question you want to answer
For composition-related searches, the inherited structuralGroup attributes provide counts for atoms and several elements. For example:
bb.nat < 1000checks for backbones with fewer than 1,000 atoms.bb.nC 10:20checks a range of carbon counts.bb.nO < 10checks for fewer than 10 oxygen atoms.bb.ncga 100:200checks a range of coarse-grained atom counts.
These attributes can help narrow a large structure to groups whose size or elemental composition is relevant to your next inspection. The same pattern applies to hydrogen, nitrogen, and sulfur counts, using nH, nN, and nS.
Use charge as a quick filter
If charge is the property you care about, the backbone attribute space includes both formal and partial charge. Formal charge uses fc and integer values; partial charge uses pc and floating-point values. Examples from the reference include bb.fc > 1, bb.fc 6:8, bb.pc > 1.5, and bb.pc 1.5:2.0.
Keeping the two attributes distinct matters: they represent different charge properties and use different value types. Choose the one that matches the question you are investigating, rather than treating the values as interchangeable.
Check names and display state
Backbone queries also inherit node attributes. The name attribute accepts quoted strings, with examples such as bb.n "A" and bb.n "L*". Visibility and selection can be checked with bb.v, not bb.v, bb.selected, and not bb.selected. These are handy when the problem is not molecular composition but locating a group in a busy scene or checking its current state.
There are also explicit flag attributes: bb.sf for the selection flag and bb.vf for the visibility flag. The reference shows that each can be queried with or without an explicit Boolean value, for example bb.sf false or bb.vf false. For basic visible/hidden or selected/not-selected checks, the visible and selected attributes may be easier to read.
A practical way to build a filter
Begin with one attribute that captures the main constraint: atom count, an element count, charge, name, or display state. Check that the results correspond to the kind of backbone you intended to find. Then refine the search with the relevant additional criteria using the query-building tools available in your workflow. This stepwise approach makes it easier to spot a mistaken attribute or an overly restrictive threshold than starting with a complicated expression.
The backbone reference is especially useful when you need to confirm the exact short name, expected value type, or syntax before writing a query. For the complete attribute list and examples, see the SAMSON backbone attributes documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
