Skip to content

DirectSimulation should use engine.start/.stop#905

Merged
dwhswenson merged 3 commits into
openpathsampling:masterfrom
dwhswenson:direct_sim_start_stop
Mar 7, 2020
Merged

DirectSimulation should use engine.start/.stop#905
dwhswenson merged 3 commits into
openpathsampling:masterfrom
dwhswenson:direct_sim_start_stop

Conversation

@dwhswenson

@dwhswenson dwhswenson commented Mar 4, 2020

Copy link
Copy Markdown
Member

From an email report from a user:

I tried to follow this example:

http://openpathsampling.org/latest/examples/mistis.html#toy-model-mistis

to set up openpathsampling.DirectSimulation for my flux_pairs, but got this error:

AttributeError: 'GromacsEngine' has no attribute 'n_frames_since_start', nor does its options dictionary

Two problems, both solved in this PR:

  1. ExternalEngine.n_frames_since_start is only set in its .start() method. It should be set (to None) in __init__.
  2. DirectSimulation is not using the .start() and .stop() methods. This didn't matter for OpenMM/toy engine, but does for external engines like Gromacs.

NOTE: I would not recommend using DirectSimulation on external engines. DirectSimulation is mainly useful to get fluxes from toy engine runs or other simulations where you don't want to save trajectory frames. It's better to run a trajectory normally and use TrajectoryTransitionAnalysis.

@dwhswenson dwhswenson added the bugfix PRs fixing bugs label Mar 4, 2020
@dwhswenson

Copy link
Copy Markdown
Member Author

I will leave this open for another 24 hours for comment; merging no earlier than Friday afternoon, 5 March.

@dwhswenson dwhswenson merged commit 647ceb0 into openpathsampling:master Mar 7, 2020
@dwhswenson dwhswenson deleted the direct_sim_start_stop branch March 7, 2020 02:23
@dwhswenson dwhswenson mentioned this pull request Sep 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PRs fixing bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant