<h2>Description<aclass="headerlink"href="#description"title="Permalink to this headline">¶</a></h2>
<p>Run a parallel tempering or replica exchange simulation using multiple
replicas (ensembles) of a system. Two or more replicas must be used.</p>
<p>Each replica runs on a partition of one or more processors. Processor
partitions are defined at run-time using the -partition command-line
switch; see <aclass="reference internal"href="Section_start.html#start-7"><span>Section_start 6</span></a> of the
manual. Note that if you have MPI installed, you can run a
multi-replica simulation with more replicas (partitions) than you have
physical processors, e.g you can run a 10-replica simulation on one or
two processors. You will simply not get the performance speed-up you
would see with one or more physical processors per replica. See <aclass="reference internal"href="Section_howto.html#howto-5"><span>this section</span></a> of the manual for further
discussion.</p>
<p>Each replica’s temperature is controlled at a different value by a fix
with <em>fix-ID</em> that controls temperature. Possible fix styles are
<aclass="reference internal"href="fix_langevin.html"><em>langevin</em></a> and <aclass="reference internal"href="fix_temp_rescale.html"><em>temp/rescale</em></a>.
The desired temperature is specified by <em>temp</em>, which is typically a
variable previously set in the input script, so that each partition is
assigned a different temperature. See the <aclass="reference internal"href="variable.html"><em>variable</em></a>
command for more details. For example:</p>
<divclass="highlight-python"><divclass="highlight"><pre>variable t world 300.0 310.0 320.0 330.0
fix myfix all nvt temp $t $t 100.0
temper 100000 100 $t myfix 3847 58382
</pre></div>
</div>
<p>would define 4 temperatures, and assign one of them to the thermostat
used by each replica, and to the temper command.</p>
<p>As the tempering simulation runs for <em>N</em> timesteps, a temperature swap
between adjacent ensembles will be attempted every <em>M</em> timesteps. If
<em>seed1</em> is 0, then the swap attempts will alternate between odd and
even pairings. If <em>seed1</em> 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 Boltzmann-weighted Metropolis criterion which uses
<em>seed2</em> in the random number generator.</p>
<p>As a tempering run proceeds, multiple log files and screen output
files are created, one per replica. By default these files are named
log.lammps.M and screen.M where M is the replica number from 0 to N-1,
with N = # of replicas. See the <aclass="reference internal"href="Section_start.html#start-7"><span>section on command-line switches</span></a> for info on how to change these
names.</p>
<p>The main screen and log file (log.lammps) will list information about
which temperature is assigned to each replica at each thermodynamic
output timestep. E.g. for a simulation with 16 replicas:</p>
<divclass="highlight-python"><divclass="highlight"><pre>Running on 16 partitions of processors
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>.