Find the bond, not just the atom: practical bond filters in SAMSON

When inspecting a molecular structure, it is easy to focus on atoms and overlook the bonds connecting them. But many modeling questions are really bond questions: Where are the unusually long connections? Which bonds are double or aromatic? Did a structure contain bonds with a particular custom type? Searching by atom alone may not answer these questions clearly.

SAMSON’s Node Specification Language (NSL) lets you target bond nodes directly. Bond attributes use the bond attribute space, or its short form, b. That distinction matters: these expressions are intended to match bonds, not atoms.

Start with a specific question

Choose the attribute that describes the property you want to inspect:

  • Length (bond.length or b.len) is useful when you want to locate bonds within or beyond a distance range. For example, b.len > 1.2 A searches for bonds longer than 1.2 angstroms. A range such as b.len 0.12nm:0.17nm expresses the interval in nanometers.
  • Order (bond.order or b.o) lets you search by numeric bond order. For example, b.o >= 2 targets orders of at least 2, while b.o 1.5:3 specifies a range.
  • Type (bond.type or b.t) is for named categories such as single, double, triple, amide, aromatic, dummy, or undefined.
  • Custom type (bond.customType or b.ct) searches integer custom-type values, including a specific value or a range.

Use units deliberately

Bond lengths can be expressed in angstroms or nanometers. For example, b.len 1.2A:1.4A and b.len 0.15nm:2.1nm are both valid styles of query. Before comparing results or reusing a query, check that the units match the scale you intend. Writing the unit explicitly makes a length filter easier to review and less likely to be misread.

Know when to use type versus order

Bond order is numeric; bond type is categorical. They answer related but different questions. Use b.o when the numeric order is what matters, such as finding values at or above 2. Use b.t when you want a named bond category, such as aromatic or amide.

NSL accepts useful short forms for types: s or 1 for single, d or 2 for double, and t or 3 for triple. Other abbreviations include am for amide, ar for aromatic, du for dummy, and un for undefined. For instance, b.t s,d matches single and double bonds. A bond must have its type defined for a type-based query to match it, so an empty result does not necessarily mean the structure has no bonds—it may mean the relevant type information is absent.

A small troubleshooting routine

  1. Confirm that your query uses the bond attribute space: start with b. or write the full bond. name.
  2. Pick the right kind of property: length, numeric order, categorical type, or integer custom type.
  3. Check the value format. Lengths need units; custom types are integers; order values are floating-point numbers.
  4. If a type query returns no matches, check whether the bonds have defined types.
  5. Try a short, direct expression first, then adjust the threshold, range, or list of values to reflect the question you are investigating.

These distinctions help turn a vague task—“find the unusual connections”—into a query you can inspect and explain. For the complete bond 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.

Comments are closed.