When inspecting a molecular model, it is easy to focus on atoms and overlook the bonds connecting them. But a selection that includes the wrong bond types—or misses bonds because their lengths fall outside an assumed range—can make a structural check confusing. SAMSON’s Node Specification Language (NSL) provides bond-specific filters so you can narrow a search by bond type, order, length, or custom type.
Bond queries use the bond attribute space, abbreviated b. These attributes match bond nodes, not atoms. That distinction is useful when your question is about connectivity itself: for example, whether a model contains aromatic bonds, or which bonds fall within a chosen length interval.
Start with the question you need to answer
For a quick check of bond categories, filter by type. The full form bond.type single can be shortened to b.t s. To include both single and double bonds, use b.t s,d. Other supported values include t for triple, am for amide, ar for aromatic, du for dummy, and un for undefined bonds. You can also use 1, 2, and 3 as alternatives for single, double, and triple.
This is particularly helpful when a broad selection contains several kinds of connections and you want to inspect just one category. Keep in mind that the bond type must be defined for a bond to match a type query. If a query does not return a bond you expected, that requirement is worth checking before concluding that the bond is absent.
Use length ranges to make geometry checks concrete
If you are investigating bond geometry, filter by length rather than relying on a visual impression in the model. For instance, b.len >= 1.5A selects bonds at least 1.5 angstroms long. To focus on a band of values, use a range such as b.len 1.2A:1.4A. The documentation also shows that nanometers can be used: b.len 0.15nm:2.1nm.
Units matter when interpreting a query. Angstroms and nanometers describe the same kind of measurement but use different scales, so include the unit that makes your intended range clearest. A range is also often easier to review than a single cutoff: it tells you both what values you are looking for and where the interval ends.
Separate bond order from bond type
Bond order is a floating-point attribute, queried with b.o. For example, b.o >= 2 selects bonds with order at least 2, while b.o 1.5:3 selects values from 1.5 to 3. Bond type and bond order are related ways to describe a bond, but NSL exposes them as separate attributes. Use the one that matches the question: a named category such as aromatic is a type query; a numeric threshold or interval is an order query.
When a bond has a custom type
Some bonds may be distinguished by a custom type value. The attribute is bond.customType, shortened to b.ct, and takes integer values. You can request one value with b.ct 0, several values with b.ct 1, 2, or a range with b.ct 0:2. This gives you a way to filter bonds by their custom-type identifiers when those values are relevant to your model.
A simple way to build a useful query
- Decide whether you are looking for a bond category, a numeric property, or a custom identifier.
- Choose the corresponding attribute:
b.t,b.len,b.o, orb.ct. - Use a short name for compact expressions, or the full attribute name when readability matters.
- For numeric searches, state a clear cutoff or range and include length units when filtering by length.
- If a type-based search misses an expected bond, remember that the bond type must be defined.
These small choices make bond selections easier to interpret and repeat, especially when you are checking a particular class of connections rather than browsing an entire structure. For the complete attribute reference and additional examples, see the SAMSON bond NSL documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
