small changes to temper/grem commands
This commit is contained in:
@ -531,7 +531,8 @@ package"_Section_start.html#start_3.
|
||||
"dump nc"_dump_nc.html,
|
||||
"dump nc/mpiio"_dump_nc.html,
|
||||
"group2ndx"_group2ndx.html,
|
||||
"ndx2group"_group2ndx.html :tb(c=3,ea=c)
|
||||
"ndx2group"_group2ndx.html,
|
||||
"temper/grem"_temper_grem.html :tb(c=3,ea=c)
|
||||
|
||||
:line
|
||||
|
||||
@ -631,7 +632,7 @@ USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT.
|
||||
"rigid/npt (o)"_fix_rigid.html,
|
||||
"rigid/nve (o)"_fix_rigid.html,
|
||||
"rigid/nvt (o)"_fix_rigid.html,
|
||||
"rigid/small (o)"_fix_rigid.html,
|
||||
<"rigid/small (o)"_fix_rigid.html,
|
||||
"rigid/small/nph"_fix_rigid.html,
|
||||
"rigid/small/npt"_fix_rigid.html,
|
||||
"rigid/small/nve"_fix_rigid.html,
|
||||
|
||||
@ -31,52 +31,51 @@ fix fxgREM all grem 502 -0.15 -80000 fxnvt :pre
|
||||
This fix implements the molecular dynamics version of the generalized
|
||||
replica exchange method (gREM) originally developed by "(Kim)"_#Kim,
|
||||
which uses non-Boltzmann ensembles to sample over first order phase
|
||||
transitions. The is done by defining replicas with an enthalpy dependent
|
||||
effective temperature
|
||||
transitions. The is done by defining replicas with an enthalpy
|
||||
dependent effective temperature
|
||||
|
||||
:c,image(Eqs/fix_grem.jpg)
|
||||
|
||||
with {eta} negative and steep enough to only intersect the characteristic
|
||||
microcanonical temperature (Ts) of the system once, ensuring a unimodal
|
||||
enthalpy distribution in that replica. {Lambda} is the intercept and
|
||||
effects the generalized ensemble similar to how temperature effects a
|
||||
Boltzmann ensemble. {H0} is a reference enthalpy, and is typically set
|
||||
as the lowest desired sampled enthalpy. Further explanation can be
|
||||
found in our recent papers "(Malolepsza)"_#Malolepsza.
|
||||
with {eta} negative and steep enough to only intersect the
|
||||
characteristic microcanonical temperature (Ts) of the system once,
|
||||
ensuring a unimodal enthalpy distribution in that replica. {Lambda} is
|
||||
the intercept and effects the generalized ensemble similar to how
|
||||
temperature effects a Boltzmann ensemble. {H0} is a reference
|
||||
enthalpy, and is typically set as the lowest desired sampled enthalpy.
|
||||
Further explanation can be found in our recent papers
|
||||
"(Malolepsza)"_#Malolepsza.
|
||||
|
||||
This fix requires a Nose-Hoover thermostat fix reference passed to the
|
||||
grem as {thermostat-ID}. Two distinct temperatures exist in this generalized
|
||||
ensemble, the effective temperature defined above, and a kinetic
|
||||
temperature that controls the velocity distribution of particles as
|
||||
usual. Either constant volume or constant pressure algorithms can be
|
||||
used.
|
||||
grem as {thermostat-ID}. Two distinct temperatures exist in this
|
||||
generalized ensemble, the effective temperature defined above, and a
|
||||
kinetic temperature that controls the velocity distribution of
|
||||
particles as usual. Either constant volume or constant pressure
|
||||
algorithms can be used.
|
||||
|
||||
The fix enforces a generalized ensemble in a single replica
|
||||
only. Typically, this ideaology is combined with replica
|
||||
exchange with replicas differing by {lambda} only
|
||||
for simplicity, but this is not required. A multi-replica
|
||||
simulation can be run within the LAMMPS environment using the
|
||||
"grem"_temper_grem.html command. This utilizes LAMMPS partition
|
||||
mode and requires the number of available processors be
|
||||
on the order of the number of desired replicas. A 100-replica
|
||||
simulation would require at least 100 processors (1 per world
|
||||
at minimum). If a many replicas are needed on a small number of
|
||||
processors, multi-replica runs can be run outside of LAMMPS.
|
||||
An example of this can be found in examples/USER/misc/grem and
|
||||
has no limit on the number of replicas per processor. However,
|
||||
this is very inefficient and error prone and should be avoided
|
||||
if possible.
|
||||
only. Typically, this ideaology is combined with replica exchange with
|
||||
replicas differing by {lambda} only for simplicity, but this is not
|
||||
required. A multi-replica simulation can be run within the LAMMPS
|
||||
environment using the "temper/grem"_temper_grem.html command. This
|
||||
utilizes LAMMPS partition mode and requires the number of available
|
||||
processors be on the order of the number of desired replicas. A
|
||||
100-replica simulation would require at least 100 processors (1 per
|
||||
world at minimum). If a many replicas are needed on a small number of
|
||||
processors, multi-replica runs can be run outside of LAMMPS. An
|
||||
example of this can be found in examples/USER/misc/grem and has no
|
||||
limit on the number of replicas per processor. However, this is very
|
||||
inefficient and error prone and should be avoided if possible.
|
||||
|
||||
In general, defining the generalized ensembles is unique for every
|
||||
system. When starting a many-replica simulation without any knowledge of
|
||||
the underlying microcanonical temperature, there are several tricks we
|
||||
have utilized to optimize the process. Choosing a less-steep {eta}
|
||||
system. When starting a many-replica simulation without any knowledge
|
||||
of the underlying microcanonical temperature, there are several tricks
|
||||
we have utilized to optimize the process. Choosing a less-steep {eta}
|
||||
yields broader distributions, requiring fewer replicas to map the
|
||||
microcanonical temperature. While this likely struggles from the same
|
||||
sampling problems gREM was built to avoid, it provides quick insight to
|
||||
Ts. Initially using an evenly-spaced {lambda} distribution identifies
|
||||
regions where small changes in enthalpy lead to large temperature
|
||||
changes. Replicas are easily added where needed.
|
||||
sampling problems gREM was built to avoid, it provides quick insight
|
||||
to Ts. Initially using an evenly-spaced {lambda} distribution
|
||||
identifies regions where small changes in enthalpy lead to large
|
||||
temperature changes. Replicas are easily added where needed.
|
||||
|
||||
:line
|
||||
|
||||
@ -97,7 +96,8 @@ LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"grem"_temper_grem.html, "fix nvt"_fix_nh.html, "fix npt"_fix_nh.html, "thermo_modify"_thermo_modify.html
|
||||
"temper/grem"_temper_grem.html, "fix nvt"_fix_nh.html, "fix
|
||||
npt"_fix_nh.html, "thermo_modify"_thermo_modify.html
|
||||
|
||||
[Default:] none
|
||||
|
||||
|
||||
@ -6,11 +6,11 @@
|
||||
|
||||
:line
|
||||
|
||||
grem command :h3
|
||||
temper/grem command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
grem N M lambda fix-ID thermostat-ID seed1 seed2 index :pre
|
||||
temper/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
|
||||
@ -23,25 +23,26 @@ index = which temperature (0 to N-1) I am simulating (optional) :ul
|
||||
|
||||
[Examples:]
|
||||
|
||||
grem 100000 1000 ${lambda} fxgREM fxnvt 0 58728
|
||||
grem 40000 100 ${lambda} fxgREM fxnpt 0 32285 ${walkers} :pre
|
||||
temper/grem 100000 1000 ${lambda} fxgREM fxnvt 0 58728
|
||||
temper/grem 40000 100 ${lambda} fxgREM fxnpt 0 32285 ${walkers} :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Run a parallel tempering or replica exchange simulation in LAMMPS partition
|
||||
mode using multiple generalized replicas (ensembles) of a system defined by
|
||||
"fix grem"_fix_grem.html. Two or more replicas must be used.
|
||||
Run a parallel tempering or replica exchange simulation in LAMMPS
|
||||
partition mode 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 greater detail.
|
||||
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 greater 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:
|
||||
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
|
||||
@ -49,27 +50,27 @@ 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 but unique
|
||||
generalized temperature, and assign one of them to
|
||||
"fix grem"_fix_grem.html used by each replica, and to the grem command.
|
||||
generalized 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.
|
||||
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:
|
||||
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
|
||||
|
||||
@ -77,9 +78,9 @@ then a setting of
|
||||
|
||||
variable walkers world 2 4 0 1 3 :pre
|
||||
|
||||
would be used to restart the run with a grem command like the
|
||||
example above with ${walkers} as the last argument. This functionality
|
||||
is identical to "temper"_temper.html.
|
||||
would be used to restart the run with a grem command like the example
|
||||
above with ${walkers} as the last argument. This functionality is
|
||||
identical to "temper"_temper.html.
|
||||
|
||||
:line
|
||||
|
||||
|
||||
@ -29,6 +29,7 @@ bond_style harmonic/shift/cut, Carsten Svaneborg, science at zqex.dk, 8 Aug 11
|
||||
compute ackland/atom, Gerolf Ziegenhain, gerolf at ziegenhain.com, 4 Oct 2007
|
||||
compute basal/atom, Christopher Barrett, cdb333 at cavs.msstate.edu, 3 Mar 2013
|
||||
compute temp/rotate, Laurent Joly (U Lyon), ljoly.ulyon at gmail.com, 8 Aug 11
|
||||
compute pressure/grem, David Stelter, dstelter@bu.edu, 22 Nov 16
|
||||
dihedral_style cosine/shift/exp, Carsten Svaneborg, science at zqex.dk, 8 Aug 11
|
||||
dihedral_style fourier, Loukas Peristeras, loukas.peristeras at scienomics.com, 27 Oct 12
|
||||
dihedral_style nharmonic, Loukas Peristeras, loukas.peristeras at scienomics.com, 27 Oct 12
|
||||
@ -39,6 +40,7 @@ fix addtorque, Laurent Joly (U Lyon), ljoly.ulyon at gmail.com, 8 Aug 11
|
||||
fix ave/correlate/long, Jorge Ramirez (UPM Madrid), jorge.ramirez at upm.es, 21 Oct 2015
|
||||
fix flow/gauss, Joel Eaves (CU Boulder), Joel.Eaves@Colorado.edu, 23 Aug 2016
|
||||
fix gle, Michele Ceriotti (EPFL Lausanne), michele.ceriotti at gmail.com, 24 Nov 2014
|
||||
fix grem, David Stelter, dstelter@bu.edu, 22 Nov 16
|
||||
fix imd, Axel Kohlmeyer, akohlmey at gmail.com, 9 Nov 2009
|
||||
fix ipi, Michele Ceriotti (EPFL Lausanne), michele.ceriotti at gmail.com, 24 Nov 2014
|
||||
fix pimd, Yuxing Peng (U Chicago), yuxing at uchicago.edu, 24 Nov 2014
|
||||
@ -65,3 +67,4 @@ pair_style meam/sw/spline, Robert Rudd (LLNL), robert.rudd at llnl.gov, 1 Oct 12
|
||||
pair_style morse/smooth/linear, Stefan Paquay (TU Eindhoven), stefanpaquay at gmail.com, 29 Feb 16
|
||||
pair_style srp, Tim Sirk, tim.sirk at us.army.mil, 21 Nov 14
|
||||
pair_style tersoff/table, Luca Ferraro, luca.ferraro@caspur.it, 1 Dec 11
|
||||
temper/grem, David Stelter, dstelter@bu.edu, 22 Nov 16
|
||||
|
||||
@ -17,9 +17,9 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
Contributing author: Edyta Malolepsza (Broad Institute)
|
||||
Contributing author: David Stelter (Boston University)
|
||||
Contributing author: Tom Keyes (Boston University)
|
||||
Contributing authors: Edyta Malolepsza (Broad Institute)
|
||||
David Stelter (Boston University)
|
||||
Tom Keyes (Boston University)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@ -12,9 +12,7 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
Contributing author: Mark Sears (SNL)
|
||||
|
||||
Modified for gREM by David Stelter (BU)
|
||||
Contributing author: David Stelter (BU)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <math.h>
|
||||
|
||||
Reference in New Issue
Block a user