When working on large molecular systems, it’s often helpful to focus only on specific types of bonds—such as single, double, or aromatic bonds—especially when analyzing or modifying chemical structures. Whether you’re identifying functional groups or cleaning up imported models, being able to quickly isolate bonds of interest can significantly accelerate your workflow.
SAMSON’s Node Specification Language (NSL) includes a powerful tool for doing just that: the bond.type attribute. This seemingly simple option helps molecular modelers query models based on bond type with remarkable flexibility.
Why bond type filtering matters
Let’s say you are working on a ligand-protein complex and want to isolate all the aromatic bonds within the ligand. Or, you’re debugging a molecular import to locate undefined bonds that may have arisen due to incomplete data. Without a filtering mechanism, you’d be scrolling through possibly thousands of bonds manually.
The bond.type attribute allows you to automate this. It lets you match bonds by type keywords or their shorter synonyms. This means less error-prone manual selection and more accurate, reproducible queries.
Using the bond.type Attribute
The full syntax is:
|
1 |
bond.type typeName |
Or, more compactly,
|
1 |
b.t shortName |
Available types include:
- single bonds (short names:
s,1) - double bonds (short names:
d,2) - triple bonds (short names:
t,3) - amide bonds (
am) - aromatic bonds (
ar) - dummy bonds (
du) - undefined bonds (
un)
Examples in Action
b.t s– matches all single bondsb.t d,t– matches double and triple bondsb.t ar– matches aromatic bondsb.t du,un– helps find dummy or undefined bonds
This filtering helps in tasks such as structural diagnosis, modeling bond conversions, detecting specific bond classes in substructures, or even preparing datasets for further simulation steps.
Use Case: Cleaning Up Molecular Imports
It’s not uncommon when importing molecules from third-party databases that some bond types are undefined or incorrectly classified. These become problematic when running simulations or energy minimizations.
With NSL, you can run a simple query like:
|
1 |
b.t un |
to instantly highlight undefined bonds, allowing you to correct them quickly before proceeding.
Or, to extract only aromatic bonds for an electronic structure analysis, use:
|
1 |
b.t ar |
Learn More
The bond.type filtering feature is just one part of the NSL system in SAMSON. To explore more advanced usage and additional bond filters, check out the full documentation: https://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
