Clone wiki

OOMMPPAA / Ubuntu

Setting up OOMMPPAA on Ubuntu

This is a full tutorial on setting up OOMMPPAA on a ubuntu 12.04 LTS 64 bit.

Download: Ubuntu 12.04 LTS 64 bit version and install as virtual machine or on a dedicated box

Then install the initial requirements

sudo apt-get install build-essential python-dev python-numpy git python-setuptools vim flex bison cmake sqlite3 libsqlite3-dev libboost-dev openbabel libboost-python-dev libboost-regex-dev python-matplotlib python-openbabel python-pip nginx libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev unzip

sudo easy_install ipython Django==1.5.0 tornado

sudo pip install gunicorn django-jfu

sudo apt-get install python-psycopg2

We need to do some funky stuff to get PIL to work

sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib
sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib
sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib

sudo pip install -U PIL

Now lets make the RDKit

mkdir ~/RDKit
cd ~/RDKit
git clone https://github.com/rdkit/rdkit.git

Now we want to build on this release of the RDKit.

git checkout dad1e1db5b0045e11972d931a8701c52ea90bb43

Then go into bashrc file

vim ~/.bashrc

and add:

export RDBASE=~/RDKit/rdkit
export LD_LIBRARY_PATH=$RDBASE/lib:$LD_LIBRARY_PATH
export PYTHONPATH=$RDBASE/lib:$RDBASE:PYTHONPATH

Now open a new shell and make the RDKit:

source ~/.bashrc
cd $RDBASE
mkdir build
cd build
cmake ..
make
make install

This should have worked. If it hasn't then many helpful suggestions can be found here.

You will also need INCHI support, which is compiled seperately.

cd $RDBASE/External/INCHI-API
bash download-inchi.sh
cd $RDBASE/build
cmake .. -DRDK_BUILD_INCHI_SUPPORT=ON
make
make install

Again this should complete without error.

Now lets get the OOMMPPAA code:

cd ~/
git clone https://abradley@bitbucket.org/abradley/oommppaa.git CHOC

Finally pull down the current database

wget https://bitbucket.org/abradley/oommppaa/downloads/OOMMPPAA_db.db ~/CHOC/src/WebApp/data/OOMMPPAA_db.db

At this point you can use Tornado as a server. Simply type:

python runtornado.py --port 9001 --address 127.0.0.1

and it will be accessible on localhost port 9001. This setup is fine for personal use.

If you want the site to be more robust then use this example to help out.

Updated