Replica exchange#
Replica exchange molecular dynamics (REMD) is a method that can be used to speed up the sampling of any type of simulation, especially if conformations are separated by relatively high energy barriers. It involves simulating multiple replicas of the same system at different temperatures and randomly exchanging the complete state of two replicas at regular intervals with the probability:
where
How should one choose the temperatures? The energy difference can be written as:
where
Thus for a probability of REMD calculator
, that lets you type in the
temperature range and the number of atoms, and based on that proposes a
set of temperatures.
An extension to the REMD for the isobaric-isothermal ensemble was proposed by Okabe et al. 63. In this work the exchange probability is modified to:
where
Hamiltonian replica exchange is also supported in GROMACS. In Hamiltonian replica exchange, each replica has a different Hamiltonian, defined by the free energy pathway specified for the simulation. The exchange probability to maintain the correct ensemble probabilities is:
The separate Hamiltonians are defined by the free energy functionality
of GROMACS, with swaps made between the different values of
Hamiltonian and temperature replica exchange can also be performed simultaneously, using the acceptance criteria:
Gibbs sampling replica exchange has also been implemented in GROMACS 64. In Gibbs sampling replica exchange, all possible pairs are tested for exchange, allowing swaps between replicas that are not neighbors.
Gibbs sampling replica exchange requires no additional potential energy calculations. However there is an additional communication cost in Gibbs sampling replica exchange, as for some permutations, more than one round of swaps must take place. In some cases, this extra communication cost might affect the efficiency.
All replica exchange variants are options of the mdrun program. It will only work when MPI is installed, due to the inherent parallelism in the algorithm. For efficiency each replica can run on a separate rank. See the manual page of mdrun on how to use these multinode features.