Skip to content

Commit

Permalink
BENCH: fix time_geometric_selections (#4360)
Browse files Browse the repository at this point in the history
* Fixes gh-3519

* There is no good reason to keep the flags in the
benchmark--this benchmark has been broken for over a year
so we should just use the appropriate kwargs where possible
and leave a `TODO` comment for core flags that we don't
have a substitute for

* better to have this running than hard failing all the time,
even if we've lost one of the parametrization dimensions

* if someone comes along with the confidence to say we
can delete the `TODO` comment, then we can also delete
some of the extra parametrization complexity of course

[skip cirrus]
  • Loading branch information
tylerjereddy authored Dec 11, 2023
1 parent 37d8fee commit 51e45be
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions benchmarks/benchmarks/selections.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,9 @@ def time_geometric_selections(self,
dynamic_selection,
periodic_selection):

# set core flags for PBC accounting
MDAnalysis.core.flags['use_periodic_selections'] = periodic_selection[0]
MDAnalysis.core.flags['use_KDTree_routines'] = periodic_selection[1]

if hasattr(MDAnalysis.Universe, 'select_atoms'):
self.u.select_atoms(selection_string, updating=dynamic_selection)
else:
self.u.selectAtoms(selection_string, updating=dynamic_selection)
# TODO: Do we need a kwarg similar to old `use_KDTree_routines`
# flag? We used to benchmark that.
self.u.select_atoms(selection_string,
updating=dynamic_selection,
periodic=periodic_selection[0],
)

0 comments on commit 51e45be

Please sign in to comment.