Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a seed parameter to addMissingAtoms to allow reproducible results #177

Merged
merged 1 commit into from Oct 4, 2018

Conversation

JoaoRodrigues
Copy link
Contributor

Addresses issue #176. Setting the random seed when calling addMissingAtoms yields reproducible atom positions, while no seed results in the current behaviour (no reproducibility).

@peastman
Copy link
Member

peastman commented Oct 4, 2018

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.

@peastman peastman merged commit 4cea9a7 into openmm:master Oct 4, 2018
@JoaoRodrigues
Copy link
Contributor Author

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.

@peastman
Copy link
Member

peastman commented Oct 4, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants