One common challenge faced by molecular modelers is isolating meaningful subsets of bonds in complex structures. Whether you’re designing a molecule, analyzing structural motifs, or customizing visualizations, you often need to select specific bond types without manually clicking through thousands of atoms.
That’s exactly where the bond type selector in SAMSON’s Node Specification Language (NSL) can save time and effort. This simple yet powerful system helps you filter bonds based on their chemical type—single, double, triple, aromatic, and more—using an intuitive query language.
Why Filter by Bond Type?
Visual clarity and analysis precision often depend on being able to select and highlight specific types of bonds. For example:
- Focusing on aromatic bonds in rings to study delocalization
- Tracking amide bonds in peptides
- Selecting all double or triple bonds to examine areas of higher reactivity
With NSL, selection becomes a one-line command rather than a manual process. Let’s look at how this works.
Selecting Bonds by Type
Each bond in SAMSON has a type attribute, accessible via the short syntax b.t. It can take on several values based on chemical meaning:
| Bond Type | Short Codes | Description |
|---|---|---|
| single | s, 1 | Single covalent bond |
| double | d, 2 | Double bond |
| triple | t, 3 | Triple bond |
| amide | am | Amide bond |
| aromatic | ar | Aromatic bond |
| dummy | du | Placeholder (non-chemical) bond |
| undefined | un | Bonds without a defined type |
Example: To select all single bonds, simply type:
|
1 |
b.t s |
If you want to select both single and double bonds:
|
1 |
b.t s,d |
Need to isolate dummy or undefined bonds, perhaps to identify structural placeholders in your model?
|
1 |
b.t du,un |
As long as bond types have been defined in your system, these expressions will match exactly what you expect.
Tips for Usage
- Combine with other selection filters (like
bond.lengthorbond.order) to make complex queries such as selecting all short aromatic bonds. - Use shorthand syntax (
b.t) to keep queries readable, especially in scripts. - Test your selection visually by applying the filter in the Visual Model panel and checking the highlighted structures.
This quick filtering approach is especially helpful when working with large biological molecules (e.g., filtering all amide bonds in a protein backbone), cleaning up imported geometries, or scripting automated analyses.
To learn more about selecting bonds by type and other powerful features of NSL, visit 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.
