Installing MDAnalysis

The following notes are specific for the SimBioNano course; in general (if you have a C-compiler installed and a few other packages) then you should be able to follow the installation notes.

Installing the binary distribution on the iMacs

The iMacs do not have a C-compiler so a special binary distribution was prepared as a so-called “egg” file, which contains Python code and compiled code. To install a Python egg you need the helper script, which installs some infrastructure, and the egg file itself.

On the iMacs, do the following to install a version latest released version of MDAnalysis (0.7.7).

First create the directory where you will install packages:

mkdir -p ~/Library/Python/2.7/lib/python/site-packages

(This directory is automatically searched by the Python installation on the iMacs so you don’t have to manipulate PYTHONPATH.) Then create a file ~/.pydistutils.cfg that will tell the Python installation tools (distutils) that you always want to put Python packages into your own private directory (a so-called Mac OS X user installation):

cat > ~/.pydistutils.cfg <<'EOF'
# Mac OS X user installation:

# for Mac OS X framework installations (such as EPD)
# use site.USER_SITE

install_lib = ~/Library/Python/$py_version_short/lib/python/site-packages
install_scripts = ~/bin

Then download the packages from the SimBioNano/15/eggs directory (in general you can find source files on the MDAnalysis download page):

curl -O
curl -O
curl -O

Finally, install the packages and a few dependencies (which are downloaded from the internet):

easy_install --no-deps ./MDAnalysis-0.7.7-py2.7-macosx-10.6-i386.egg ./MDAnalysisTests-0.7.7-py2.7.egg
easy_install  networkx gridDataFormats

Installing on saguaro from source

saguaro has an installation of all the important Python packages and the GNU compilers as part of the Software Library and Packages. Thus it is very easy to install MDAnalysis from Python packages:

module load python
easy_install --user -U MDAnalysis MDAnalysisTests

Just remember to module load python before starting to use MDAnalysis.

Testing the installation

MDAnalysis comes with over 500 test cases that check its functionality. These test cases can be run with the command

python -c 'from MDAnalysis.tests import test; test(label="full", verbose=3, extra_argv=["--exe"])'

This can take a few minutes. Ideally, you should only get passing tests (“ok” or just a single dot ”.” when using verbose=1) or “KnownFailures”.

Table Of Contents

Previous topic

Practical 15: MDAnalysis

Next topic


This Page