Install Open Babel from Source Code

This section provides a tutorial example on how to install Open Babel from source code. But there are multiple required libraries are missing on CentOS 8 Computers for Open Babel 3.1.1.

If for some reason, you can not install Open Babel in an Anaconda (or Conda) environment, an you can not install it from binary packages for you computer platform, your last option is to install it from source code as shown in this tutorial.

1. Go to Open Babel Code Repository at https://github.com/openbabel/openbabel/releases. Don't go to the Open Babel site at sourceforge.net. It does not have newer versions.

2. Click "Source code (tar.gz)" under the "Open Babel 3.1.1" release to download penbabel-openbabel-3-1-1.tar.gz.

3. Unzip and untar the download file. You should see a directory ./openbabel-openbabel-3-1-1/ with all source code.

4. Create a "build" sub-directory and configure the build system.

herong$ cd openbabel-openbabel-3-1-1/

herong$ mkdir build
herong$ cd build

herong$ cmake ..
  CMake Error: CMake was unable to find a build program corresponding to
  "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.
  You probably need to select a different build tool.
  CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
  CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
  -- Configuring incomplete, errors occurred!

5. Looks like the "make" and "gcc" tools are missing.

herong$ sudo dnf install make
  Installed: make-1:4.2.1-10.el8.x86_64

herong$ sudo dnf install gcc
  Installed: cpp-8.4.1-1.el8.x86_64, gcc-8.4.1-1.el8.x86_64, ...

herong$ sudo dnf install gcc-c++
  Installed: gcc-c++-8.4.1-1.el8.x86_64, ...

herong$ cmake ..
...
Could NOT find Eigen3 (missing: EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK)...
Could NOT find Eigen2 (missing: EIGEN2_INCLUDE_DIR EIGEN2_VERSION_OK)...
Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)

6. Looks like some libraries are missing.

herong$ sudo dnf install dnf-plugins-core

herong$ sudo dnf -y install \
  https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

herong$ sudo dnf config-manager --set-enabled PowerTools

herong$ sudo dnf install eigen3-devel
  Installed: eigen3-devel-3.3.4-6.el8.noarch

herong$ sudo dnf install zlib-devel
  Instealled: zlib-devel-1.2.11-17.el8.x86_64

herong$ cmake ..
...
Failed getting or unpacking Coordgen 'master'.

Looks like there are more issues in preparing the build process. So I stopped here for now. My older version, Open Babel 2.4.1 is still working. I will continue to use it.

Table of Contents

 About This Book

 SMILES (Simplified Molecular-Input Line-Entry System)

Open Babel: The Open Source Chemistry Toolbox

 What Is Open Babel

 Install Open Babel with Anaconda

 Install Open Babel on Windows Computers

 Run Open Babel GUI on Windows Computers

 Change Display Command on Open Babel GUI

 Open Babel Installation Options on Linux

 Install Open Babel Binary Package on CentOS

 "Open Babel Error in LoadAllPlugins" Error

Install Open Babel from Source Code

 Install Open Babel 2.4.1 from Source Code

 Open Babel Installation Options on macOS

 Install Open Babel Binary Package on macOS

 Using Open Babel Command: "obabel"

 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