Appendix: Additional information for the installation

Author:Neetha Mohan

Installation of various dependencies for mDCC

BLAS (Basic Linear Algebra Subprograms)

BLAS is a standard interface for operations like matrix multiplication. The software package is available for download from http://www.netlib.org/blas/ (direct link: http://www.netlib.org/blas/blas.tgz).

  • Download the source code.

  • Untar it into an empty directory:

    gunzip blas.tgz

    tar xf blas.tar

    cd BLAS

    Now you now have a bunch of .f files. With these Fortran files, you can create either a static library or a shared library.

  • A shared library libblas.so is built with following command:

    gfortran -shared -O2 *.f -o libblas.so -fPIC

    # Replace -O3 with your favorite optimization options.

  • A static library is built with the two following commands:

    su -c “cp libblas.a /usr/local/lib”

    gfortran -O2 -c *.f

    ar cr libblas.a *.o

  • Configuration

    The library is in the BLAS directory, called ‘blas_LINUX.a’. Copy it where you prefer and set the correct PATH where you want to use it.

LAPACK (Linear Algebra PACKage)

LAPACK, is a standard collection of routines, built on BLAS, for more-complicated linear algebra operations like matrix inversion and diagonalization. LAPACK is available from http://www.netlib.org/lapack/.

  • Download the source code.

  • Untar the file

    tar zxf lapack.tgz

  • Copy and edit the file LAPACK/make.inc.example to LAPACK/make.inc

    cp LAPACK/make.inc.example LAPACK/make.inc

  • Edit the file LAPACK/Makefile and type ‘make’.

    The LaPack library uses the BLAS library, so you need to tell where to find it. The result is a library ‘lapack_LINUX.a’. This can be copied in a place of your choice.

MDAnalysis

MDAnalysis is an object-oriented python toolkit to analyze molecular dynamics trajectories in many popular formats. MDAnalysis allows one to read molecular dynamics trajectories and access the atomic coordinates through NumPy arrays. This provides a flexible and relatively fast framework for complex analysis tasks. MDAnalysis is available from http://www.mdanalysis.org/. MDAnalysis can be installed using:

  • Using pip

    pip install MDAnalysis

  • Installing from source

    It is also possible to build and install from source. The source packages can be downloaded either from PyPI repositories or Git repository. To download from PyPI repositories go to:

    https://pypi.python.org/pypi/MDAnalysis (main package)

    https://pypi.python.org/pypi/MDAnalysisTests (for the tests) and download the tar files from there.

  • Alternatively, the source packages can be downloaded from the git repository at https://github.com/MDAnalysis/mdanalysis.

    In most cases simply do

    git clone https://github.com/MDAnalysis/mdanalysis

    cd mdanalysis

  • Standard installation from source

    Steps for installing in your home directory:

    python setup.py build

    python setup.py install –user

    It is also possible to use –prefix, –home, or –user options for setup.py to install in a different (probably your private) python directory hierarchy.

NumPy and SciPy

NumPy is the fundamental package for scientific computing with Python. SciPy is a Python-based ecosystem of open-source software for mathematics, science, and engineering. NumPy is available from http://www.numpy.org and SciPy from http://www.scipy.org/.

  • The source package for NumPy can be obtained from:

    git clone git://github.com/numpy/numpy.git numpy or

    git clone http://github.com/numpy/numpy.git numpy

  • The source package for SciPy can be obtained from:

    git clone git://github.com/scipy/scipy.git scipy or

    git clone http://github.com/scipy/scipy.git scipy

  • To build NumPy/SciPy from source, get the source package, unpack it, and:

    python setup.py install –user # installs to your home directory

    or

    python setup.py build

    python setup.py install –prefix=$HOME/local

  • An altermate way to install the packages of the SciPy stack is to download one of these Python distributions, which includes all the key packages like,

    Anaconda: A free distribution for the SciPy stack.

NetworkX

NetworkX is a Python language software package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks. NetworkX is available from http://networkx.github.io

  • Before installing NetworkX, you need to have setuptools installed.

    Download ez_setup.py and run it using the target Python version. The script will download the appropriate version and install it for you:

    wget https://bootstrap.pypa.io/ez_setup.py -O - | python

    Note that you will may need to invoke the command with superuser privileges to install to the system Python:

    wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python

  • Alternatively, Setuptools may be installed to a user-local path:

    wget https://bootstrap.pypa.io/ez_setup.py -O - | python - –user

  • Get NetworkX from the Python Package Index at http://pypi.python.org/pypi/networkx or install it with

    pip install networkx

    You can install the development version (at github.com) with

    pip install git://github.com/networkx/networkx.git#egg=networkx

  • Installing from source

    You can install from source by downloading a source archive file (tar.gz or zip) or by checking out the source files from the Mercurial source code repository.

    Download the source (tar.gz or zip file) from https://pypi.python.org/pypi/networkx/ or get the latest development version from https://github.com/networkx/networkx/

    Unpack and change directory to the source directory (it should have the files README.txt and setup.py).

    Run python setup.py install to build and install

    (Optional) Run nosetests to execute the tests if you have nose installed.

R

R is a free software environment for statistical computing and graphics.

  • Download the program source code and install

    http://lib.stat.cmu.edu/R/CRAN/

    tar xzvf R-1.4.1.tgz

    ./configure

    make

    make check # to ensure that the program was actually built correctly.

  • Install packages

    Eg: install.packages(“ggplot2”)