Bug #1995

Lambda not getting correctly when expanded ensemble jumps to state 0

Added by Michael Shirts almost 4 years ago. Updated almost 4 years ago.

Target version:
Affected version - extra info:
Affected version:


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)

Associated revisions

Revision a41f7351 (diff)
Added by Michael Shirts almost 4 years ago

Fix for incorrectly setting expanded ensemble when fep_state = 0

Expanded ensemble lambda values were not being copied over when the
proposed fep_state was 0. This commit fixes that by removing a
a conditonal that was incorrectly added.

Fixes #1995

Change-Id: I3d49b0936d973fb70a9a79799743f5069ba4fff4


#1 Updated by Gerrit Code Review Bot almost 4 years ago

Gerrit received a related patchset '1' for Issue #1995.
Uploader: Michael Shirts ()
Change-Id: I3d49b0936d973fb70a9a79799743f5069ba4fff4
Gerrit URL:

#2 Updated by Erik Lindahl almost 4 years ago

  • Status changed from New to Fix uploaded

#3 Updated by Mark Abraham almost 4 years ago

  • Description updated (diff)

#4 Updated by Mark Abraham almost 4 years ago

  • Status changed from Fix uploaded to Resolved

#5 Updated by Mark Abraham almost 4 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF