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, 708🔥, 0💬
Popular Posts:
Molecule Summary: ID: FYI-1002097 Names: InChIKey: FZERHIULMFGESH-UHFFFAOYS A-NSMILES: CC(=O)Nc1cccc...
What Is Embedded 3Dmol Viewer? Embedded 3Dmol Viewer is a built-in 3Dmol viewer in the 3Dmol.js libr...
Molecule Summary: ID: FYI-1001099 SMILES: Received at FYIcenter.com on: 2021-12-26
What are the differences between "babel" and "obabel" commands? "babel" and "obabel" commands are tw...
Molecule Summary: ID: FYI-1000968 SMILES: O=C1CSC(=S)N1CCCN1CCCCC1 Received at FYIcenter.com on: 202...