Skip to content

Commit 556788f

Browse files
committed
final clear version of Installation Guide
1 parent 29e29fd commit 556788f

File tree

1 file changed

+50
-33
lines changed

1 file changed

+50
-33
lines changed

doc/source/installation.rst

Lines changed: 50 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,105 +4,123 @@
44
Installation Guide
55
====================
66

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.
817

918
.. 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//>`_.
1226

1327
Conda installation
1428
=====
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``.
1832

1933
.. code-block:: bash
2034
2135
conda create --name mdanalysis
2236
conda activate mdanalysis
23-
conda install -c conda-forge mdanalysis
37+
conda install -c conda-forge mamba
2438
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.
2640

2741
.. code-block:: bash
2842
29-
conda update mdanalysis
43+
mamba install -c conda-forge mdanalysis
3044
31-
To install the **test suite** (useful for examples and validation):
45+
To upgrade use:
3246

3347
.. code-block:: bash
3448
35-
conda install MDAnalysisTests
49+
mamba update mdanalysis
3650
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
4054
55+
mamba install -c conda-forge MDAnalysisTests
4156
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
4358
an extra package for the progress bar in analysis classes:
4459

4560
.. code-block:: bash
4661
4762
conda install -c conda-forge nodejs
4863
jupyter labextension install @jupyter-widgets/jupyterlab-manager
4964
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+
5069
Pip installation
5170
=====
5271

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.
5473

5574
.. code-block:: bash
5675
5776
pip install --upgrade MDAnalysis
5877
59-
For full functionality with **analysis modules**:
78+
79+
If you need to install a fully-featured MDAnalysis, add the ``analysis`` tag.
6080

6181
.. code-block:: bash
6282
6383
pip install --upgrade MDAnalysis[analysis]
6484
65-
To install the **test suite**:
85+
To install or upgrade the `test suite <https://userguide.mdanalysis.org/stable/datasets.html#mdanalysistests>`_:
6686

6787
.. code-block:: bash
6888
6989
pip install --upgrade MDAnalysisTests
7090
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
7292
an extra package for the progress bar in analysis classes:
7393

7494
.. code-block:: bash
7595
7696
pip install nodejs
7797
jupyter labextension install @jupyter-widgets/jupyterlab-manager
7898
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/>`_
85100
====================
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.
87101

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+
88104
.. code-block:: bash
89105
90106
git clone https://github.com/MDAnalysis/mdanalysis
91107
cd mdanalysis
92108
# assuming you have already installed required dependencies
93109
pip install -e package/
94110
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:
96115

97116
.. code-block:: bash
98117
99118
pip install -e testsuite/
100119
101-
102120
Testing
103121
-------
104122

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:
106124

107125
.. code-block:: bash
108126
@@ -135,15 +153,14 @@ For example, ``extra_cflags`` can be used to tune your MDAnalysis installation f
135153
136154
Use of these flags can give a significant performance boost where the compiler can effectively autovectorise.
137155

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
139157
PowerPC platforms prefer *both* ``-mcpu`` and ``-mtune``.
140158

141159
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.
142160

143161
.. 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.
147164

148165
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.
149166

0 commit comments

Comments
 (0)