Substructure Search with Wildcard Atom "*"

Q

How to use Wildcard Atom in a substructure search using "babel" commands?

✍: FYIcenter.com

A

You can use "*" in a SMARTS string as a wildcard atom to represent "ANY" atom in a substructure search using "babel" commands.

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

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

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

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

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

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

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

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

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

fyicenter$ obabel "-:c1cc(ccc1CC(C(=O)O)N)O" -o smiles -s O=*******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

 

Substructure Search with Wildcard Bond "~"

"babel -s ..." Command - Substructure Search

Substructure Search with Open Babel

⇑⇑ Open Babel Tutorials

2020-06-08, 189👍, 0💬