Wiki

Clone wiki

WONKA / Ubuntu

#Setting up WONKA on Ubuntu

This is a full tutorial on setting up WONKA on a ubuntu 14.04 LTS 64 bit.

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

Then install the initial requirements

#!bash
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

Now lets make the RDKit

#!bash
mkdir ~/RDKit
cd ~/RDKit
git clone https://github.com/rdkit/rdkit.git
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:
#!bash
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.

#!bash
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 WONKA code:

#!bash
cd ~/
git clone https://abradley@bitbucket.org/abradley/wonka.git CHOC
Finally pull down the current database
#!bash
wget https://bitbucket.org/abradley/wonka/downloads/wonka_db ~/CHOC/src/WebApp/data/wonka_db

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

#!python
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