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:
27 with its [zlib filter enabled](https:
33 if you want to use Python 3)
35 The following prerequisites are _optional_; without them some parts of %IMP
36 will not build, and some will not
function optimally.
39 is built with NumPy, many operations that transfer data between C++ and Python
40 become more efficient.
44 - [Modeller](\ref modeller): needed to use the IMP.modeller module.
45 - [CGAL](\ref CGAL): enables faster geometric operations, such as
47 - [Google perf tools](\ref perf): needed only
for profiling %IMP code.
48 - [ANN](\ref ANN): certain data structures will be faster
if it is available.
49 - [GSL](\ref GSL) (1.13 or later): needed to use the IMP.gsl module.
50 - [OpenCV](\ref OpenCV) (2.1 or later): needed to use the IMP.em2d module or the
51 [idock](@ref idock_pcsk9) and [emagefit](@ref emagefit_3sfd) command
54 modules or the [multifit](@ref multifit_3sfd) command line tool.
56 IMP.cnmultifit module or the [cnmultifit](@ref cnmultifit_groel) command
59 IMP.npctransport module.
60 - An [MPI](@ref IMP::mpi) library is needed to use the IMP.mpi module.
63 and [matplotlib](http:
64 Python libraries are also recommended.
67 for visualization of results.
69 The following prerequisites are _bundled_, i.e. they are included with %IMP
70 itself and will be built at the same time as %IMP, unless explicitly
71 requested otherwise (see [CMake](@ref cmake_config)
for more information):
74 RMF files, and the IMP.rmf module.
78 ### Getting prerequisites on Linux {#installation_prereqs_linux}
79 All of the prerequisites should be available as pre-built packages
for
80 your Linux distribution of choice. For example, on a Fedora system the
81 following should install most of the prerequisites:
83 sudo dnf install boost-devel gperftools-devel CGAL-devel graphviz gsl-devel cmake hdf5-devel swig fftw-devel opencv-devel python3-numpy
85 ### Getting prerequisites on a Mac {#installation_prereqs_mac}
87 Mac users must first install the developer Command Line Tools, which can be
88 done from the command line by running
90 sudo xcode-
select --install
92 These can also be obtained by installing Xcode from the App store, then trying
93 to run a command line tool (such as `clang`) which will prompt to install the
96 Then Mac users should use one of the available collections of Unix tools,
101 brew tap salilab/salilab
102 brew install boost gmp google-perftools cgal graphviz gsl cmake hdf5 swig fftw mpfr opencv libtau eigen
104 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).
107 sudo port install boost cgal cmake fftw gmp gperftools graphviz gsl eigen hdf5 mpfr ninja opencv protobuf-cpp swig swig-python
108 (as in brew, some of these packages may be optional)
112 ### Getting prerequisites on Windows {#installation_prereqs_windows}
114 We recommend Linux or Mac
for developing with %IMP, as obtaining the
115 prerequisites on Windows is much more involved. However,
if you really want
116 to build on Windows, see the
117 [building from source code on Windows](@ref install_windows) page
for the
121 ## Download {#installation_download}
123 - Download the source code tarball from [our download page](https:
125 tar -xvzf ../imp-<version>.tar.gz
127 - Alternatively you can use [git](https:
128 directly from our [GitHub repository](https:
131 git clone -b
main https:
132 (cd imp && git submodule update --init && ./setup_git.py)
134 (the `main` branch tracks the most recent stable
135 release; alternatively you can use `develop` to
get the most recent code,
136 but please check out the [nightly builds results page](https:
137 to see
if the code is currently stable enough
for your purposes).
139 ## Compilation {#installation_compilation}
141 Make a separate directory to keep the compiled version of %IMP in (it
's tidier
142 to keep this separate from the source code, and if you need to later you can
143 just delete this directory without affecting the source). Set up the build
144 with [CMake](@ref cmake_config), then finally compile it, with something
149 cmake <path to IMP source>
152 There are a number of ways in which %IMP can be configured.
153 See [the configuration options page](@ref cmake_config) for more details
154 and for help with CMake problems.
156 ## Testing {#installation_testing}
157 Once the compilation is complete, you can optionally run the test suite.
158 Test are run using `ctest`. A good start is to run `ctest --output-on-failure`.
160 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"`.
162 Benchmarks are simply tests labeled as `benchmark`; examples are tests labeled as `example`.
164 Note that some test failures are to be expected; compare the failures with
165 those at our own [nightly builds page](https://integrativemodeling.org/nightly/results/)
166 if you are concerned.
168 ## Installation {#installation_install}
170 Once everything is compiled (and optionally tested) you can install %IMP
171 by simply running `make install`. If you opted to install in a non-standard
172 location, it is up to you to set up your environment variables so that %IMP
173 can be found (you may need to set `PATH`, `PYTHONPATH`, and `LD_LIBRARY_PATH`).
175 Alternatively, you can run %IMP directly from the build directory by using
176 the `setup_environment.sh` script. This sets the necessary environment
177 variables and then runs the rest of the command line with this modified
178 environment. For example, to run the `ligand_score` command line tool you
181 ./setup_environment.sh ligand_score <arguments>
183 or create a new shell with
185 ./setup_environment.sh $SHELL
189 ligand_score <arguments>