Collections:
"babel -s ..." Command - Substructure Search
How to use "babel -s ..." command to do substructure search?
✍: FYIcenter.com
You can do substructure search using the "-s ..." option of the "babel" command with the following syntax:
babel input_section output_section -s smarts_string
The smarts_string specifies a SMARTS string that represents a molecule pattern. "babel" command will apply this pattern to each molecule in the input data source. If the the pattern matches a substructure of the molecule, it will be written to the output. Otherwise, it will be skipped.
Substructure search is also called substructure filtering or substructure matching.
Here are some examples of substructure matching with a single atom as the molecule pattern:
fyicenter$ # methane molecule contains an aliphatic carbon fyicenter$ obabel -:C -o smiles -s C C 1 molecule converted fyicenter$ # methane molecule contains no aromatic carbon fyicenter$ obabel -:C -o smiles -s c 0 molecules converted fyicenter$ # benzene molecule contains an aromatic carbon fyicenter$ obabel -:c1ccccc1 -o smiles -s c c1ccccc1 1 molecule converted fyicenter$ # benzene molecule contains no aliphatic carbon fyicenter$ obabel -:c1ccccc1 -o smiles -s C 0 molecules converted
Here is another group of examples of substructure matching with a single bond as the molecule pattern:
fyicenter$ # tyrosine molecule contains a two-aromatic-carbon bond fyicenter$ obabel "-:c1cc(ccc1CC(C(=O)O)N)O" -o smiles -s cc c1cc(ccc1CC(C(=O)O)N)O 1 molecule converted fyicenter$ # tyrosine molecule contains an aromatic-carbon-aliphatic-carbon bond fyicenter$ obabel "-:c1cc(ccc1CC(C(=O)O)N)O" -o smiles -s cC c1cc(ccc1CC(C(=O)O)N)O 1 molecule converted fyicenter$ # tyrosine molecule contains no aromatic-carbon-nitrogen bond fyicenter$ obabel "-:c1cc(ccc1CC(C(=O)O)N)O" -o smiles -s cN 0 molecules converted fyicenter$ # tyrosine molecule contains an aliphatic-carbon-nitrogen bond fyicenter$ obabel "-:c1cc(ccc1CC(C(=O)O)N)O" -o smiles -s CN 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:
⇒ Substructure Search with Wildcard Atom "*"
⇐ Substructure Search with Open Babel
2020-06-08, 778🔥, 0💬
Popular Posts:
How to Download and Install the latest version of JSME? You can follow this tutorial to download and...
Molecule Summary: ID: FYI-1001809 SMILES: C1=CC(=C(C=C1O)F)N Received at FYIcenter.com on: 2022-12-1...
Molecule Summary: ID: FYI-1001892 SMILES: CCCCCCCCCCCCCC(=O)NC(C(= O)NC(CO)C(=O)NC(C(=O)NC( C(C)O)C(=O...
Molecule Summary: ID: FYI-1003303 Names: InChIKey: DUGYELCWRLJBQS-UHFFFAOYS A-NSMILES: COc3cccc(c2nc...
What Is "babel" Command? How to get command line help for Open Babel? "babel" Command is the command...