Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
_wrap was not needed (happens internally)
  • Loading branch information
dwhswenson committed Dec 9, 2021
commit d841a74cbeb13ac9c044495b3f1b5a88adc7b2d9
12 changes: 1 addition & 11 deletions paths_cli/tests/wizard/test_volumes.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@
from openpathsampling.tests.test_helpers import make_1d_traj


def _wrap(x, period_min, period_max):
# used in testing periodic CVs
while x >= period_max:
x -= period_max - period_min
while x < period_min:
x += period_max - period-min
return x


@pytest.fixture
def volume_setup():
cv = CoordinateFunctionCV(lambda snap: snap.xyz[0][0]).named('x')
Expand Down Expand Up @@ -120,8 +111,7 @@ def test_cv_defined_volume(periodic):
min_ = 0.0
max_ = 1.0
cv = CoordinateFunctionCV(
lambda snap: _wrap(snap.xyz[0][0], period_min=min_,
period_max=max_),
lambda snap: snap.xyz[0][0],
period_min=min_, period_max=max_
).named('x')
inputs = ['x', '0.75', '1.25']
Expand Down