Güngör Budak's Blog

Bioinformatics, web programming, coding in general

Install RDKit 2015-03 Build on Ubuntu 14.04 / Linux Mint 17

RDKit is an open source toolkit for cheminformatics. It has many functionalities to work with chemical files.

RDKit Logo

Follow the below guide to install RDKit 2015-03 build on an Ubuntu 14.04 / Linux Mint 17 computer. Since Ubuntu packages don’t have the latest RDKit for trusty, you have to build RDKit from its source.

Install Dependencies

sudo apt-get install flex bison build-essential python-numpy cmake python-dev sqlite3 libsqlite3-dev libboost1.54-all-dev

Download the Build

cd /usr/local
sudo wget http://sourceforge.net/projects/rdkit/files/rdkit/Q1_2015/RDKit_2015_03_1.tgz
sudo tar -xzf RDKit_2015_03_1.tgz
sudo mv rdkit-Release_2015_03_1/ rdkit
cd rdkit/
sudo mkdir build

Set Environment Variables

vim ~/.bashrc
# Enter following three lines at the end of .bashrc
export RDBASE="/usr/local/rdkit"
export PYTHONPATH="$RDBASE:$PYTHONPATH"
export LD_LIBRARY_PATH="$RDBASE/lib"
source ~/.bashrc

Download InChi API (Optional, remove the arg in the next step if you skip)

cd $RDBASE/External/INCHI-API
sudo bash download-inchi.sh

Build

cd $RDBASE/build
sudo cmake -DRDK_BUILD_INCHI_SUPPORT=ON ..
sudo make
sudo make install

Verify

python
>>> import rdkit
>>> rdkit.rdBase.rdkitVersion
'2015.03.1'

Please comment if you have any issue with this installation.