1 Installation {#installation}
6 # Binary installation {#installation_binary}
8 Binary installation is strongly recommended
for new users of %IMP. It is
9 much faster than building from source code, requires a smaller download,
10 and all the necessary prerequisites are handled
for you automatically.
12 We recommend you use a stable release. These are available
for
13 Windows, Mac and Linux from our [download page](https:
15 Binaries are [also available
for our latest nightly builds](https:
16 please check out the [nightly builds results page](https:
17 to see
if the code is currently stable enough
for your purposes.
19 # Source code installation {#installation_source}
21 ## Prerequisites {#installation_prereqs}
23 In order to build %IMP from source, you will need:
30 if you want to use Python 3; note that 3.0.8 does not
31 [currently work](https:
33 The following prerequisites are _optional_; without them some parts of %IMP
34 will not build, and some will not
function optimally.
39 - [Modeller](\ref modeller): needed to use the IMP.modeller module.
40 - [CGAL](\ref CGAL): enables faster geometric operations, such as
42 - [Google perf tools](\ref perf): needed only
for profiling %IMP code.
43 - [ANN](\ref ANN): certain data structures will be faster
if it is available.
44 - [GSL](\ref GSL): needed to use the IMP.gsl module.
45 - [OpenCV](\ref OpenCV) (2.1 or later): needed to use the IMP.em2d module or the
46 [idock](@ref idock_pcsk9) and [emagefit](@ref emagefit_3sfd) command
49 modules or the [multifit](@ref multifit_3sfd) command line tool.
51 IMP.cnmultifit module or the [cnmultifit](@ref cnmultifit_groel) command
53 - An [MPI](@ref IMP::mpi) library is needed to use the IMP.mpi module.
54 - The [numpy, scipy](http:
56 and [matplotlib](http:
57 Python libraries are also recommended.
59 for visualization of results.
61 ### Getting prerequisites on Linux {#installation_prereqs_linux}
62 All of the prerequisites should be available as pre-built packages
for
63 your Linux distribution of choice. For example, on a Fedora system the
64 following should install most of the prerequisites:
66 sudo yum install boost-devel gperftools-devel CGAL-devel graphviz gsl-devel cmake doxygen hdf5-devel swig fftw-devel opencv-devel
68 ### Getting prerequisites on a Mac {#installation_prereqs_mac}
70 Mac users must first install Xcode (previously known as Developer Tools)
71 which is not installed by
default with OS X, but is available from the App store
72 (or from the Mac OS install DVD
for old versions of Mac OS). They will also
73 need the Xcode command line tools (install by going to Xcode Preferences, then
74 Downloads, then Components, and select
"Command Line Tools").
76 Then Mac users should use one of the available collections of Unix tools,
81 brew tap homebrew/science
82 brew tap salilab/salilab
83 brew install boost gmp google-perftools cgal graphviz gsl cmake doxygen hdf5 swig fftw mpfr opencv libtau
85 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).
87 config file or by making an `environment.plist` file) and then
do
89 sudo port install boost cmake swig-python
91 to install the needed libraries and tools. When installing HDF5 with MacPorts, be sure to install `hdf5-18`
92 (version 1.8), rather than the older `hdf5` (version 1.6.9).
95 ### Getting prerequisites on Windows {#installation_prereqs_windows}
97 We recommend Linux or Mac
for developing with %IMP, as obtaining the
98 prerequisites on Windows is much more involved. However,
if you really want
99 to build on Windows, see the
100 [building from source code on Windows](@ref install_windows) page
for the
104 ## Download {#installation_download}
106 - Download the source code tarball from [our download page](https:
108 tar -xvzf ../imp-<version>.tar.gz
110 - Alternatively you can use [git](http:
111 directly from our [GitHub repository](https:
114 git clone -b master https:
115 (cd imp && ./setup_git.py)
117 (the `master` branch tracks the most recent stable
118 release; alternatively you can use `develop` to
get the most recent code,
119 but please check out the [nightly builds results page](https:
120 to see
if the code is currently stable enough
for your purposes).
122 ## Compilation {#installation_compilation}
124 Make a separate directory to keep the compiled version of %IMP in (it
's tidier
125 to keep this separate from the source code, and if you need to later you can
126 just delete this directory without affecting the source). Set up the build
127 with [CMake](@ref cmake_config), then finally compile it, with something
132 cmake <path to IMP source>
135 There are a number of ways in which %IMP can be configured.
136 See [the configuration options page](@ref cmake_config) for more details.
138 ## Testing {#installation_testing}
139 Once the compilation is complete, you can optionally run the test suite.
140 Test are run using `ctest`. A good start is to run `ctest --output-on-failure`.
142 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"`.
144 Benchmarks are simply tests labeled as `benchmark`; examples are tests labeled as `example`.
146 Note that some test failures are to be expected; compare the failures with
147 those at our own [nightly builds page](https://integrativemodeling.org/nightly/results/)
148 if you are concerned.
150 ## Installation {#installation_install}
152 Once everything is compiled (and optionally tested) you can install %IMP
153 by simply running `make install`. If you opted to install in a non-standard
154 location, it is up to you to set up your environment variables so that %IMP
155 can be found (you may need to set `PATH`, `PYTHONPATH`, and `LD_LIBRARY_PATH`).
157 Alternatively, you can run %IMP directly from the build directory by using
158 the `setup_environment.sh` script. This sets the necessary environment
159 variables and then runs the rest of the command line with this modified
160 environment. For example, to run the `ligand_score` command line tool you
163 ./setup_environment.sh ligand_score <arguments>
165 or create a new shell with
167 ./setup_environment.sh $SHELL
171 ligand_score <arguments>