3. Installing MDT¶
Contents
3.1. Basic installation¶
MDT requires Python 2.7. Type
python --version
to make sure that you have Python 2.7.X. If not, you’ll want to use your system’s package manager. If have Python 2.7 but not pip
(the python package manager), you can install it by running
easy_install pip
At this point, you should have everything you need to install MDT.
pip install moldesign
Note: Depending on their specific python installation, some users may need to run the installation as root, i.e. sudo pip install moldesign
3.1.1. Updating¶
To update to the most recent version of the toolkit, type
pip install -U moldesign
However, note that this will update moldesign
and all of its dependencies (including numpy, jupyter, setuptools, etc.) to their latest versions, which you may or may not want. To update only the moldesign
suite, please run
pip install --no-deps -U moldesign pyccc nbmolviz
3.1.2. Common problems¶
Permissions
Depending on how python is installed on your system, you may need to run this installation as root, e.g. sudo pip install moldesign
.
MacOS default Python We’ve encountered issues trying to install Jupyter with MacOS’s built-in python distribution. We highly recommend using Homebrew <http://brew.sh/> to install a friendlier version of Python that doesn’t require root permissions; see http://docs.python-guide.org/en/latest/starting/install/osx/ for instructions.
Python version The toolkit is not yet compatible with Python 3. For now, make sure you’re using Python 2.7 to install and run everything.
3.1.3. Notebook extensions¶
MDT will automatically install and enable the nbmolviz
and widgetsnbextensions
for Jupyter if they’re not already enabled (these extensions provide the interactive molecular visualization framework). You can list the installed extensions by running
jupyter nbextension list
They can be turned on, if necessary, by running:
jupyter nbextension enable --python nbwidgetsextension
jupyter nbextension enable --python nbmolviz
3.2. Optional python installs¶
MDT relies on several open source python packages to provide various functions. It’s not necessary to have any of them installed on your own machine, but it can be convenient to have them locally, especially for development
3.2.1. OpenBabel¶
MDT makes heavy use of OpenBabel’s file i/o routines. While powerful, OpenBabel and its Python bindings can be challenging to compile. It’s highly recommended to use a package manager:
- For Debian and Ubuntu, use
apt-get install openbabel python-openbabel
- For MacOS X, use
brew install --with-python open-babel
.
See the OpenBabel docs for more information.
3.2.2. OpenMM¶
We recommend the pre-compiled binary installers available directly from the OpenMM developers.
3.2.3. PySCF¶
MDT uses quantum chemical implementations and basis set logic from the excellent PySCF library. You can install it locally by running
pip install git+https://github.com/sunqm/pyscf
If you run into problems, see the documentation and GitHub README..
3.3. Changing where your jobs run¶
The toolkit is built to run jobs using the Docker containerization technology (which has nothing to do with molecular docking). Docker eliminates the need to configure or compile software on different computers.
By default, MDT is configured to use a free cloud-based docker cluster provided by Autodesk Research. If you’d like to run jobs on your local machine, you’ll need to install a couple more things.
3.3.1. Running locally with Docker¶
First, create or edit a file at $HOME/.moldesign/moldesign.yml
with the line
engine_type: docker
Next, install Docker if necessary (version 1.11 or higher is required):
- Mac: Download and install Docker for Mac.
- Windows: Download and install Docker for Windows.
- Linux: Follow the instructions for your distribution.
Once Docker is up and running, make sure to allocate enough RAM - 4 GB will work well for the included example jobs.
3.3.2. Running locally with CloudComputeCannon¶
Our group has also developed CloudComputeCannon, a lightweight, Docker-based job scheduling system which is more suitable for production than a bare Docker engine.
You’ll need Docker installed locally (see steps above). To install CCC:
- Install the Node.js javascript interpreter if necessary.
- Update NPM if necessary:
npm install npm -g
- Do a global install of cloud compute cannon:
npm install -g cloud-compute-cannon
To run it:
- To start the CCC scheduler, make sure Docker is running locally, then run
ccc server-install
- To stop the CCC scheduler, run
ccc server-stop
Finally, update your MDT configuration to point to the CCC server by default by putting these lines in
$HOME/.moldesign/moldesign.yml
:
engine_type: cloudcomputecannon
default_ccc_server: localhost:9000
3.4. System-specific installation¶
Use these instructions to get the dependencies installed on your machine, then proceed with the basic installation.
3.4.1. Mac OS X¶
Install homebrew if it’s not already installed:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install Python:
$ brew install python
3.4.2. Ubuntu / Debian¶
apt-get install python python-pip
3.4.3. Red Hat / Fedora / CentOS¶
yum install python python-pip
3.4.4. Windows¶
Windows is not supported at this time, although if the Python dependencies can be installed, MDT should work fine. We highly recommend running your notebooks in Chrome or Firefox. We’re working on Windows support - if you have any problems, please open an issue on GitHub.