Cheminformatics Tutorials - Herong's Tutorial Examples - v2.01, by Herong Yang
"obabel ... -o svg -xd" - Hide Molecule Name
This section provides a tutorial example on how to hide molecule names in SVG output pictures with '-xd' option using Open Babel.
By default, Open Babel will display the molecule name in SVG output format, if the input data contain one. If multiple molecules are included in a sing SVG output, displaying their names helps to identify different molecules.
But there is only one molecule in the SVG output, you may want to hide the molecule name by using the "-xd" option.
For example, the following molecule SDF input file contains the molecule name, "Tyrosine", in the first line:
Tyrosine OpenBabel09202120492D 13 13 0 0 1 0 0 0 0 0999 V2000 0.8660 -0.5000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 0.8660 -1.5000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 -2.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 -0.8660 -1.5000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 -0.8660 -0.5000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 -0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 -0.0000 1.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 0.8660 1.5000 0.0000 C 0 0 3 0 0 0 0 0 0 0 0 0 1.7321 1.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 1.7321 0.0000 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 2.5981 1.5000 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 0.8660 2.5000 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 -3.0000 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 1 6 2 0 0 0 0 1 2 1 0 0 0 0 2 3 2 0 0 0 0 3 4 1 0 0 0 0 3 13 1 0 0 0 0 4 5 2 0 0 0 0 5 6 1 0 0 0 0 6 7 1 0 0 0 0 7 8 1 0 0 0 0 8 9 1 0 0 0 0 8 12 1 0 0 0 0 9 10 2 0 0 0 0 9 11 1 0 0 0 0 M END $$$$
You can run the following commands and view those two resulting SVG pictures to see the impact of the "-xd" option.
herong$ obabel tyrosine.sdf -O tyrosine-with-name.svg herong$ obabel tyrosine.sdf -O tyrosine-without-name.svg
Table of Contents
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
"obabel -o svg" - Molecule Picture in SVG
"obabel -:... -o svg" - Generate SVG from SMILES
"obabel ... -o svg -xi" - Show Atom Indices in SVG
"obabel ... -o svg -xS" - Ball/Stick Depiction in SVG
"obabel ... -o svg -xX" - Hide Implicit H in SVG
"obabel ... -o svg -xC" - Hide Terminal C in SVG
"obabel ... -o svg -xP300" - Control Image Size
"obabel ... -o svg" - Two "svg" XML Tag Levels
►"obabel ... -o svg -xd" - Hide Molecule Name
"babel ... -o svg -xd -xP300" - Open Babel 2.4 Bug
Scale SVG Images using "viewBox" Attribute
Substructure Search with Open Babel
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