A crowded molecular structure can make bond-level troubleshooting feel like searching for a needle in a molecular haystack. Maybe you want to inspect unusually long connections, check whether a bond has the expected order, or locate bonds carrying a particular type. In SAMSON, the Node Specification Language (NSL) lets you describe these targets with bond attributes, then use the resulting matches to focus your inspection.
The key idea is to start with the question you are trying to answer. Bond length, order, type, and custom type are different properties, so a useful search depends on which one is relevant. Bond attributes belong to the bond attribute space, abbreviated b, and match bond nodes only.
Start with a measurable property
If geometry is your concern, search by length. For example, b.len >= 1.5A matches bonds with lengths at or above 1.5 angstroms. To focus on a band of values instead, use a range: b.len 1.2A:1.4A. This can help you gather a manageable set of bonds for visual review rather than inspecting every connection individually.
Units matter when comparing structures or writing searches. NSL accepts length values in angstroms and nanometers, so the documented range b.len 0.15nm:2.1nm is another way to express a length interval. Keep the units visible in your query: doing so makes the intended scale easier to check and reduces the chance of confusing a value in nanometers with one in angstroms.
Use order when length is not the question
A bond’s order is a separate attribute from its length. Use b.o >= 2 to match bonds with order greater than or equal to 2, or b.o 1.5:3 to search an order range. Order values are floating-point numbers, so ranges can be useful when you do not want to limit a search to one exact value.
Keeping these searches distinct is helpful during diagnosis: a long bond and a high-order bond are not interchangeable categories. First search the attribute that corresponds to your concern, then inspect the matching bonds in context. A query identifies candidates; it does not, on its own, explain why a bond has that value.
Choose readable type names—or compact aliases
For named bond categories, use b.t. The type values include single, double, triple, amide, aromatic, dummy, and undefined. Short forms can make repeated searches quicker: for example, b.t s matches single bonds, while b.t s,d matches single and double bonds. Numeric alternatives are also available for single, double, and triple bonds: 1, 2, and 3.
One important detail: a bond must have its bond type defined for a type query to be useful. If you are checking for undefined bonds, the documented query is b.t un; “undefined” is itself one of the available type values.
Keep custom types separate
The b.ct attribute searches integer custom-type values. For example, b.ct 0 selects custom type 0, and b.ct 0:2 selects the documented range from 0 to 2. Because these are custom values, use them when you know which identifier you want to find; do not assume that a custom-type number means the same thing as a standard bond type such as single or aromatic.
A practical sequence is to state the question in plain language, choose the matching attribute, write the shortest clear query, and then review the matches in the molecular context. For instance: “Are any bonds at least 1.5 angstroms long?” becomes b.len >= 1.5A. “Which bonds are single or double?” becomes b.t s,d. Clear queries make it easier to repeat an inspection and understand what each result represents.
For the complete attribute reference and additional examples, see the SAMSON bond attributes documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
