-
Notifications
You must be signed in to change notification settings - Fork 83
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
Minimization in ReplicaExchangeSampler #477
Comments
@hannahbrucemacdonald @dominicrufa @jaimergp : Didn't you find a way to change this default behavior? I was under the impression that was backported to |
Hi, The Fire minimizer has been problematic, I wasn't aware that it was still the default and I can change it back to |
Sorry I spoke too soon -- it looks like if the Fire integrator nans, then it should fall back to openmm's LocalEnergyMinimizer anyway. What version of openmmtools are you using? |
Hi Hannah, I should have been clearer in my initial message. The (FIRE) minimizer completes without NANs. Its the equilibration that then NANs immediately. Looking at the initial and minimized energies for FIRE vs LocalEnergyMinimizer I can see that LocalEnergyMinimizer reduces the energy a LOT more. Dave |
Hello,
I have been using the minimize function in ReplicaExchangeSampler to minimize a set of replicas in different alchemical states like this:
lsd_move = openmmtools.mcmc.LangevinSplittingDynamicsMove(options)
repex_simulation = ReplicaExchangeSampler(mcmc_moves=lsd_move)
repex_simulation.minimize()
I am finding a lot of the replicas NaN when the initial structure contains a clash. I tried changing the minimize options but it always NaNs. I then tried the following which fixes the problem.
for k in range(nstates):
sampler_state = sampler_states[k]
thermodynamic_state = thermodynamic_states[k]
integrator=LangevinIntegrator()
context = thermodynamic_state.create_context(integrator)
sampler_state.apply_to_context(context)
mm.LocalEnergyMinimizer.minimize(context)
sampler_state.update_from_context(context)
As far as I can see ReplicaExchangeSampler uses the FIREMinimizationIntegrator. Could the minimize function be set to use LocalEnergyMinimizer as an option? It seems more effective in this case.
Cheers,
Dave
The text was updated successfully, but these errors were encountered: