IMP Manual
for IMP version 2.14.0
|
Binary installation is strongly recommended for new users of IMP. It is much faster than building from source code, requires a smaller download, and all the necessary prerequisites are handled for you automatically.
We recommend you use a stable release. These are available for Windows, Mac and Linux from our download page.
Binaries are also available for our latest nightly builds. If you do decide to use a nightly build, please check out the nightly builds results page to see if the code is currently stable enough for your purposes.
In order to build IMP from source, you will need:
The following prerequisites are optional; without them some parts of IMP will not build, and some will not function optimally.
All of the prerequisites should be available as pre-built packages for your Linux distribution of choice. For example, on a Fedora system the following should install most of the prerequisites:
sudo dnf install boost-devel gperftools-devel CGAL-devel graphviz gsl-devel cmake doxygen hdf5-devel swig fftw-devel opencv-devel
Mac users must first install Xcode (previously known as Developer Tools) which is not installed by default with OS X, but is available from the App store (or from the Mac OS install DVD for old versions of Mac OS). They will also need the Xcode command line tools (install by going to Xcode Preferences, then Downloads, then Components, and select "Command Line Tools").
Then Mac users should use one of the available collections of Unix tools, such as
Homebrew (recommended) Once you installed homebrew
do
brew tap salilab/salilab brew install boost gmp google-perftools cgal graphviz gsl cmake doxygen hdf5 swig fftw mpfr opencv libtau eigen
to install everything IMP finds useful (or that you will want for installing various useful Python libs that IMP finds useful). On older Macs, you may also need to brew install git
if you want to use git (newer Macs include git).
/opt/local/bin
is in your path (this may be taken care of by MacPorts automatically, and can be done manually either by modifying your shell's config file or by making an environment.plist
file), and then do sudo port install boost cgal cmake doxygen fftw gmp gperftools graphviz gsl eigen hdf5 mpfr ninja opencv protobuf-cpp swig swig-python(as in brew, some of these packages may be optional)
We recommend Linux or Mac for developing with IMP, as obtaining the prerequisites on Windows is much more involved. However, if you really want to build on Windows, see the building from source code on Windows page for the procedure we use.
tar -xvzf ../imp-<version>.tar.gz
Alternatively you can use git to get the code directly from our GitHub repository with something like:
git clone -b master https://github.com/salilab/imp.git (cd imp && git submodule update --init && ./setup_git.py)
(the master
branch tracks the most recent stable release; alternatively you can use develop
to get the most recent code, but please check out the nightly builds results page to see if the code is currently stable enough for your purposes).
Make a separate directory to keep the compiled version of IMP in (it's tidier to keep this separate from the source code, and if you need to later you can just delete this directory without affecting the source). Set up the build with CMake, then finally compile it, with something like:
mkdir imp_release cd imp_release cmake <path to IMP source> make -j8
There are a number of ways in which IMP can be configured. See the configuration options page for more details and for help with CMake problems.
Once the compilation is complete, you can optionally run the test suite. Test are run using ctest
. A good start is to run ctest --output-on-failure
.
Tests are labeled with the module name and the type and cost of the test, so to run just the expensive tests in the atom
module, use ctest -L "^IMP\.atom\-test\-.*EXPENSIVE"
.
Benchmarks are simply tests labeled as benchmark
; examples are tests labeled as example
.
Note that some test failures are to be expected; compare the failures with those at our own nightly builds page if you are concerned.
Once everything is compiled (and optionally tested) you can install IMP by simply running make install
. If you opted to install in a non-standard location, it is up to you to set up your environment variables so that IMP can be found (you may need to set PATH
, PYTHONPATH
, and LD_LIBRARY_PATH
).
Alternatively, you can run IMP directly from the build directory by using the setup_environment.sh
script. This sets the necessary environment variables and then runs the rest of the command line with this modified environment. For example, to run the ligand_score
command line tool you can either run
./setup_environment.sh ligand_score <arguments>
or create a new shell with
./setup_environment.sh $SHELL
and then run
ligand_score <arguments>
in that shell.