diff --git a/package/CHANGELOG b/package/CHANGELOG index 5bce69eaec..b4446024c5 100644 --- a/package/CHANGELOG +++ b/package/CHANGELOG @@ -14,13 +14,14 @@ The rules for this file: ------------------------------------------------------------------------------- -??/??/?? IAlibay +??/??/?? IAlibay, talagayev * 2.9.0 Fixes Enhancements + * marked `analysis.atomicdistances.AtomicDistances` as not parallelizable (Issue #4662) Changes diff --git a/package/MDAnalysis/analysis/atomicdistances.py b/package/MDAnalysis/analysis/atomicdistances.py index 1860d3285b..8c677764de 100644 --- a/package/MDAnalysis/analysis/atomicdistances.py +++ b/package/MDAnalysis/analysis/atomicdistances.py @@ -146,6 +146,7 @@ class AtomicDistances(AnalysisBase): .. versionadded:: 2.5.0 """ + _analysis_algorithm_is_parallelizable = False def __init__(self, ag1, ag2, pbc=True, **kwargs): # check ag1 and ag2 have the same number of atoms diff --git a/testsuite/MDAnalysisTests/analysis/test_atomicdistances.py b/testsuite/MDAnalysisTests/analysis/test_atomicdistances.py index 443173cff7..7c0df94a04 100644 --- a/testsuite/MDAnalysisTests/analysis/test_atomicdistances.py +++ b/testsuite/MDAnalysisTests/analysis/test_atomicdistances.py @@ -134,3 +134,23 @@ def test_ad_pairwise_dist_pbc(self, ad_ag1, ad_ag2, # compare with expected values from dist() assert_allclose(actual, expected_pbc_dist) + + +@pytest.mark.parametrize( + "classname,is_parallelizable", + [ + (ad.AtomicDistances, False), + ] +) +def test_class_is_parallelizable(classname, is_parallelizable): + assert classname._analysis_algorithm_is_parallelizable == is_parallelizable + + +@pytest.mark.parametrize( + "classname,backends", + [ + (ad.AtomicDistances, ('serial',)), + ] +) +def test_supported_backends(classname, backends): + assert classname.get_supported_backends() == backends