<p>Before this loop begins, the state of the system on replica 0 is
shared with all replicas, so that all replicas begin from the same
initial state. The first potential energy basin is identified by
quenching (an energy minimization, see below) the initial state and
storing the resulting coordinates for reference.</p>
<p>In the first stage, dephasing is performed by each replica
independently to eliminate correlations between replicas. This is
done by choosing a random set of velocities, based on the
<em>random_seed</em> that is specified, and running <em>t_dephase</em> timesteps of
dynamics. This is repeated <em>n_dephase</em> times. At each of the
<em>n_dephase</em> stages, if an event occurs during the <em>t_dephase</em> steps of
dynamics for a particular replica, the replica repeats the stage until
no event occurs.</p>
<p>If the <em>temp</em> keyword is not specified, the target temperature for
velocity randomization for each replica is the current temperature of
that replica. Otherwise, it is the specified <em>Tdephase</em> temperature.
The style of velocity randomization is controlled using the keyword
<em>vel</em> with arguments that have the same meaning as their counterparts
in the <aclass="reference internal"href="velocity.html"><em>velocity</em></a> command.</p>
<p>In the second stage, each replica runs dynamics continuously, stopping
every <em>t_event</em> steps to check if a transition event has occurred.
This check is performed by quenching the system and comparing the
resulting atom coordinates to the coordinates from the previous basin.
The first time through the PRD loop, the “previous basin” is the set
of quenched coordinates from the initial state of the system.</p>
<p>A quench is an energy minimization and is performed by whichever
algorithm has been defined by the <aclass="reference internal"href="min_style.html"><em>min_style</em></a> command.
Minimization parameters may be set via the
<aclass="reference internal"href="min_modify.html"><em>min_modify</em></a> command and by the <em>min</em> keyword of the
PRD command. The latter are the settings that would be used with the
<aclass="reference internal"href="minimize.html"><em>minimize</em></a> command. Note that typically, you do not
need to perform a highly-converged minimization to detect a transition
event.</p>
<p>The event check is performed by a compute with the specified
<em>compute-ID</em>. Currently there is only one compute that works with the
PRD commmand, which is the <aclass="reference internal"href="compute_event_displace.html"><em>compute event/displace</em></a> command. Other
event-checking computes may be added. <aclass="reference internal"href="compute_event_displace.html"><em>Compute event/displace</em></a> checks whether any atom in
the compute group has moved further than a specified threshold
distance. If so, an “event” has occurred.</p>
<p>In the third stage, the replica on which the event occurred (event
replica) continues to run dynamics to search for correlated events.
This is done by running dynamics for <em>t_correlate</em> steps, quenching
every <em>t_event</em> steps, and checking if another event has occurred.</p>
<p>The first time no correlated event occurs, the final state of the
event replica is shared with all replicas, the new basin reference
coordinates are updated with the quenched state, and the outer loop
begins again. While the replica event is searching for correlated
events, all the other replicas also run dynamics and event checking
with the same schedule, but the final states are always overwritten by
the state of the event replica.</p>
<p>The outer loop of the pseudo-code above continues until <em>N</em> steps of
dynamics have been performed. Note that <em>N</em> only includes the
dynamics of stages 2 and 3, not the steps taken during dephasing or
the minimization iterations of quenching. The specified <em>N</em> is
interpreted in one of two ways, depending on the <em>time</em> keyword. If
the <em>time</em> value is <em>steps</em>, which is the default, then each replica
runs for <em>N</em> timesteps. If the <em>time</em> value is <em>clock</em>, then the
simulation runs until <em>N</em> aggregate timesteps across all replicas have
elapsed. This aggregate time is the “clock” time defined below, which
typically advances nearly M times faster than the timestepping on a
single replica.</p>
<hrclass="docutils"/>
<p>Four kinds of output can be generated during a PRD run: event
statistics, thermodynamic output by each replica, dump files, and
restart files.</p>
<p>When running with multiple partitions (each of which is a replica in
this case), the print-out to the screen and master log.lammps file is
limited to event statistics. Note that if a PRD run is performed on
only a single replica then the event statistics will be intermixed
with the usual thermodynamic output discussed below.</p>
<p>The quantities printed each time an event occurs are the timestep, CPU
time, clock, event number, a correlation flag, the number of
coincident events, and the replica number of the chosen event.</p>
<p>The timestep is the usual LAMMPS timestep, except that time does not
advance during dephasing or quenches, but only during dynamics. Note
that are two kinds of dynamics in the PRD loop listed above. The
first is when all replicas are performing independent dynamics,
waiting for an event to occur. The second is when correlated events
are being searched for and only one replica is running dynamics.</p>
<p>The CPU time is the total processor time since the start of the PRD
run.</p>
<p>The clock is the same as the timestep except that it advances by M
steps every timestep during the first kind of dynamics when the M
replicas are running independently. The clock advances by only 1 step
per timestep during the second kind of dynamics, since only a single
replica is checking for a correlated event. Thus “clock” time
represents the aggregate time (in steps) that effectively elapses
during a PRD simulation on M replicas. If most of the PRD run is
spent in the second stage of the loop above, searching for infrequent
events, then the clock will advance nearly M times faster than it
would if a single replica was running. Note the clock time between
events will be drawn from p(t).</p>
<p>The event number is a counter that increments with each event, whether
it is uncorrelated or correlated.</p>
<p>The correlation flag will be 0 when an uncorrelated event occurs
during the second stage of the loop listed above, i.e. when all
replicas are running independently. The correlation flag will be 1
when a correlated event occurs during the third stage of the loop
listed above, i.e. when only one replica is running dynamics.</p>
<p>When more than one replica detects an event at the end of the second
stage, then one of them is chosen at random. The number of coincident
events is the number of replicas that detected an event. Normally, we
expect this value to be 1. If it is often greater than 1, then either
the number of replicas is too large, or <em>t_event</em> is too large.</p>
<p>The replica number is the ID of the replica (from 0 to M-1) that
found the event.</p>
<hrclass="docutils"/>
<p>When running on multiple partitions, LAMMPS produces additional log
files for each partition, e.g. log.lammps.0, log.lammps.1, etc. For
the PRD command, these contain the thermodynamic output for each
replica. You will see short runs and minimizations corresponding to
the dynamics and quench operations of the loop listed above. The
timestep will be reset aprpopriately depending on whether the
operation advances time or not.</p>
<p>After the PRD command completes, timing statistics for the PRD run are
printed in each replica’s log file, giving a breakdown of how much CPU
time was spent in each stage (dephasing, dynamics, quenching, etc).</p>
<hrclass="docutils"/>
<p>Any <aclass="reference internal"href="dump.html"><em>dump files</em></a> defined in the input script, will be
written to during a PRD run at timesteps corresponding to both
uncorrelated and correlated events. This means the the requested dump
frequency in the <aclass="reference internal"href="dump.html"><em>dump</em></a> command is ignored. There will be
one dump file (per dump command) created for all partitions.</p>
<p>The atom coordinates of the dump snapshot are those of the minimum
energy configuration resulting from quenching following a transition
event. The timesteps written into the dump files correspond to the
timestep at which the event occurred and NOT the clock. A dump
snapshot corresponding to the initial minimum state used for event
detection is written to the dump file at the beginning of each PRD
run.</p>
<hrclass="docutils"/>
<p>If the <aclass="reference internal"href="restart.html"><em>restart</em></a> command is used, a single restart file
for all the partitions is generated, which allows a PRD run to be
continued by a new input script in the usual manner.</p>
<p>The restart file is generated at the end of the loop listed above. If
no correlated events are found, this means it contains a snapshot of
the system at time T + <em>t_correlate</em>, where T is the time at which the
uncorrelated event occurred. If correlated events were found, then it
contains a snapshot of the system at time T + <em>t_correlate</em>, where T
is the time of the last correlated event.</p>
<p>The restart frequency specified in the <aclass="reference internal"href="restart.html"><em>restart</em></a> command
is interpreted differently when performing a PRD run. It does not
mean the timestep interval between restart files. Instead it means an
event interval for uncorrelated events. Thus a frequency of 1 means
write a restart file every time an uncorrelated event occurs. A
frequency of 10 means write a restart file every 10th uncorrelated
event.</p>
<p>When an input script reads a restart file from a previous PRD run, the
new script can be run on a different number of replicas or processors.
However, it is assumed that <em>t_correlate</em> in the new PRD command is
the same as it was previously. If not, the calculation of the “clock”
value for the first event in the new run will be slightly off.</p>
</div>
<hrclass="docutils"/>
<divclass="section"id="restrictions">
<h2>Restrictions<aclass="headerlink"href="#restrictions"title="Permalink to this headline">¶</a></h2>
<p>This command can only be used if LAMMPS was built with the REPLICA
package. See the <aclass="reference internal"href="Section_start.html#start-3"><span>Making LAMMPS</span></a> section
for more info on packages.</p>
<p><em>N</em> and <em>t_correlate</em> settings must be integer multiples of
<em>t_event</em>.</p>
<p>Runs restarted from restart file written during a PRD run will not
produce identical results due to changes in the random numbers used
for dephasing.</p>
<p>This command cannot be used when any fixes are defined that keep track
of elapsed time to perform time-dependent operations. Examples
include the “ave” fixes such as <aclass="reference internal"href="fix_ave_spatial.html"><em>fix ave/spatial</em></a>. Also <aclass="reference internal"href="fix_dt_reset.html"><em>fix dt/reset</em></a> and <aclass="reference internal"href="fix_deposit.html"><em>fix deposit</em></a>.</p>
</div>
<divclass="section"id="related-commands">
<h2>Related commands<aclass="headerlink"href="#related-commands"title="Permalink to this headline">¶</a></h2>
Built with <ahref="http://sphinx-doc.org/">Sphinx</a> using a <ahref="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.