Get Precise: Filtering Bonds by Type for Smarter Molecular Queries

When working with complex molecular systems, being able to select and analyze specific types of chemical bonds can save researchers countless hours. Whether you’re visualizing molecular interactions, preparing simulations, or studying structural patterns, you often need to isolate certain bonds, like double bonds or amide bonds, from the many types present in biomolecules and materials.

Fortunately, the Node Specification Language (NSL) in SAMSON allows you to do just this—with precision and efficiency. In this post, we’ll take a closer look at how to use the bond.type attribute to filter bonds by type, and share examples you can apply directly in your work.

Why filter by bond type?

Bond type defines the chemical nature of the connection between atoms: is it a single, double, triple, or aromatic bond? In simulations or structural analysis, you might need to:

  • Exclude or include aromatic bonds in aromatic ring detection
  • Identify all amide bonds in peptide chains
  • Trace dummy bonds added for topological purposes

Manually combing through datasets or visually inspecting bonds can be slow and error-prone. NSL expressions, like b.t s, make this process automatic, reproducible, and exact.

Bond types and how to query them

The bond.type NSL attribute (abbreviated b.t) supports several predefined categories. Here’s a quick overview:

Bond Type Short Names Description
single s, 1 Single covalent bond
double d, 2 Double covalent bond
triple t, 3 Triple covalent bond
amide am Peptide/amide bonds
aromatic ar Part of aromatic systems
dummy du Placeholder bonds with no chemical meaning
undefined un Undefined or unresolved bond types

Example queries

Use these queries directly in SAMSON’s selection field or scripts to focus on specific bonds:

  • b.t s: Select all single bonds
  • b.t s,d: Select single and double bonds
  • b.t ar: Isolate aromatic bonds (useful in ring current calculations)
  • b.t am: Select all amide bonds (connects amino acids in proteins)
  • b.t du,un: Spot dummy or undefined bonds in imported structures or force fields

These compact expressions help you explore or validate molecular structures quickly—especially when bondedness influences force field parameters, constraints, or visualization rules.

Best practices

  • Make sure that bonds in your model have clearly assigned types—the NSL only works on defined attributes.
  • Combine bond queries with atom queries for more complex selections (e.g., all single bonds between Carbon and Hydrogen atoms).

Using b.t filters can lead to faster insights and cleaner models—whether you’re debugging a force field or building a molecular feature for machine learning.

To learn more about the available NSL bond attributes, visit the original documentation page: documentation.samson-connect.net/users/latest/nsl/bond/.

SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.

Comments are closed.