We recommend that you install mdtraj with conda.
$ conda install -c omnia mdtraj
You can install also mdtraj with pip, if you prefer.
$ pip install mdtraj
Conda is a cross-platform package manager built especially for scientific python. It will install mdtraj along with all dependencies from a pre-compiled binary. If you don’t have Python or the conda package manager, we recommend starting with the Anaconda Scientific Python distribution, which comes pre-packaged with many of the core scientific python packages that MDTraj uses (see below), or with the Miniconda Python distribution, which is more bare-bones.
Currently, we test and run mdtraj with Python 2.7, 3.3 and 3.4 on
To use mdtraj, the following libraries and software will need to be installed.
- Linux, Mac OS X or Windows operating system
- We develop mainly on 64-bit Linux and OS X machines. We make our best effort to support Windows where possible.
- Python >= 2.7
- The development package (python-dev or python-devel on most Linux distributions) is recommended.
- NumPy >= 1.7.0
- Numpy is the base package for numerical computing in python.
Running the tests is a great way to verify that everything is working. The test suite uses nose, which you can pick up via pip if you don’t already have it.
pip install nose
Then, to run the tests, execute the command
nosetests mdtraj -v
To compile MDTraj from source, you’ll need cython, numpy, and an appropriate compiler toolchain for your platform. For linux and OS X, we support the gcc and clang compilers. For Windows, we support Microsoft Visual Studio 2008 and Visual Studio 2010. The mingw compiler toolchain is unsupported.