Commit 5c64934b authored by dstelter92's avatar dstelter92
Browse files

added documention, re-ran temper_grem example

parent 5ac2d953
Loading
Loading
Loading
Loading
+101 −0
Original line number Original line Diff line number Diff line
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c

:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)

:line

grem command :h3

[Syntax:]

grem N M lambda fix-ID thermostat-ID seed1 seed2 index :pre

N = total # of timesteps to run
M = attempt a tempering swap every this many steps
lambda = initial lambda for this ensemble
fix-ID = ID of fix_grem
thermostat-ID = ID of the thermostat that controls kinetic temperature
seed1 = random # seed used to decide on adjacent temperature to partner with
seed2 = random # seed for Boltzmann factor in Metropolis swap
index = which temperature (0 to N-1) I am simulating (optional) :ul

[Examples:]

grem 100000 100 ${lambda} fxgREM fxnvt 0 58728
grem 40000 100 ${lambda} fxgREM fxnpt 0 32285 $w :pre

[Description:]

Run a parallel tempering or replica exchange simulation using multiple
generalized replicas (ensembles) of a system defined by 
"fix_grem"_fix_grem.html. Two or more replicas must be used. 

This command is a modification of the "temper"_temper.html command and has the 
same dependencies, restraints, and input variables which are discussed there
in detail.

Instead of temperature, this command performs replica exchanges in lambda
as per the generalized ensemble enforced by "fix_grem"_fix_grem.html.
The desired lambda is specified by {lambda}, which is typically a
variable previously set in the input script, so that each partition is
assigned a different temperature.  See the "variable"_variable.html
command for more details.  For example:

variable lambda world 400 420 440 460
fix fxnvt all nvt temp 300.0 300.0 100.0
fix fxgREM all grem ${lambda} -0.05 -50000 fxnvt
temper 100000 100 ${lambda} fxgREM fxnvt 3847 58382 :pre

would define 4 lambdas with constant kinetic temperature, and assign one
of them to "fix_grem"_fix_grem.html used by each replica, and to the grem
command.

As the gREM simulation runs for {N} timesteps, a swap
between adjacent ensembles will be attempted every {M} timesteps.  If
{seed1} is 0, then the swap attempts will alternate between odd and
even pairings.  If {seed1} is non-zero then it is used as a seed in a
random number generator to randomly choose an odd or even pairing each
time.  Each attempted swap of temperatures is either accepted or
rejected based on a Metropolis criterion, derived for gREM by 
"(Kim)"_#Kim, which uses {seed2} in the random number generator.

File management works identical to the "temper"_temper.html command.
Dump files created by this fix contain continuous trajectories and
require post-processing to obtain per-replica information.

The last argument {index} in the grem command is optional and is
used when restarting a run from a set of restart files (one
for each replica) which had previously swapped to new lambda.
This is done using a variable. For example if the
log file listed the following for a simulation with 5 replicas:

500000 2 4 0 1 3 :pre

then a setting of

variable w world 2 4 0 1 3 :pre

would be used to restart the run with a grem command like the
example above with $w as the last argument. This functionality
is identical to "temper"_temper.html.

:line

[Restrictions:]

This command can only be used if LAMMPS was built with the USER-MISC
package.  See the "Making LAMMPS"_Section_start.html#start_3 section
for more info on packages.

This command must be used with "fix_grem"_fix_grem.html.

[Related commands:]

"fix_grem"_fix_grem.html, "temper"_temper.html, "variable"_variable.html

[Default:] none

:link(Kim)
[(Kim)] Kim, Keyes, Straub, J. Chem. Phys., 132, 224107 (2010).