A molecular structure can look plausible at a glance and still contain a bond that deserves a closer check. Perhaps one bond appears unusually long, its order is unexpected, or you need to isolate a particular bond type in a large model. Searching bond attributes in SAMSON’s Node Specification Language (NSL) can help turn those questions into focused selections.
The key idea is to choose the attribute that matches the question. Bond attributes live in the bond space, whose short name is b. These attributes match bond nodes, not atoms or other kinds of nodes. You can write an attribute with its full name, such as bond.length, or use a short form such as b.len.
Start with the problem you are investigating
Is the bond longer than expected? Use the length attribute. For example, b.len >= 1.5A selects bonds with lengths at or above 1.5 angstroms. If you want to inspect a band rather than a single cutoff, specify a range: b.len 1.2A:1.4A. Lengths can also be expressed in nanometers, as in b.len 0.15nm:2.1nm. Keeping the unit in the expression makes the intended scale easier to read and reduces the chance of mistaking nanometers for angstroms.
Are you checking bond order? Bond order accepts floating-point values, so it is not limited to whole numbers. To look for orders from 1.5 to 3, use b.o 1.5:3; to select orders greater than or equal to 2, use b.o >= 2. This is useful when the question concerns the stored bond order rather than the bond’s named type.
Do you need a particular named type? Use b.t. The shorthand b.t s means single bonds, and b.t s,d means single or double bonds. Other supported values include t for triple, am for amide, ar for aromatic, du for dummy, and un for undefined. You can also use the longer names, such as bond.type aromatic. A useful detail: a bond needs to have its bond type defined for this attribute to be useful in a search.
Are you tracking an application-specific bond category? The customType attribute, shortened to b.ct, accepts integers. For example, b.ct 0 selects custom type 0, while b.ct 0:2 selects values in the documented range from 0 to 2.
A small, repeatable inspection workflow
- State the question precisely. Decide whether you are investigating length, order, named type, or custom type. These attributes describe different properties, so a length query is not a substitute for a type query.
- Use a clear cutoff or range. For a length check, include a unit such as
Aornm. For an order check, use a numeric value or range. - Keep the expression readable. Short forms are convenient for repeated use; full names can be easier to interpret when sharing a query with someone else.
- Review what the selected attribute actually means. A match on
b.t arconcerns the bond’s type, while a match onb.oconcerns its numerical order. If a result is unexpected, confirm that you chose the attribute relevant to your question.
These filters help narrow attention to bonds matching a stated property; they do not, by themselves, determine whether a bond is chemically correct. Treat a query as a way to find candidates for inspection, then interpret those candidates in the context of the molecule and your modeling task.
For the complete list of bond attributes and additional examples, see the SAMSON bond NSL reference.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
