Skip to content

Throttle MD (again)

Jonathan Barnoud requested to merge feature/throttle-md2 into master

Fixes #188 (closed) Superseeds !211 (closed)

Adds throttling of the MD for the OpenMM and the ASE runners. Also fixes issues with the reset in the OpenMM runner.

Compared to !211 (closed):

  • the VariableIntervalGenerator is now threadsafe: one can change the interval in a thread while another thread runs the dynamics;
  • the unthrottled and the throttled run functions are merged: to run unthrottled, set the interval to 0; this simplifies the code and avoids losing the throttling after pausing the simulation;
  • better documentation;
  • the throttling interval can be queried and changed by the client using a pair of commands.

In addition, this merge request fixes the reset of the OpenMM runner: now the state of the OpenMM simulation context is flushed to get rid of cached values, and the user forces are reset to 0.

TODO:

  • tests
  • make sure the reset does not cause issues with user interactions: the resetting of the user interactions could cause some to be lost.
Edited by Jonathan Barnoud

Merge request reports