# [gmx-developers] Energy and Foreign Lambdas and Hamiltonian Replica Exchange

Matt Wyczalkowski maw2 at cec.wustl.edu
Fri Nov 2 14:54:50 CET 2007

```>> I would say this is very easy, less than a day. But maybe I am overly
>> optimistic,
>> since I know the code. This involves no real changes to the code,
>> since you just
>> do the acceptance based on the same potential energy of normal REMD.
>> There are only some checks that need to be changed.
>>
>> But I don't see for what kind of systems such a RE would help.
>> Or is this not for free energy differences and do you want to use lambda
>> to lower barriers?
>>
> IIRC this requires evaluating the energy at a different lambda than
> the one assigned to the processor(s). Maybe someone can post the
> exchange probability criterion.
>
> It is all about sampling of course, and this kind of approach is also
> used in constant pH MD (with implicit solvent) and in Van Gunsterens
> switching between coarse grained and atomistic MD. A more general
> setup for all these REMD variants would be useful therefore. One could
> also envision REMD in two dimensions (e.g. T and lambda).
The exchange probability for a Hamiltonian Replica Exchange swap between
systems a and b is,

P_swap = min[1,exp(-beta dU)]

where

dU = U(l_a,X_b) + U(l_b,X_a) - U(l_a,X_a) - U(l_b,X_b)

is the total energy change of the two systems combined due to the swap;
U is the potential of configuration X parameterized by lambda (l).
Clearly, it is necessary to evaluate the energy of a given system at a
different ('foreign') lambda -- this is the same requirement as was
discussed with respect to the Bennett Acceptance Ratio and Free Energy
Perturbation.

I have implemented this in another piece of software before
(http://towhee.sourceforge.net) and so have a reasonable idea of what it
will involve, but I am just now starting to look at Gromacs code.  Once
I get a feel for what is involved, and if it doesn't seem overly
daunting, I will have more specific questions.  For the time being,
however, I am wondering if I should be focusing my attention on the
3.2.2 or the CVS HEAD versions of the codebase?

Regards,

Matt

--
Matt Wyczalkowski
Doctoral Candidate, Biomedical Engineering
Pappu Lab: http://lima.wustl.edu
Washington University in St. Louis
maw2 at cec.wustl.edu

```