Substructure Search with Wildcard Bond "~"

This section provides a tutorial example on how to use '~' to represent a wildcard bond in SMARTS string to do substructure search using 'obabel ... -s ...' command with Open Babel.

You can use "~" in a SMARTS string as a wildcard bond to represent "ANY" bond in a substructure search using "obabel" commands with Open Babel.

Here are some examples of substructure matching with a wildcard bond "~" in the molecule pattern:

herong$ obabel "-:c1cc(ccc1CC(C(=O)O)N)O" -o smiles -s O-C
c1cc(ccc1CC(C(=O)O)N)O
1 molecule converted

herong$ obabel "-:c1cc(ccc1CC(C(=O)O)N)O" -o smiles -s O=C
c1cc(ccc1CC(C(=O)O)N)O
1 molecule converted

herong$ obabel "-:c1cc(ccc1CC(C(=O)O)N)O" -o smiles -s O#C
0 molecules converted

herong$ obabel "-:c1cc(ccc1CC(C(=O)O)N)O" -o smiles -s O~C
c1cc(ccc1CC(C(=O)O)N)O
1 molecule converted

herong$ obabel "-:c1cc(ccc1CC(C(=O)O)N)O" -o smiles -s O~C~C
c1cc(ccc1CC(C(=O)O)N)O
1 molecule converted

herong$ obabel "-:c1cc(ccc1CC(C(=O)O)N)O" -o smiles -s O~C~C~C
c1cc(ccc1CC(C(=O)O)N)O
1 molecule converted

herong$ obabel "-:c1cc(ccc1CC(C(=O)O)N)O" -o smiles -s O~C~C~C~c
c1cc(ccc1CC(C(=O)O)N)O
1 molecule converted

herong$ obabel "-:c1cc(ccc1CC(C(=O)O)N)O" -o smiles -s O~C~C~C~c~c
c1cc(ccc1CC(C(=O)O)N)O
1 molecule converted

herong$ obabel "-:c1cc(ccc1CC(C(=O)O)N)O" -o smiles -s O~C~C~C~c~c~c
c1cc(ccc1CC(C(=O)O)N)O
1 molecule converted

herong$ obabel "-:c1cc(ccc1CC(C(=O)O)N)O" -o smiles -s O~C~C~C~c~c~c~c
c1cc(ccc1CC(C(=O)O)N)O
1 molecule converted

herong$ obabel "-:c1cc(ccc1CC(C(=O)O)N)O" -o smiles -s O~C~C~C~c~c~c~c~O
c1cc(ccc1CC(C(=O)O)N)O
1 molecule converted

You can validate the above matching result by looking at the tyrosine molecule structure below:

Open Babel SVG Picture - Tyrosine Molecule
Open Babel SVG Picture - Tyrosine Molecule

Table of Contents

 About This Book

 SMILES (Simplified Molecular-Input Line-Entry System)

 Open Babel: The Open Source Chemistry Toolbox

 Using Open Babel Command: "obabel"

 Generating SVG Pictures with Open Babel

Substructure Search with Open Babel

 "obabel -s ..." Command - Substructure Search

 Substructure Search with Wildcard Atom "*"

Substructure Search with Wildcard Bond "~"

 Substructure Search with SMARTS Expressions

 Similarity Search with Open Babel

 Fingerprint Index for Fastsearch with Open Babel

 Stereochemistry with Open Babel

 Command Line Tools Provided by Open Babel

 RDKit: Open-Source Cheminformatics Software

 rdkit.Chem.rdchem - The Core Module

 rdkit.Chem.rdmolfiles - Molecular File Module

 rdkit.Chem.rdDepictor - Compute 2D Coordinates

 rdkit.Chem.Draw - Handle Molecule Images

 Molecule Substructure Search with RDKit

 rdkit.Chem.rdmolops - Molecule Operations

 Daylight Fingerprint Generator in RDKit

 Morgan Fingerprint Generator in RDKit

 RDKit Performance on Substructure Search

 Introduction to Molecular Fingerprints

 OCSR (Optical Chemical Structure Recognition)

 AlphaFold - Protein Structure Prediction

 Resources and Tools

 Cheminformatics Related Terminologies

 References

 Full Version in PDF/EPUB