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

Revert integrator defaults to avoid costly bookkeeping #211

Merged
merged 4 commits into from
Jun 1, 2017

Conversation

maxentile
Copy link
Member

Addresses most of the performance drop mentioned in #210 , by reverting the measure_heat default to False, as it was in v0.8.3., avoiding 3-4 unnecessary addComputeSums per timestep.

A subsequent PR will eliminate redundant calls to addConstrainVelocities, addressing the remaining ~5% performance drop.

@jchodera
Copy link
Member

jchodera commented Jun 1, 2017

Looks like some tests are failing:

======================================================================
ERROR: When `measure_shadow_work==True`, assert that global `shadow_work` is initialized to zero and
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/miniconda/envs/test/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/travis/miniconda/envs/test/lib/python2.7/site-packages/openmmtools-0.10.1-py2.7.egg/openmmtools/tests/test_integrators.py", line 234, in test_vvvr_shadow_work_accumulation
    assert(integrator.get_shadow_work(dimensionless=True) == 0), "Shadow work should initially be zero."
  File "/home/travis/miniconda/envs/test/lib/python2.7/site-packages/openmmtools-0.10.1-py2.7.egg/openmmtools/integrators.py", line 1148, in get_shadow_work
    raise Exception("This integrator must be constructed with 'measure_shadow_work=True' to measure shadow work.")
Exception: This integrator must be constructed with 'measure_shadow_work=True' to measure shadow work.
======================================================================
ERROR: test_integrators.test_alchemical_langevin_integrator
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/miniconda/envs/test/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/travis/miniconda/envs/test/lib/python2.7/site-packages/openmmtools-0.10.1-py2.7.egg/openmmtools/tests/test_integrators.py", line 729, in test_alchemical_langevin_integrator
    run_alchemical_langevin_integrator(nsteps=nsteps)
  File "/home/travis/miniconda/envs/test/lib/python2.7/site-packages/openmmtools-0.10.1-py2.7.egg/openmmtools/tests/test_integrators.py", line 681, in run_alchemical_langevin_integrator
    w_f[iteration] = nonequilibrium_integrator.get_total_work(dimensionless=True)
  File "/home/travis/miniconda/envs/test/lib/python2.7/site-packages/openmmtools-0.10.1-py2.7.egg/openmmtools/integrators.py", line 1525, in get_total_work
    return self.get_protocol_work(dimensionless=dimensionless) + self.get_shadow_work(dimensionless=dimensionless)
  File "/home/travis/miniconda/envs/test/lib/python2.7/site-packages/openmmtools-0.10.1-py2.7.egg/openmmtools/integrators.py", line 1148, in get_shadow_work
    raise Exception("This integrator must be constructed with 'measure_shadow_work=True' to measure shadow work.")
Exception: This integrator must be constructed with 'measure_shadow_work=True' to measure shadow work.

I'll take a stab at fixing this.

@jchodera
Copy link
Member

jchodera commented Jun 1, 2017

The failure was my fault: LanegvinIntegrator.get_shadow_work() was accidentally checking if measure_heat=True instead of measure_shadow_work=True.

@jchodera jchodera merged commit 7d28657 into master Jun 1, 2017
@jchodera jchodera mentioned this pull request Jun 9, 2017
@Lnaden Lnaden mentioned this pull request Jun 12, 2017
@Lnaden Lnaden deleted the integrator-efficiency branch November 21, 2017 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants