When a molecular model contains many structural groups, finding the backbone you care about can take more than a visual scan. You may want to narrow the view to groups with a certain atom count, inspect groups with a particular charge, or locate backbones with a specific name. SAMSON’s Node Specification Language (NSL) lets you express these criteria as queries instead of relying on manual selection.
This guide focuses on a useful subset of the backbone attribute space: inherited attributes for atom counts and charge, plus a few node attributes for identifying and checking backbone nodes. The examples use bb, the prefix shown for backbone queries in the reference.
Start with the question, not the abbreviation
NSL attributes have full names and, in many cases, short names. For example, numberOfAtoms has the short name nat, and partialCharge has the short name pc. The short form makes a query quicker to type, while the full name can be easier to recognize when you return to it later.
For example, to look for backbone nodes with fewer than 1,000 atoms, use:
bb.nat < 1000
To specify an atom-count range, the reference gives this form:
bb.nat 100:200
The range notation is also shown for elemental counts. For example, bb.nC 10:20 refers to a range for the number of carbons, while bb.nO < 10 sets an upper bound on the number of oxygens.
Use composition counts to narrow the search
Backbone nodes inherit several composition-related attributes from the structuralGroup attribute space. Available counts include atoms, carbons, hydrogens, nitrogens, oxygens, sulfurs, and coarse-grained atoms. Their short names are nat, nC, nH, nN, nO, nS, and ncga.
These counts help turn a vague search into a specific one. If you are checking groups with a limited number of nitrogen atoms, for instance, bb.nN < 10 expresses that criterion. If you need to inspect a range of coarse-grained atom counts, the documented example is bb.ncga 100:200.
Each query is a way to identify candidates; it does not explain why a group has that composition. Treat the result as a focused starting point for inspection, rather than as a conclusion about a molecule’s function or quality.
Keep formal and partial charge distinct
Charge-related searches can be useful, but formal charge and partial charge are separate attributes. formalCharge uses the short name fc and accepts integers. For example, bb.fc > 1 searches using a threshold, while bb.fc 6:8 uses a range.
partialCharge, abbreviated pc, uses floating-point values. The reference shows bb.pc > 1.5 and bb.pc 1.5:2.0 as examples. Keeping the two attributes straight avoids comparing an integer formal-charge criterion with a partial-charge value by accident.
Check identity and display state separately
Backbone nodes also inherit general node attributes. The name attribute can match quoted strings; documented examples include bb.n "A" and bb.n "L*". Visibility and selection are different checks: bb.v tests visibility, while bb.selected tests selection. Their negated forms, such as not bb.v, are also shown in the reference.
One easy-to-miss detail: the backbone attribute space has the short name s, but the inherited selected attribute has no short name in this space. Use the explicit form bb.selected rather than assuming that every attribute can be shortened.
A small, repeatable workflow
-
Decide what you need to narrow by: identity, composition, charge, or display state.
-
Choose the corresponding attribute, using its full name or documented short name.
-
Start with one clear comparison or range, such as
bb.nat < 1000orbb.pc 1.5:2.0. -
Review the matching nodes in context before drawing conclusions from the filter.
This approach keeps a search understandable and makes it easier to adjust one criterion at a time. For the complete list of backbone attributes and their documented forms, see the SAMSON backbone NSL reference.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
