A Simple Way to Find Specific Bonds in Your Models

When working with molecular models, one of the frequent challenges is filtering specific types of bonds based on characteristics like bond type, bond order, or length. Whether you are refining a model, analyzing molecular features, or generating inputs for simulations, being able to target only the relevant bonds saves time and reduces errors.

If you’re using SAMSON, the NSL lets you do this effectively through simple, readable expressions. In this post, we’ll focus on how to use the bond.type NSL attribute to quickly select bonds of interest in your molecular models.

Why Bond Types Matter

Bond types (single, double, triple, aromatic, etc.) encode essential chemical information. For example:

  • If you’re visualizing a conjugated system, you may want to isolate only aromatic bonds.
  • To spot potential tautomeric transformations, you may want to look at single and double bonds.
  • To debug issues in imported files (e.g., missing or undefined bonds), you might target dummy or undefined bonds.

How to Use bond.type

In the NSL, specifying a bond type filter looks like this:

  • bond.type single – matches single bonds only
  • bond.type single, double – matches both single and double bonds
  • bond.type aromatic – matches just aromatic bonds
  • b.t du,un – short form, matches dummy and undefined bonds

You can use either the full names like single, double, or the short names like s, d, and so on. Here’s a quick reference you can copy:

Type Keywords (NSL) Meaning
Single single, s, 1 Single bond
Double double, d, 2 Double bond
Triple triple, t, 3 Triple bond
Amide amide, am Amide bond
Aromatic aromatic, ar Aromatic bond
Dummy dummy, du Dummy (placeholder) bond
Undefined undefined, un Undefined bond

Example: Let’s say you’re analyzing a molecule and want to isolate undefined bonds for debugging. Enter this filter in the NSL search bar:

This will list all bonds without a defined type. Similarly, use:

to focus on both single and double bonds (e.g., for basic bonding structure analysis).

Note: For the type filter to work, the bonds in your model must have defined bond types. If you import a structure that lacks this information, consider using tools or file formats that preserve it during import.

This filter can be combined with others (like bond.length or bond.order) when you need more complex selections.

You can learn more about the bond.type attribute in the official documentation or explore additional bond attributes for even finer control.

Read the full NSL bond attributes documentation to learn more.

SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON here.

Comments are closed.