Showing posts from May, 2013

Build Desmond- on Ubuntu 12.04 64-bit

Desmond is probably the best MD engine out there, especially if you have an InfiniBand cluster. In addition to Desmond itself, it comes with a bunch of goodies such as viparr and msys, which are top-notch modeling tools. Desmond build problem is solved by using SCONS, a python-based build tool. To my surprise the build process went super-smooth! That said, I don't have the necessary sequence of "sudo apt-get install packageA packageB". Please checkout the share/ to get a feel for what Ubuntu packages you might need; frequently a '-dev' package will be needed. Here is what i did The build/ config is shown below Then testing the build to check if the random number is generating the expected random number ;) Test restoring the checkpoint capacity; the files 'dhfr.eneseq' and 'dhfr.eneseq.original' should be identical. Finally, test the parallel part. Here there should be a good match of energi…

Wrapping openbabel in python - using cython

The previous post showed a contrived example of how one could access the openbabel functionality in python using the boost libraries. There is alternative to boost to wrap around c/c++ code, it's called cython. Here is an example openbabel wrapper, exposing some very simple functionality. Just before diving in, you should know that there already exists a wrapper around openbabel in python (it is called pybel). What I'm showing here doesn't even come close to pybel in terms of usefulness, the idea here is to show a demo of how easy wrapping things in python is. #! /usr/bin/python from ez_setup import use_setuptools use_setuptools() from setuptools import setup, Extension, find_packages from Cython.Distutils import build_ext import sys, os import glob import subprocess as sub def get_include(name="openbabel"): p = sub.Popen('locate %s' % name ,stdout=sub.PIPE,stderr=sub.PIPE, shell=True) output, errors = p.communicate() include = [str…

Wrapping openbabel in python - accessing C++ via boost with

Update I have de-contrived the example below. After some struggle, I've managed to accomplish this seemingly simple task: wrap a friendly open-source library inside python and make it a python module. Such wrapping is handy, because it retains the speed of c++ inside of python.
If you want to check out how to do more or less the same thing with cython instead of boost see this.
So here is the // Comment #! /usr/bin/python from ez_setup import use_setuptools use_setuptools() from setuptools import setup, Extension import sys, os import glob include_dirs = [] if __name__ == '__main__': extensions = [Extension('_boostbabel',['src/boostbabel.cpp'], include_dirs+['src/boostbabel/', '/usr/include/openbabel-2.0/'], language="c++", libraries=['boost_python', 'openbabel']), ] setup(name = 'boostbabel', …

Silicos shape-it as a free alternative to OpenEye ROCS?

Silicos provides shape-it - a C++ program for doing shape matching using gaussian volume.

To compile under Ubunt 12.04

sudo apt-get install  libopenbabel-dev libopenbabel4 openbabel

export BABEL_INCLUDEDIR=/usr/include/openbabel-2.0/openbabel
export BABEL_LIBDIR=/usr/lib/openbabel/2.3.1/
export BABEL_DATADIR=/usr/share/openbabel/openbabel/2.3.1/