choderalab / perses

Experiments with expanded ensembles to explore chemical space
http://perses.readthedocs.io
MIT License
181 stars 51 forks source link

Allow users to specify random seeds #781

Open mikemhenry opened 3 years ago

mikemhenry commented 3 years ago

In perses we use both random and np.random. We should let the user specify the random number seed. See docs here for numpy and here for the standard lib here.

jchodera commented 3 years ago

If we're going to add the capability of specifying seeds (presumably for determinism in testing? what's the use case?), we should also extend that to all the random number generators used by OpenMM.

The only important use case I can see is making sure that processes that start at the same time receive separate seeds so they do note use the same sequence of random numbers.

mikemhenry commented 3 years ago

Use case would be for deterministic testing -- like for making sure we get the same atom maps when testing. I honestly haven't looked into how OpenMM does the seeding but it will be important to tie into that + make sure the seeding is thread safe.