Bug #1995

Updated by Mark Abraham over 3 years ago

When expanded ensemble is running, and a move is proposed into state 0, then the lambdas are not reset to the lambdas that correspond to state zero. This is because the state_global->fep_state is not set to the state->fep_state if state->fep_state is 0. The offending code is here:


if (state->fep_state > 0)
state_global->fep_state = state->fep_state; /* state->fep is the one updated by bExpanded */
for (i = 0; i < efptNR; i++)
state_global->lambda[i] = fepvals->all_lambda[i][state_global->fep_state];

The solution appears to simply eliminate the conditional if (state->fep_state > 0)

After some code archeology, I was unable to determine why it was included.

We have run a long set of expanded ensemble simulations with his change, and there does not appear to be any other problem with this fix.

But perhaps there is some different use case that I am missing.

I will post a fix to release-2016 in the next few min (I can post to another branch if that is needed)