"obabel" vs. "babel" Open Babel Commands

This section provides a quick summary of differences between on Open Babel 'obabel' new command and 'babel' old command.

What Is "babel" Command? - "babel" was the command to invoke the Open Babel molecule data conversion tool used in old Open Babel releases.

"babel" command had been gradually replaced by the "babel" command in Open Babel 2.x releases. Newer releases are now support only the "obabel" command.

The new "obabel" command uses slightly different command line syntaxes than the old "babel" command. I you have used the "babel" command from older releases before, here is a summary of their differences taken from the "man babel" help text from Open Babel 2.3.1:

herong$ man babel

NAME
  babel, obabel -- a converter for chemistry and molecular modeling data files

SYNOPSIS
  babel, [-H help-options]
  babel, [OPTIONS] [-i input-type] infile [-o output-type] outfile

  obabel [-H help-options]
  obabel [OPTIONS] [-i input-type | -:"SMILES-string"] infile [-o output-type]
    -O outfile

DESCRIPTION
  babel, is a cross-platform program designed to interconvert between many file
  formats used in molecular modeling and computational chemistry and related areas.

  obabel and babel, are slightly different. The first is closer to the normal
  Unix convention for command line programs and more flexible when the user needs
  to specify parameter values on options. With babel this only works when the
  option is the last on the line; with obabel no such restriction applies. It
  further has a shortcut for entering SMILES strings, which can be used in place
  of an input file.

  Open Babel is also a complete programmers toolkit for developing chemistry
  software. For more information, se the Open Babel web pages
  <http://openbabel.org/>.

OPTIONS
  If only input and output files are given, Open Babel will guess the file type
  from the filename extension.

  -:"SMILES-string"
  Enter SMILES string and use it in place of an input file. The SMILES string
  should be enclosed in quotation marks. More than one can be used, and a
  molecule title can be included if enclosed in quotes.

  -a options
    Format-specific input options. See -H format-ID for options allowed by
    a particular format

  ....

As you can see, there are two primary differences on the "obabel" command comparing to the "babel" command:

Here is an example of "obabel" command with a SMILES string:

herong$ obabel -:c1ccccc1 -O out.svg

1 molecule converted

Note that you may need to put the "-:..." option inside double quotes to protect special characters used in the SMILES strings as shown in the following example:

herong$ obabel "-:c1cc(C=O)ccc1C(=O)O" -O out.svg

1 molecule converted

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"

 What Is "obabel" Command

 "obabel -i ..." - Input Data Format and Source

 "obabel -o ... -O" - Output Data Format and Destination

 "obabel -... --..." - Generic Conversion Options

 "obabel" Command Option Argument Syntax

 "obabel ... --gen2D" - Calculated 2D Coordinates

 "obabel ... -f # -l #" - Split Large Molecule File

 "obabel -h/-d" - Add/Remove Hydrogens in Molecule Data

 "obabel --append ..." - Calculate Molecule Properties

 "obabel -L formats" - List of File Formats Supported

 "obabel -a..." - Extra Options for Input Reading

 "obabel -x..." - Extra Options for Output Writing

"obabel" vs. "babel" Open Babel Commands

 Generating SVG Pictures with Open Babel

 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

 Resources and Tools

 Cheminformatics Related Terminologies

 References

 Full Version in PDF/EPUB