Skip to content

Commit 3199858

Browse files
committed
highlight distopia
- installation instructions - link to docs for backends - mini example - mention (currently undocumented) MDAnalysis.lib.distances.HAS_DISTOPIA
1 parent 3f24e89 commit 3199858

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

_posts/2025-03-11-release-2.9.0.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,34 @@ For a full list of changes, bug fixes and deprecations see the [CHANGELOG][].
5050

5151
* Support for Gromacs v2024.4 and v2025 TPR files.
5252
* A new "water" keyword for selecting water residues.
53-
* Support for [distopia][] 0.4.0 as an optional distance library backend.
53+
* Support for **[distopia][] 0.4.0** as an optional distance library
54+
backend that now supports [many more distance
55+
functions](https://docs.mdanalysis.org/stable/documentation_pages/lib/distances.html#id2)
56+
for *all box types* (including general triclinic unit cells).
57+
58+
On supported [x86-64][] platforms, install *distopia* with
59+
```bash
60+
mamba install -c conda-forge distopia
61+
```
62+
63+
You can then [enable *distopia* as a
64+
backend](https://docs.mdanalysis.org/stable/documentation_pages/lib/distances.html#use-of-the-distopia-library)
65+
to make use of the optimized *distopia* code for
66+
compute-intensive distance calculations, such as
67+
[`distance_array()`](https://docs.mdanalysis.org/stable/documentation_pages/lib/distances.html#MDAnalysis.lib.distances.distance_array):
68+
69+
```python
70+
protein = u.select_atoms("protein and not name H*")
71+
lipids = u.select_atoms("resname POPC CHOL and not name H*")
72+
d = MDAnalysis.lib.distances.distance_array(protein, lipids,
73+
box=u.dimensions,
74+
backend="distopia")
75+
```
76+
77+
If you want to see if *distopia* is available as a backend in a running
78+
program, check that the variable `MDAnalysis.lib.distances.HAS_DISTOPIA` is
79+
`True`.
80+
5481
* Parallel analysis support for `MDAnalysis.analysis.nucleicacids`, `MDAnalysis.analysis.contacts`, and `MDAnalysis.analysis.density`.
5582
* XYZ writer can now write positions up to a user-supplied precision via the `precision` keyword argument.
5683

0 commit comments

Comments
 (0)