<li>ID, group-ID are documented in <a class="reference internal" href="fix.html"><span class="doc">fix</span></a> command</li>
<li>box/relax = style name of this fix command</li>
</ul>
<pre class="literal-block">
one or more keyword value pairs may be appended
keyword = <em>iso</em> or <em>aniso</em> or <em>tri</em> or <em>x</em> or <em>y</em> or <em>z</em> or <em>xy</em> or <em>yz</em> or <em>xz</em> or <em>couple</em> or <em>nreset</em> or <em>vmax</em> or <em>dilate</em> or <em>scaleyz</em> or <em>scalexz</em> or <em>scalexy</em> or <em>fixedpoint</em>
<em>iso</em> or <em>aniso</em> or <em>tri</em> value = Ptarget = desired pressure (pressure units)
<em>x</em> or <em>y</em> or <em>z</em> or <em>xy</em> or <em>yz</em> or <em>xz</em> value = Ptarget = desired pressure (pressure units)
<em>couple</em> = <em>none</em> or <em>xyz</em> or <em>xy</em> or <em>yz</em> or <em>xz</em>
<em>nreset</em> value = reset reference cell every this many minimizer iterations
<em>vmax</em> value = fraction = max allowed volume change in one iteration
<em>dilate</em> value = <em>all</em> or <em>partial</em>
<em>scaleyz</em> value = <em>yes</em> or <em>no</em> = scale yz with lz
<em>scalexz</em> value = <em>yes</em> or <em>no</em> = scale xz with lz
<em>scalexy</em> value = <em>yes</em> or <em>no</em> = scale xy with ly
<em>fixedpoint</em> values = x y z
x,y,z = perform relaxation dilation/contraction around this point (distance units)
<p>where <strong>I</strong> is the identity matrix, <strong>h</strong>_0 is the box dimension tensor of
the reference cell, and <strong>h</strong>_0<em>d</em> is the diagonal part of
<strong>h</strong>_0. <strong>S</strong>_<em>t</em> is a symmetric stress tensor that is chosen by LAMMPS
so that the upper-triangular components of <strong>P</strong> equal the stress tensor
specified by the user.</p>
<p>This equation only applies when the box dimensions are equal to those
of the reference dimensions. If this is not the case, then the
converged stress tensor will not equal that specified by the user. We
can resolve this problem by periodically resetting the reference
dimensions. The keyword <em>nreset_ref</em> controls how often this is done.
If this keyword is not used, or is given a value of zero, then the
reference dimensions are set to those of the initial simulation domain
and are never changed. A value of <em>nstep</em> means that every <em>nstep</em>
minimization steps, the reference dimensions are set to those of the
current simulation domain. Note that resetting the reference
dimensions changes the objective function and gradients, which
sometimes causes the minimization to fail. This can be resolved by
changing the value of <em>nreset</em>, or simply continuing the minimization
from a restart file.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">As normally computed, pressure includes a kinetic- energy or
temperature-dependent component; see the <a class="reference internal" href="compute_pressure.html"><span class="doc">compute pressure</span></a> command. However, atom velocities are
ignored during a minimization, and the applied pressure(s) specified
with this command are assumed to only be the virial component of the
pressure (the non-kinetic portion). Thus if atoms have a non-zero
temperature and you print the usual thermodynamic pressure, it may not
appear the system is converging to your specified pressure. The
solution for this is to either (a) zero the velocities of all atoms
before performing the minimization, or (b) make sure you are
monitoring the pressure without its kinetic component. The latter can
be done by outputting the pressure from the fix this command creates
(see below) or a pressure fix you define yourself.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Because pressure is often a very sensitive function of volume,
it can be difficult for the minimizer to equilibrate the system the
desired pressure with high precision, particularly for solids. Some
techniques that seem to help are (a) use the “min_modify line
quadratic” option when minimizing with box relaxations, (b) minimize
several times in succession if need be, to drive the pressure closer
to the target pressure, (c) relax the atom positions before relaxing
the box, and (d) relax the box to the target hydrostatic pressure
before relaxing to a target shear stress state. Also note that some
systems (e.g. liquids) will not sustain a non-hydrostatic applied
pressure, which means the minimizer will not converge.</p>
</div>
<hr class="docutils" />
<p>This fix computes a temperature and pressure each timestep. The
temperature is used to compute the kinetic contribution to the
pressure, even though this is subsequently ignored by default. To do
this, the fix creates its own computes of style “temp” and “pressure”,
<p>See the <a class="reference internal" href="compute_temp.html"><span class="doc">compute temp</span></a> and <a class="reference internal" href="compute_pressure.html"><span class="doc">compute pressure</span></a> commands for details. Note that the
IDs of the new computes are the fix-ID + underscore + “temp” or fix_ID
+ underscore + “press”, and the group for the new computes is the same
as the fix group. Also note that the pressure compute does not
include a kinetic component.</p>
<p>Note that these are NOT the computes used by thermodynamic output (see
the <a class="reference internal" href="thermo_style.html"><span class="doc">thermo_style</span></a> command) with ID = <em>thermo_temp</em>
and <em>thermo_press</em>. This means you can change the attributes of this
fix’s temperature or pressure via the
<a class="reference internal" href="compute_modify.html"><span class="doc">compute_modify</span></a> command or print this temperature
or pressure during thermodynamic output via the <a class="reference internal" href="thermo_style.html"><span class="doc">thermo_style custom</span></a> command using the appropriate compute-ID.
It also means that changing attributes of <em>thermo_temp</em> or
<em>thermo_press</em> will have no effect on this fix.</p>
<hr class="docutils" />
<p><strong>Restart, fix_modify, output, run start/stop, minimize info:</strong></p>
<p>No information about this fix is written to <a class="reference internal" href="restart.html"><span class="doc">binary restart files</span></a>.</p>
<p>The <a class="reference internal" href="fix_modify.html"><span class="doc">fix_modify</span></a> <em>temp</em> and <em>press</em> options are
supported by this fix. You can use them to assign a
<a class="reference internal" href="compute.html"><span class="doc">compute</span></a> you have defined to this fix which will be used
in its temperature and pressure calculation, as described above. Note
that as described above, if you assign a pressure compute to this fix
that includes a kinetic energy component it will affect the
minimization, most likely in an undesirable way.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If both the <em>temp</em> and <em>press</em> keywords are used in a single
thermo_modify command (or in two separate commands), then the order in
which the keywords are specified is important. Note that a <a class="reference internal" href="compute_pressure.html"><span class="doc">pressure compute</span></a> defines its own temperature compute as
an argument when it is specified. The <em>temp</em> keyword will override
this (for the pressure compute being used by fix npt), but only if the
<em>temp</em> keyword comes after the <em>press</em> keyword. If the <em>temp</em> keyword
comes before the <em>press</em> keyword, then the new pressure compute
specified by the <em>press</em> keyword will be unaffected by the <em>temp</em>
setting.</p>
</div>
<p>This fix computes a global scalar which can be accessed by various
<a class="reference internal" href="Section_howto.html#howto-15"><span class="std std-ref">output commands</span></a>. The scalar is the
pressure-volume energy, plus the strain energy, if it exists.</p>
<p>This fix computes a global scalar which can be accessed by various
<a class="reference internal" href="Section_howto.html#howto-15"><span class="std std-ref">output commands</span></a>. The scalar is given
by the energy expression shown above. The energy values reported
at the end of a minimization run under “Minimization stats” include
this energy, and so differ from what LAMMPS normally reports as
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.