Page 1 of 1

Random seed

Posted: Wed Dec 05, 2018 4:49 am
by mamin03
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

Re: Random seed

Posted: Wed Dec 05, 2018 9:31 am
by peastman
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.