|
4 | 4 | Installation Guide |
5 | 5 | ==================== |
6 | 6 |
|
7 | | -**MDAnalysis** can be installed using `conda <https://docs.conda.io/projects/conda/en/latest/>`_ (recommended), `pip <https://pip.pypa.io/en/latest/index.html>`_, or from `source <https://github.com/MDAnalysis/mdanalysis/>`_ for development. |
| 7 | +The latest version of **MDAnalysis** can be installed using: |
| 8 | +`pip <https://pip.pypa.io/en/latest/index.html>`_ (most common, for general users), |
| 9 | +`conda <https://docs.conda.io/projects/conda/en/latest/>`_ (recommended for better dependency management), |
| 10 | +or from `source <https://github.com/MDAnalysis/mdanalysis/>`_ (for development and contributing). Currently, |
| 11 | +the `conda <https://docs.conda.io/projects/conda/en/latest/>`_ releases only support serial calculations. If you plan to use the parallel OpenMP algorithms, |
| 12 | +you need to install MDAnalysis with `pip <https://pip.pypa.io/en/latest/index.html>`_ and have a working OpenMP installation. |
| 13 | + |
| 14 | +**MDAnalysisTests** is a optional and it is a separate :ref:`test suite <mdanalysistests>` used for verifying MDAnalysis installations and running User Guide examples. |
| 15 | +It is not required for daily use, but some tutorials depend on it. The package is 90 MB and does not change frequently. If you plan to use tutorial examples |
| 16 | +or contribute to MDAnalysis development, installing it is recommended. |
8 | 17 |
|
9 | 18 | .. note:: |
10 | | - MDAnalysis supports **Linux**, **macOS**, and **Windows** (Python 3.8+). |
11 | | - If you encounter installation issues, seek help on `GitHub Discussions (Installation) <https://github.com/MDAnalysis/mdanalysis/discussions/categories/installation>`_. |
| 19 | + MDAnalysis supports **Linux**, **macOS**, and **Windows** (Python 3.8+). |
| 20 | + |
| 21 | + - If you encounter errors on **Windows** related to **Microsoft Visual C++ 14.0**, install the required **Build Tools for Visual Studio** from: `Microsoft Visual Studio Downloads <https://visualstudio.microsoft.com/downloads/>`_. |
| 22 | + - If you encounter any other issues following these instructions, seek help on `GitHub Discussions (Installation) <https://github.com/MDAnalysis/mdanalysis/discussions/categories/installation>`_. |
| 23 | + |
| 24 | +.. warning:: |
| 25 | + `Conda <https://docs.conda.io/projects/conda/en/latest/>`_ and `pip <https://pip.pypa.io/en/latest/index.html>`_ installations **do not include** external programs such as `HOLE <https://www.holeprogram.org//>`_. |
12 | 26 |
|
13 | 27 | Conda installation |
14 | 28 | ===== |
15 | | - |
16 | | -For most users, `conda <https://docs.conda.io/projects/conda/en/latest/>`_ is the easiest way to install MDAnalysis. We highly recommend creating a new environment for MDAnalysis. |
17 | | -This will ensure that you have a clean installation of MDAnalysis and its dependencies, and will not interfere with other packages you may have installed. |
| 29 | + |
| 30 | +For most users, `conda <https://docs.conda.io/projects/conda/en/latest/>`_ is the easiest way to install MDAnalysis because it manages dependencies effectively. |
| 31 | +We highly recommend creating a new environment for MDAnalysis. We further recommend that you install and use ``mamba``, a faster drop-in replacement for ``conda``. |
18 | 32 |
|
19 | 33 | .. code-block:: bash |
20 | 34 |
|
21 | 35 | conda create --name mdanalysis |
22 | 36 | conda activate mdanalysis |
23 | | - conda install -c conda-forge mdanalysis |
| 37 | + conda install -c conda-forge mamba |
24 | 38 |
|
25 | | -To upgrade to the latest version: |
| 39 | +To install the latest stable version of MDAnalysis via ``conda``, use the following command. This installs all dependencies needed for full analysis functionality. |
26 | 40 |
|
27 | 41 | .. code-block:: bash |
28 | 42 |
|
29 | | - conda update mdanalysis |
| 43 | + mamba install -c conda-forge mdanalysis |
30 | 44 |
|
31 | | -To install the **test suite** (useful for examples and validation): |
| 45 | +To upgrade use: |
32 | 46 |
|
33 | 47 | .. code-block:: bash |
34 | 48 |
|
35 | | - conda install MDAnalysisTests |
| 49 | + mamba update mdanalysis |
36 | 50 |
|
37 | | -.. warning:: |
38 | | - Conda installations **do not support OpenMP**. |
39 | | - If you need **parallel OpenMP calculations**, install MDAnalysis using `pip <https://pip.pypa.io/en/latest/index.html>`_. |
| 51 | +To install the `test suite <https://userguide.mdanalysis.org/stable/datasets.html#mdanalysistests>`_ use: |
| 52 | + |
| 53 | +.. code-block:: bash |
40 | 54 |
|
| 55 | + mamba install -c conda-forge MDAnalysisTests |
41 | 56 |
|
42 | | -If you intend to use MDAnalysis in JupyterLab, you will have to install |
| 57 | +If you intend to use MDAnalysis in **JupyterLab**, you will have to install |
43 | 58 | an extra package for the progress bar in analysis classes: |
44 | 59 |
|
45 | 60 | .. code-block:: bash |
46 | 61 |
|
47 | 62 | conda install -c conda-forge nodejs |
48 | 63 | jupyter labextension install @jupyter-widgets/jupyterlab-manager |
49 | 64 |
|
| 65 | +.. warning:: |
| 66 | + MDAnalysis installed via conda does not support OpenMP. If you need **parallel OpenMP calculations**, |
| 67 | + **install MDAnalysis** using `pip <https://pip.pypa.io/en/latest/index.html>`_. |
| 68 | + |
50 | 69 | Pip installation |
51 | 70 | ===== |
52 | 71 |
|
53 | | -If you do not use Conda or require **OpenMP support**, install MDAnalysis via `pip <https://pip.pypa.io/en/latest/index.html>`_: |
| 72 | +The following command will install or upgrade the latest stable version of MDAnalysis via `pip <https://pip.pypa.io/en/latest/index.html>`_ with core dependencies. This means that some packages required by specific analysis modules will not be installed. |
54 | 73 |
|
55 | 74 | .. code-block:: bash |
56 | 75 |
|
57 | 76 | pip install --upgrade MDAnalysis |
58 | 77 |
|
59 | | -For full functionality with **analysis modules**: |
| 78 | +
|
| 79 | +If you need to install a fully-featured MDAnalysis, add the ``analysis`` tag. |
60 | 80 |
|
61 | 81 | .. code-block:: bash |
62 | 82 |
|
63 | 83 | pip install --upgrade MDAnalysis[analysis] |
64 | 84 |
|
65 | | -To install the **test suite**: |
| 85 | +To install or upgrade the `test suite <https://userguide.mdanalysis.org/stable/datasets.html#mdanalysistests>`_: |
66 | 86 |
|
67 | 87 | .. code-block:: bash |
68 | 88 |
|
69 | 89 | pip install --upgrade MDAnalysisTests |
70 | 90 |
|
71 | | -If you intend to use MDAnalysis in JupyterLab, you will have to install |
| 91 | +If you intend to use MDAnalysis in **JupyterLab**, you will have to install |
72 | 92 | an extra package for the progress bar in analysis classes: |
73 | 93 |
|
74 | 94 | .. code-block:: bash |
75 | 95 |
|
76 | 96 | pip install nodejs |
77 | 97 | jupyter labextension install @jupyter-widgets/jupyterlab-manager |
78 | 98 |
|
79 | | -.. note:: |
80 | | - If you are installing on **Windows**, and encounter errors related to **Microsoft Visual C++ 14.0**, install **Build Tools for Visual Studio** from `here <https://visualstudio.microsoft.com/downloads/>`_. |
81 | | - |
82 | | ----------------------- |
83 | | - |
84 | | -Development versions |
| 99 | +Install from `source <https://github.com/MDAnalysis/mdanalysis/>`_ |
85 | 100 | ==================== |
86 | | -To install development versions of MDAnalysis, you can compile it from source. In order to install from source, you will need ``numpy`` and ``cython``. See :ref:`create-virtual-environment` for instructions on how to create a full development environment. |
87 | 101 |
|
| 102 | +To install the latest development versions of MDAnalysis (including unreleased features and bug fixes) you can compile it from `source <https://github.com/MDAnalysis/mdanalysis/>`_. Use the following commands: |
| 103 | + |
88 | 104 | .. code-block:: bash |
89 | 105 |
|
90 | 106 | git clone https://github.com/MDAnalysis/mdanalysis |
91 | 107 | cd mdanalysis |
92 | 108 | # assuming you have already installed required dependencies |
93 | 109 | pip install -e package/ |
94 | 110 |
|
95 | | -And to install the test suite: |
| 111 | +.. note:: |
| 112 | + To install from `source <https://github.com/MDAnalysis/mdanalysis/>`_, you will need ``numpy`` and ``cython``. See :ref:`create-virtual-environment` for instructions on how to create a full development environment. |
| 113 | + |
| 114 | +To install the test suite: |
96 | 115 |
|
97 | 116 | .. code-block:: bash |
98 | 117 |
|
99 | 118 | pip install -e testsuite/ |
100 | 119 |
|
101 | | -
|
102 | 120 | Testing |
103 | 121 | ------- |
104 | 122 |
|
105 | | -The tests rely on the `pytest` and `numpy` packages, which must also be installed. Run tests with: |
| 123 | +The tests rely on the `pytest <https://docs.pytest.org/en/stable/>`_ and `numpy <https://numpy.org/>`_ packages, which must also be installed. Run tests with: |
106 | 124 |
|
107 | 125 | .. code-block:: bash |
108 | 126 |
|
@@ -135,15 +153,14 @@ For example, ``extra_cflags`` can be used to tune your MDAnalysis installation f |
135 | 153 |
|
136 | 154 | Use of these flags can give a significant performance boost where the compiler can effectively autovectorise. |
137 | 155 |
|
138 | | -Be sure to use the recommended flags for your target architecture. For example, ARM platforms recommend using ``-mcpu`` *instead* of ``-mcpu``, while |
| 156 | +Be sure to use the recommended flags for your target architecture. For example, ARM platforms recommend using ``-mcpu`` *instead* of ``-mcpu``, while |
139 | 157 | PowerPC platforms prefer *both* ``-mcpu`` and ``-mtune``. |
140 | 158 |
|
141 | 159 | Full dicussion of the these flags is available elsewhere (such as here in this wiki_ or in this ARM_ blog post) and a list of supported options should be provided by your compiler. The list for GCC_ is provided here. |
142 | 160 |
|
143 | 161 | .. warning:: |
144 | | - Use of these compiler options is considered **advanced** and may reduce the binary compatibility of MDAnalysis significantly, especially if using `-march`, |
145 | | - making it usable only on a matching CPU architecture to the one it is compiled on. We **strongly** recommend that you run the test suite on your intended platform |
146 | | - before proceeding with analysis. |
| 162 | + These compiler options are **advanced** and may reduce binary compatibility. In particular, using `-march` may restrict MDAnalysis to the exact CPU architecture it was compiled on. |
| 163 | + We **strongly recommend** that you run the test suite on your intended platform before proceeding with analysis. |
147 | 164 |
|
148 | 165 | In cases where you might encounter multiple CPU architectures (e.g. on a supercomputer where the login node and compute node have different architectures), you should avoid changing these options unless you are experienced with compiling software in these situations. |
149 | 166 |
|
|
0 commit comments