You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -69,32 +69,37 @@ You can do this either with :ref:`conda <dev-with-conda>` or :ref:`pip <dev-with
69
69
70
70
.. _dev-with-conda:
71
71
72
-
With conda
73
-
----------
72
+
With conda-forge packages
73
+
-------------------------
74
+
75
+
We will use pre-compiled packages from the `conda-forge <https://conda-forge.org/>`_ repository.
76
+
77
+
The program to manage these packages is called :program:`conda` although for the following we recommend using the faster one called :program:`mamba`. We will use ``mamba`` for the examples but you can equally use ``conda`` instead.
74
78
75
-
Install either `Anaconda <https://www.anaconda.com/download/>`_
76
-
or `miniconda <https://conda.io/miniconda.html>`_.
77
-
Make sure your conda is up to date:
79
+
* For ``mamba``, follow the `mamba installation instructions <https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html>`_ or the `miniforge installation instructions <https://github.com/conda-forge/miniforge?tab=readme-ov-file#install>`_.
80
+
* For ``conda`` install either the `Anaconda <https://www.anaconda.com/download/>`_ distribution or `miniconda <https://conda.io/miniconda.html>`_.
81
+
82
+
Make sure your :program:`mamba` (or :program:`conda`) is up to date:
78
83
79
84
.. code-block:: bash
80
85
81
-
conda update conda
86
+
mamba update mamba
82
87
83
-
Create a new environment with ``conda create``. This will allow you to change code in
88
+
Create a new environment with ``mamba create``. This will allow you to change code in
84
89
an isolated environment without touching your base Python installation, and without
85
90
touching existing environments that may have stable versions of MDAnalysis. :
86
91
87
92
.. code-block:: bash
88
93
89
-
conda create --name mdanalysis-dev "python>=3.9"
94
+
mamba create --name mdanalysis-dev "python>=3.12"
90
95
91
96
Use a recent version of Python that is supported by MDAnalysis for this environment.
92
97
93
98
Activate the environment to build MDAnalysis into it:
94
99
95
100
.. code-block:: bash
96
101
97
-
conda activate mdanalysis-dev
102
+
mamba activate mdanalysis-dev
98
103
99
104
.. warning::
100
105
Make sure the :code:`mdanalysis-dev` environment is active when developing MDAnalysis.
@@ -103,19 +108,19 @@ To view your environments:
103
108
104
109
.. code-block:: bash
105
110
106
-
conda info -e
111
+
mamba info -e
107
112
108
113
To list the packages installed in your current environment:
109
114
110
115
.. code-block:: bash
111
116
112
-
conda list
117
+
mamba list
113
118
114
119
.. note::
115
120
When you finish developing MDAnalysis you can deactivate the environment with
116
-
:code:`conda deactivate`, in order to return to your root environment.
121
+
:code:`mamba deactivate`, in order to return to your root environment.
117
122
118
-
See the full `conda documentation <http://conda.pydata.org/docs>`__ for more details.
123
+
See the full `mamba documentation <https://mamba.readthedocs.io/en/latest/index.html>`_ or the full `conda documentation <https://docs.conda.io/projects/conda/>`_ for more details.
119
124
120
125
.. _dev-with-pip:
121
126
@@ -204,49 +209,77 @@ This sets the number of files to 4096. However, this command only applies to you
204
209
Building MDAnalysis
205
210
-------------------
206
211
207
-
With conda
208
-
----------
212
+
With mamba/conda
213
+
----------------
209
214
210
215
.. note::
211
216
Make sure that you have :ref:`cloned the repository <forking-code-repo>`
212
-
and activated your virtual environment with :code:`conda activate mdanalysis-dev`.
217
+
and activated your virtual environment with :code:`mamba activate mdanalysis-dev`.
213
218
214
-
First we need to install dependencies. You'll need a mix of conda and pip installations:
219
+
First we need to install the dependencies. To install the base MDAnalysis
220
+
dependencies, do the following:
215
221
216
222
.. code-block:: bash
217
223
218
-
conda install -c conda-forge \
219
-
'Cython>=0.28' \
220
-
'numpy>=1.21.0' \
221
-
'biopython>=1.80' \
222
-
'networkx>=2.0' \
223
-
'GridDataFormats>=0.4.0' \
224
+
mamba install -c conda-forge \
225
+
'cython>=0.28' \
226
+
'fasteners' \
227
+
'griddataformats>=0.4.0' \
228
+
'hypothesis' \
229
+
'matplotlib-base>=1.5.1' \
230
+
'mdahole2-base' \
231
+
'mda-xdrlib' \
224
232
'mmtf-python>=1.0.0' \
225
-
'joblib>=0.12' \
233
+
'numpy>=1.23.2' \
234
+
'packaging' \
235
+
'pathsimanalysis' \
236
+
'pytest' \
226
237
'scipy>=1.5.0' \
227
-
'matplotlib>=1.5.1' \
238
+
'threadpoolctl' \
228
239
'tqdm>=4.43.0' \
229
-
'threadpoolctl'\
230
-
'packaging' \
231
-
'fasteners' \
232
-
'netCDF4>=1.0' \
233
-
'h5py>=2.10' \
240
+
'waterdynamics'
241
+
242
+
243
+
You can also install the following optional dependencies, although please note
244
+
that they many not all be available for your machine type. Specifically,
245
+
*hole2*, and *distopia* are only available on Linux + x86_64 machines, and *openmm*
246
+
is not available for Windows. Simply remove any optional package that
247
+
is not available for your operating system/architecture from your list.
Ensure that you have a working C/C++ compiler (e.g. gcc or clang). You will also need Python ≥ 3.9. We will now install MDAnalysis.
282
+
Ensure that you have a working C/C++ compiler (e.g. :program:`gcc` or :program:`clang`). You will also need Python ≥ 3.10 (which you already installed in your virtual environment). We will now install MDAnalysis.
250
283
251
284
.. code-block:: bash
252
285
@@ -268,7 +301,7 @@ At this point you should be able to import MDAnalysis from your locally built ve
268
301
$ python # start an interpreter
269
302
>>> import MDAnalysis as mda
270
303
>>> mda.__version__
271
-
'2.6.0-dev0'
304
+
'2.8.0-dev0'
272
305
273
306
274
307
With pip and virtualenv
@@ -279,45 +312,65 @@ With pip and virtualenv
279
312
and activated your virtual environment with :code:`source myproject-env/bin/activate`
280
313
(or :code:`workon my-project` if you used the `virtualenvwrapper package <https://virtualenvwrapper.readthedocs.io/en/latest/>`_)
281
314
282
-
Install the dependencies:
315
+
First we need to install the dependencies. To install the base MDAnalysis
316
+
dependencies, do the following:
283
317
284
318
.. code-block:: bash
285
319
286
320
python -m pip install \
287
-
'Cython>=0.28' \
288
-
'numpy>=1.21.0' \
289
-
'biopython>=1.80' \
290
-
'networkx>=2.0' \
291
-
'GridDataFormats>=0.4.0' \
321
+
'cython>=0.28' \
322
+
'fasteners' \
323
+
'griddataformats>=0.4.0' \
324
+
'hypothesis' \
325
+
'matplotlib>=1.5.1' \
326
+
'mdahole2' \
327
+
'mda-xdrlib' \
292
328
'mmtf-python>=1.0.0' \
293
-
'joblib>=0.12' \
329
+
'numpy>=1.23.2' \
330
+
'packaging' \
331
+
'pathsimanalysis' \
332
+
'pytest' \
294
333
'scipy>=1.5.0' \
295
-
'matplotlib>=1.5.1' \
334
+
'threadpoolctl' \
296
335
'tqdm>=4.43.0' \
297
-
'threadpoolctl'\
298
-
'packaging' \
299
-
'fasteners' \
300
-
'netCDF4>=1.0' \
301
-
'h5py>=2.10' \
336
+
'waterdynamics'
337
+
338
+
You can also install the following optional dependencies (note that
339
+
you will not be able to install all the optional dependencies as
0 commit comments