MDAnalysis is an open source Python library that helps you to quickly write your own analysis algorithm for studying trajectories produced by the most popular simulation packages. It is described in the paper
N. Michaud-Agrawal, E. J. Denning, T. B. Woolf, and O. Beckstein. MDAnalysis: A Toolkit for the Analysis of Molecular Dynamics Simulations. J. Comput. Chem. 32 (2011), 2319—2327, doi:10.1002/jcc.21787. PMCID:PMC3144279
DISCLAIMER: Your instructor is one of the main authors of the package and might be overly enthusiastic in promoting it...
If you have a C-compiler installed on your machine then you would install MDAnalysis as usual from source.
However, 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
installs some infrastructure, and the egg file itself.
On the iMacs, do the following to install a version latest released version off MDAnalysis (0.7.7).
First create a file
~/.pydistutils.cfg in the following way:
cat > ~/.pydistutils.cfg <<'EOF' # Mac OS X user installation: # http://peak.telecommunity.com/DevCenter/EasyInstall#mac-os-x-user-installation # http://peak.telecommunity.com/DevCenter/EasyInstall#downloading-and-installing-a-package # for Mac OS X framework installations (such as EPD) # use site.USER_SITE http://docs.python.org/2/library/site.html [install] install_lib = ~/Library/Python/$py_version_short/lib/python/site-packages install_scripts = ~/bin EOF mkdir -p ~/Library/Python/2.7/lib/python/site-packages
Then download the packages:
curl -O http://becksteinlab.physics.asu.edu/pages/courses/2013/SimBioNano/15/ez_setup.py curl -O http://becksteinlab.physics.asu.edu/pages/courses/2013/SimBioNano/15/eggs/MDAnalysis-0.7.7-py2.7-macosx-10.6-i386.egg curl -O http://becksteinlab.physics.asu.edu/pages/courses/2013/SimBioNano/15/eggs/MDAnalysisTests-0.7.7-py2.7.egg
Finally, install the packages:
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
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.
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".