Random seed

The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
POST REPLY
User avatar
Muhamed Amin
Posts: 18
Joined: Thu Sep 27, 2018 2:54 am

Random seed

Post by Muhamed Amin » Wed Dec 05, 2018 4:49 am

Dear Peter and All,
I'm running several MD simulations and I need to start with the same conditions each time I run the simulations. Meaning that I need to start with the same random velocities for all the runs.
How do I do that in openMM?
Thanks

User avatar
Peter Eastman
Posts: 2541
Joined: Thu Aug 09, 2007 1:25 pm

Re: Random seed

Post by Peter Eastman » Wed Dec 05, 2018 9:31 am

Are you initializing them with context.setVelocitiesToTemperature()? It takes the seed as an optional second argument: http://docs.openmm.org/latest/api-c++/g ... eratureEdi. If you're using a LangevinIntegrator or AndersenThermostat, they each have a setRandomNumberSeed() method.

POST REPLY