Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mark analysis.atomicdistances.AtomicDistances as not parallelizable #4808

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions package/MDAnalysis/analysis/atomicdistances.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 20 additions & 0 deletions testsuite/MDAnalysisTests/analysis/test_atomicdistances.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading