Avoiding Atom-Bond Confusion: A Quick Guide to Bond Types in NSL

When working on molecular models, distinguishing between different bond types is more than just a detail—it’s critical. Misclassifying a bond could result in incorrect simulations or incorrect property predictions, potentially skewing results and leading to confusion down the road. Fortunately, SAMSON’s Node Specification Language (NSL) provides a clear and compact way to filter and identify bonds based on their types. Here’s an overview to help molecular modelers make informed use of bond type queries in NSL.

Why bond types matter

In molecular modeling, bond types—such as single, double, or aromatic—are not just labels. They directly affect geometries, reactivity, and force field parameters. If you’re analyzing molecular interactions or preparing a system for quantum or classical simulations, ensuring that a dataset includes only the expected bond types is essential. NSL’s bond type filtering simplifies this dramatically.

Using bond.type in NSL

The bond.type attribute (shorthand: b.t) allows you to query models for bonds of specific types. Here are the available types you can filter with:

Type Short name(s) Description
single s, 1 Single covalent bond
double d, 2 Double covalent bond
triple t, 3 Triple covalent bond
amide am Amide bond (common in peptides)
aromatic ar Bond with aromatic character
dummy du Placeholder or dummy bond
undefined un Bond type not defined

Examples: practical queries

NSL makes it possible to filter molecular data using short and intuitive expressions. Here are a few:

  • b.t s — Matches only single bonds
  • b.t d — Matches only double bonds
  • b.t s,d — Matches both single and double bonds
  • b.t du,un — Matches dummy and undefined bonds, helpful for cleaning up models

These queries are very fast to evaluate and can be combined with other filters such as bond length (b.len) or bond order (b.o) to isolate very specific parts of a molecular system.

When should you use this?

If you’re about to:

  • Export molecular data for simulation
  • Check the consistency of imported structures
  • Prepare datasets for AI/ML modeling
  • Build structure-based queries or custom analyses

— then filtering by bond type using NSL can help ensure you’re working only with the correct subset of your model.

Note: for filtering to work, bond types must be defined. Imported systems sometimes lack this information or use non-standard bond naming. Be sure to check this if filters aren’t working as expected.

To learn more about this and related bond attributes, visit the full documentation page: https://documentation.samson-connect.net/users/latest/nsl/bond/.

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

Comments are closed.