==========================
Installing MDAnalysisTests
==========================

The MDAnalysisTests package contains trajectories and structures
that are used in the test suite of the MDAnalysis package
http://www.mdanalysis.org. They should be installed together
with MDAnalysis.

However, the test files change less frequently, take up about 70 MB
of space, and are not needed for daily use of MDAnalysis so they are
distributed separately from the main package.


Help
====

If you have any problems please read through the files INSTALL (this
file) and README and check the MDAnalysis project pages at

      http://www.mdanalysis.org

in particular https://github.com/MDAnalysis/mdanalysis/wiki/INSTALL and
related pages.

You can always ask questions on the MDAnalysis mailing list:

      http://groups.google.com/group/mdnalysis-discussion

People there are very happy to help. When posting please remember to
mention the release of MDAnalysis you are trying to install (e.g. "tar
file MDAnalysis-0.7.3 from website" or "subversion r818"), all the
commands that you typed to install the package, and the full output
(typically right from 'python setup.py build'). You should also
mention your operating system (e.g. Ubuntu 10.04) and Python version
(output from 'python --version') so that we can better diagnose the
problem.


Getting the source 
==================

Download a tar ball from https://pypi.python.org/pypi/MDAnalysisTests; these
instructions apply to versions 0.7.4 or higher.

Alternatively, check out the MDAnalysis directory from the git
repository at https://github.com/MDAnalysis/mdanalysis. In most cases
simply do ::

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


Installation from source
========================

In principle, installation should be as simple as unpacking the source
and executing from the top directory ::

   python setup.py install

This installs MDAnalysisTests in the system wide python directory;
this may require administrative privileges.

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. ``python setup.py install --help`` should show
you your options.

If you have problem at this stage then have a look at the operating
system specific notes at the end of this file or look in the issue
tracker --- maybe the problem is recognized and a work around can be
found in the comments


Running tests
=============

See http://wiki.mdanalysis.org/UnitTests for details.


From sources
------------

From the top directory of the checked out sources:

  ./testsuite/MDAnalysisTests/mda_nosetests --exe -v --processes=4 --process-timeout=120 

(use --processes=4 if you have 4 cores available to run in parallel or
adapt to available cores.)


From installed package
----------------------

The test runner can be launched as

  python -c 'from MDAnalysis.tests import test; test(argv=["--exe", "-v", "--processes=4", "--process-timeout=120"])'

