Skip to content

Commit dcaa087

Browse files
orbeckstRMeli
andauthored
update distopia docs (#4970)
Co-authored-by: Rocco Meli <r.meli@bluemail.ch>
1 parent adddc32 commit dcaa087

File tree

2 files changed

+33
-19
lines changed

2 files changed

+33
-19
lines changed

package/CHANGELOG

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The rules for this file:
1414

1515

1616
-------------------------------------------------------------------------------
17-
??/??/?? IAlibay
17+
??/??/?? IAlibay, orbeckst
1818

1919

2020
* 2.10.0

package/MDAnalysis/lib/distances.py

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,12 @@
4848
4949
"OpenMP" :mod:`c_distances_openmp` parallel implementation in C/Cython
5050
with OpenMP
51-
"distopia" `_distopia` SIMD-accelerated implementation
51+
52+
"distopia" `_distopia` SIMD-accelerated implementation
53+
with the `distopia`_ library
5254
========== ========================= ======================================
5355
56+
5457
Use of the distopia library
5558
---------------------------
5659
@@ -65,25 +68,27 @@
6568
.. table:: Functions available using the `distopia`_ backend.
6669
:align: center
6770
68-
+-----------------------------------------------+
69-
| Functions |
70-
+===============================================+
71-
| MDAnalysis.lib.distances.calc_bonds |
72-
+-----------------------------------------------+
73-
| MDAnalysis.lib.distances.calc_angles |
74-
+-----------------------------------------------+
75-
| MDAnalysis.lib.distances.calc_dihedrals |
76-
+-----------------------------------------------+
77-
| MDAnalysis.lib.distances.distance_array |
78-
+-----------------------------------------------+
79-
| MDAnalysis.lib.distances.self_distance_array |
80-
+-----------------------------------------------+
71+
+-------------------------------------------------------+
72+
| Functions |
73+
+=======================================================+
74+
| :func:`MDAnalysis.lib.distances.calc_bonds` |
75+
+-------------------------------------------------------+
76+
| :func:`MDAnalysis.lib.distances.calc_angles` |
77+
+-------------------------------------------------------+
78+
| :func:`MDAnalysis.lib.distances.calc_dihedrals` |
79+
+-------------------------------------------------------+
80+
| :func:`MDAnalysis.lib.distances.distance_array` |
81+
+-------------------------------------------------------+
82+
| :func:`MDAnalysis.lib.distances.self_distance_array` |
83+
+-------------------------------------------------------+
8184
8285
If `distopia`_ is installed, the functions in this table will accept the key
83-
'distopia' for the `backend` keyword argument. If the distopia backend is
84-
selected the `distopia` library will be used to calculate the distances. Note
85-
that for functions listed in this table **distopia is not the default backend
86-
and must be selected.**
86+
'distopia' for the `backend` keyword argument. The variable
87+
:data:`HAS_DISTOPIA` is set to ``True`` if distopia is available.
88+
89+
If the distopia backend is selected the `distopia` library will be used to
90+
calculate the distances. Note that for functions listed in this table
91+
**distopia is not the default backend and must be explicitly selected.**
8792
8893
8994
.. Note::
@@ -109,6 +114,14 @@
109114
.. versionchanged:: 2.9.0
110115
Distopia support greatly expanded (with distopia ≥ 0.4.0).
111116
117+
Constants
118+
---------
119+
.. data:: HAS_DISTOPIA
120+
121+
This variable is ``True`` if the :mod:`distopia` package has been
122+
installed and is available as a `backend`. Otherwise it is
123+
``False``.
124+
112125
Functions
113126
---------
114127
.. autofunction:: distance_array
@@ -124,6 +137,7 @@
124137
.. autofunction:: augment_coordinates(coordinates, box, r)
125138
.. autofunction:: undo_augment(results, translation, nreal)
126139
.. autofunction:: minimize_vectors(vectors, box)
140+
127141
"""
128142
import numpy as np
129143
import numpy.typing as npt

0 commit comments

Comments
 (0)