Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Setup Development Environment
We highly recommend using virtual environments with virtualenvwrapper or conda environments. This allows you to have multiple experimental development versions of MDAnalysis which do not interfere with each other or your own stable version. Since MDAnalysis is split into the actual package and a testsuite you need to install both modules in development mode. We have a blog post explaining in more detail how both work. If you installed python via conda we recommend to use conda-environments.
Checking out and installing MDAnalysis
Firstly, a copy of the raw source files needs to be downloaded from the code repository. From the command line in a suitable directory run:
git clone https://github.com/MDAnalysis/mdanalysis.git
In the future, if you want to update your copy of the code to the latest version, this can be done by running these commands from within the source directory:
git fetch origin git pull origin develop
To create a virtualenv for development, run the following commands:
cd <to where ever you checked out MDAnalysis> mkvirtualenv mdanalysis pip install numpy pip install cython
To install this version of the code, run the following commands:
pip install -e package/ pip install -e testsuite/
-e flag will cause pip to call setup with the
develop option. This means that any changes on the source code will immediately be reflected in your virtual environment. The installation can be done identically in a conda environment.
macOS specific instructions
One more step is required on macOS because of the number of files that a process can open simultaneously is quite low (256). So to increase the number of files that can be accessed, run the following command:
ulimit -n 4096
This sets the number of files to 4096.