Finding the Right Bonds: A Quick Guide to Filtering by Type in SAMSON’s NSL

One of the most common tasks in molecular modeling is to locate specific bonds in a complex structure. Whether you’re analyzing aromatic systems, checking for improper bond assignments, or simply trying to select only the double bonds in a structure, this seemingly straightforward task can quickly become tedious without the right tools.

If you’re using SAMSON, you might already know about the Node Specification Language (NSL), a powerful way to search and filter nodes (e.g., atoms, bonds, molecules) based on attributes. But did you know that you can filter for bond types directly using NSL?

Why Filtering by Bond Type Matters

When inspecting molecular structures or preparing them for simulations, researchers often want to:

  • Find all aromatic or amide bonds to validate chemical perception
  • Select single or double bonds for targeted operations or visualizations
  • Identify dummy or undefined bonds that may require correction

NSL lets you do this quickly and with precision, reducing the need for manual guesswork.

Using bond.type in NSL

The bond.type attribute (short name: b.t) in NSL allows you to match bonds based on their chemical type. Here’s how it works:

Supported Bond Types

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

Usage Examples

Here are some practical NSL queries you can use:

  • b.t s – Selects all single bonds
  • b.t d – Selects all double bonds
  • b.t s,d – Selects both single and double bonds
  • b.t ar – Selects all aromatic bonds
  • b.t du,un – Selects all dummy or undefined bonds

These queries work whether you’re scripting or using SAMSON’s graphical search interface. Make sure that the bond type attribute is defined in the structure for these filters to apply accurately.

Tips for Effective Filtering

  • If your structure was imported from a general format (like PDB), consider running chemical perception tools to assign proper bond types.
  • Use comma-separated short names for quick multi-type selection: b.t s,am,ar selects single, amide, and aromatic bonds at once.
  • Combine bond type filtering with other attributes (like length or order) for advanced selection logic.

When Things Don’t Work as Expected

If bonds are not matching your filters, review whether bond types have actually been assigned. In some imported structures, this information may be missing or incorrect. SAMSON offers tools and extensions to automatically perceive and correct bonding.

Bond Type Table

Efficient data filtering helps streamline your workflow, whether you’re preparing systems for simulation, analyzing interactions, or identifying inconsistencies. The bond type attribute is one of the most actionable filters in NSL.

To learn more about bond attributes in NSL, visit the official documentation: https://documentation.samson-connect.net/users/latest/nsl/bond/

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

Comments are closed.