Closed JoaoRodrigues closed 5 years ago
Looks good. Be aware though that even if you set the seed, that doesn't guarantee you'll get identical results every time. It depends on the platform you're using. For example, on the CPU platform the CustomNonbondedForce sums interactions in a non-deterministic order. That causes the initial forces to be slightly different, which can cause the minimization to end up somewhere different.
Thanks Peter. Indeed, but at least on the same platform running the same script gives the same result.
I'd consider actually adding a similar setting for addHydrogens
in openmm because of a similar issue. Maybe there a global setSeed
method would be better, for simplicity.
but at least on the same platform running the same script gives the same result.
Not necessarily. With some platforms it will. For others it won't.
Addresses issue #176. Setting the random seed when calling
addMissingAtoms
yields reproducible atom positions, while no seed results in the current behaviour (no reproducibility).