Skip to content

Instantly share code, notes, and snippets.

@mcs07
Created February 28, 2016 19:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcs07/4f8f165c19e8840ab2ce to your computer and use it in GitHub Desktop.
Save mcs07/4f8f165c19e8840ab2ce to your computer and use it in GitHub Desktop.

Download:

cd /opt
wget https://github.com/rdkit/rdkit/archive/Release_2015_09_2.tar.gz
tar -xvf Release_2015_09_2.tar.gz
mv rdkit-Release_2015_09_2 rdkit_2015_09_2

Setup environment:

cd /opt/rdkit_2015_09_2
export RDBASE=/opt/rdkit_2015_09_2
export LD_LIBRARY_PATH=/opt/rdkit_2015_09_2/lib:$LD_LIBRARY_PATH
export PYTHONPATH=/opt/rdkit_2015_09_2:$PYTHONPATH

Avalon and InChI:

cd $RDBASE/External/AvalonTools
wget https://downloads.sourceforge.net/project/avalontoolkit/AvalonToolkit_1.2/AvalonToolkit_1.2.0.source.tar
tar -xvf AvalonToolkit_1.2.0.source.tar
cd ../INCHI-API
./download-inchi.sh

Build:

mkdir $RDBASE/build
cd $RDBASE/build
cmake -DRDK_BUILD_INCHI_SUPPORT=ON -DRDK_BUILD_THREADSAFE_SSS=ON -DRDK_TEST_MULTITHREADED=ON -DPYTHON_EXECUTABLE=/opt/anaconda/bin/python -DPYTHON_INCLUDE_DIR=/opt/anaconda/include/python2.7 -DPYTHON_LIBRARY=/opt/anaconda/lib/libpython2.7.so -DRDK_BUILD_AVALON_SUPPORT=ON -DAVALONTOOLS_DIR=/opt/rdkit_2015_09_2/External/AvalonTools/SourceDistribution ..
make
make install
ctest

PostgreSQL cartridge:

cd $RDBASE/Code/PgSQL/rdkit
make install USE_INCHI=1 USE_AVALON=1 USE_THREADS=1

This is compiled for a specific PostgreSQL version. If you have multiple, you can specify by using the PG_CONFIG makefile variable:

cd $RDBASE/Code/PgSQL/rdkit
make install PG_CONFIG=/usr/lib/postgresql/9.4/bin/pg_config USE_INCHI=1 USE_AVALON=1 USE_THREADS=1

So to install in multiple PostgreSQL versions, repeat the above for each, separated by a make clean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment