Share 
Follow 
AboutDownloadsDocumentsForumsWikiIssuesNews
Date:
2009-06-16 08:01
Priority:
3
State:
Open
Submitted by:
John Chodera (jchodera)
Assigned to:
Nobody (None)
Summary:
Calling reinitialize() in OpenMMContext object also resets random number sequences

Detailed description
Calling reinitialize() in OpenMMContext object also resets random number sequences of Langevin integrators or Andersen thermostats. If reinitialize() is called periodically, this will cause the same net forces to act on the system, this will cause the system to behave in strange, non-random ways, such as a protein rapidly unfolding.

If this is the intended behavior, a caution should be added to the API documentation.
If this is not the intended behavior, it should be changed.
It must be decided whether the intention of reinitialize() is to reset *all* behavior back to the initial specification, or to simply push out updates to force parameters (as the documentation suggests).

Add A Comment: Notepad

Message  ↓
Date: 2009-06-16 18:22
Sender: John Chodera

Once I discovered that these random seeds were being reset to the same initial
value, I did indeed start feeding new random numbers via
setRandomNumberSeed(). The point is that I found this behavior sufficiently
non-obvious that it took many hours to figure out what was going on, so some
explicit warning of this behavior in the API documentation may be warranted to
save others from similar experiences.

Date: 2009-06-16 17:45
Sender: Peter Eastman

Note that LangevinIntegrator and AndersenThermostat each have a setRandomNumberSeed() method that you can use to keep them from using the same random numbers each time.

No Changes Have Been Made to This Item

Feedback