[gmx-users] BUG: gromacs-REMD implementation

Walter Ash wlash at ucalgary.ca
Thu Feb 24 07:48:29 CET 2005


Users of this modified version of gromacs should know that we have been
made aware of a small but important bug in the gromacs REMD
implementation that has been made available on our website.  I was aware
of this bug prior to leaving for the biophysical society annual meeting
in Long Beach last week, but did not have time to prepare a report and
fix it until now.

There is a small bug in the temperature scaling applied after exchanging
coordinates and velocities between replicas.  We scale velocities by a
factor equal to sqrt(NewTemperature / OldTemperature) after every
exchange, but unfortunately these two factors were reversed in the code
(or the scaling was done at the wrong time), so velocities are scaled by
a factor of sqrt(OldTemperature / NewTemperature) after an exchange.

This has the most obvious effect of altering the exchange frequency
between replicas, particularly at short exchange intervals.  
Specifically, the frequency of back exchange (ie., a return to the
original replica - temperature mapping) is enhanced relative to what
should be expected.  For example, if at step 100, replicas 1 and 2
exchange, this bug will slightly increase the likelihood that replicas 1
and 2 will exchange at step 150.  This therefore
reduces sampling efficiency of the REMD algorithm..

The simplest solution is to edit the source file md.c and within the
function "getscalecoorvel" change the definition of the "scalefactor"
variable from "sqrt(IDTswap.T / IDTself.T)" to "sqrt(IDTself.T /
IDTswap.T)".  The following patch does the job - cut between the double
lines and paste into a new file, then run the patch utility as follows
(in the src/kernel directory of your gromacs REMD source):

$ patch md.c patchfilename


=====BEGIN PATCH======
252c252
<     scalefactor = sqrt(IDTswap.T / IDTself.T);
---
 >     scalefactor = sqrt(IDTself.T / IDTswap.T);
======END PATCH=======

Please note that there are still no guarantees that this software is bug
free, as mentioned on our website.  Use at your own risk, and please
make us aware of any bugs you find during testing.  We also thank one of
the users for discovering and reporting this bug to us - you know who
you are!

Walter Ash






More information about the gromacs.org_gmx-users mailing list