forked from lijiext/lammps
546 lines
28 KiB
HTML
546 lines
28 KiB
HTML
<HTML>
|
|
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
|
|
</CENTER>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<HR>
|
|
|
|
<H3>fix nvt command
|
|
</H3>
|
|
<H3>fix nvt/cuda command
|
|
</H3>
|
|
<H3>fix npt command
|
|
</H3>
|
|
<H3>fix npt/cuda command
|
|
</H3>
|
|
<H3>fix nph command
|
|
</H3>
|
|
<P><B>Syntax:</B>
|
|
</P>
|
|
<PRE>fix ID group-ID style_name keyword value ...
|
|
</PRE>
|
|
<UL><LI>ID, group-ID are documented in <A HREF = "fix.html">fix</A> command
|
|
|
|
<LI>style_name = <I>nvt</I> or <I>npt</I> or <I>nph</I>
|
|
|
|
<PRE>one or more keyword value pairs may be appended
|
|
keyword = <I>temp</I> or <I>iso</I> or <I>aniso</I> or <I>tri</I> or <I>x</I> or <I>y</I> or <I>z</I> or <I>xy</I> or <I>yz</I> or <I>xz</I> or <I>couple</I> or <I>tchain</I> or <I>pchain</I> or <I>mtk</I> or <I>tloop</I> or <I>ploop</I> or <I>nreset</I> or <I>drag</I> or <I>dilate</I> or <I>scaleyz</I> or <I>scalexz</I> or <I>scalexy</I>
|
|
<I>temp</I> values = Tstart Tstop Tdamp
|
|
Tstart,Tstop = external temperature at start/end of run
|
|
Tdamp = temperature damping parameter (time units)
|
|
<I>iso</I> or <I>aniso</I> or <I>tri</I> values = Pstart Pstop Pdamp
|
|
Pstart,Pstop = scalar external pressure at start/end of run (pressure units)
|
|
Pdamp = pressure damping parameter (time units)
|
|
<I>x</I> or <I>y</I> or <I>z</I> or <I>xy</I> or <I>yz</I> or <I>xz</I> values = Pstart Pstop Pdamp
|
|
Pstart,Pstop = external stress tensor component at start/end of run (pressure units)
|
|
Pdamp = stress damping parameter (time units)
|
|
<I>couple</I> = <I>none</I> or <I>xyz</I> or <I>xy</I> or <I>yz</I> or <I>xz</I>
|
|
<I>tchain</I> value = length of thermostat chain (1 = single thermostat)
|
|
<I>pchain</I> values = length of thermostat chain on barostat (0 = no thermostat)
|
|
<I>mtk</I> value = <I>yes</I> or <I>no</I> = add in MTK adjustment term or not
|
|
<I>tloop</I> value = number of sub-cycles to perform on thermostat
|
|
<I>ploop</I> value = number of sub-cycles to perform on barostat thermostat
|
|
<I>nreset</I> value = reset reference cell every this many timesteps
|
|
<I>drag</I> value = drag factor added to barostat/thermostat (0.0 = no drag)
|
|
<I>dilate</I> value = <I>all</I> or <I>partial</I>
|
|
<I>scaleyz</I> value = <I>yes</I> or <I>no</I> = scale yz with lz
|
|
<I>scalexz</I> value = <I>yes</I> or <I>no</I> = scale xz with lz
|
|
<I>scalexy</I> value = <I>yes</I> or <I>no</I> = scale xy with ly
|
|
</PRE>
|
|
|
|
</UL>
|
|
<P><B>Examples:</B>
|
|
</P>
|
|
<PRE>fix 1 all nvt temp 300.0 300.0 100.0
|
|
fix 1 water npt temp 300.0 300.0 100.0 iso 0.0 0.0 1000.0
|
|
fix 2 jello npt temp 300.0 300.0 100.0 tri 5.0 5.0 1000.0
|
|
fix 2 ice nph x 1.0 1.0 0.5 y 2.0 2.0 0.5 z 3.0 3.0 0.5 yz 0.1 0.1 0.5 xz 0.2 0.2 0.5 xy 0.3 0.3 0.5 nreset 1000
|
|
</PRE>
|
|
<P><B>Description:</B>
|
|
</P>
|
|
<P>These commands perform time integration on Nose-Hoover style
|
|
non-Hamiltonian equations of motion which are designed to generate
|
|
positions and velocities sampled from the canonical (nvt),
|
|
isothermal-isobaric (npt), and isenthalpic (nph) ensembles. This is
|
|
achieved by adding some dynamic variables which are coupled to the
|
|
particle velocities (thermostatting) and simulation domain dimensions
|
|
(barostatting). In addition to basic thermostatting and barostatting,
|
|
these fixes can also create a chain of thermostats coupled to the
|
|
particle thermostat, and another chain of thermostats coupled to the
|
|
barostat variables. The barostat can be coupled to the overall box
|
|
volume, or to individual dimensions, including the <I>xy</I>, <I>xz</I> and <I>yz</I>
|
|
tilt dimensions. The external pressure of the barostat can be
|
|
specified as either a scalar pressure (isobaric ensemble) or as
|
|
components of a symmetric stress tensor (constant stress ensemble).
|
|
When used correctly, the time-averaged temperature and stress tensor
|
|
of the particles will match the target values specified by
|
|
Tstart/Tstop and Pstart/Pstop.
|
|
</P>
|
|
<P>The equations of motion used are those of Shinoda et al. in
|
|
<A HREF = "#Shinoda">(Shinoda)</A>, which combine the hydrostatic equations of
|
|
Martyna, Tobias and Klein in <A HREF = "#Martyna">(Martyna)</A> with the strain
|
|
energy proposed by Parrinello and Rahman in
|
|
<A HREF = "#Parrinello">(Parrinello)</A>. The time integration schemes closely
|
|
follow the time-reversible measure-preserving Verlet and
|
|
rRESPA integrators derived by Tuckerman et al. in <A HREF = "#Tuckerman">(Tuckerman)</A>.
|
|
</P>
|
|
<HR>
|
|
|
|
<P>The thermostat for fix styles <I>nvt</I> and <I>npt</I> is specified using the
|
|
<I>temp</I> keyword. Other thermostat-related keywords are <I>tchain</I>,
|
|
<I>tloop</I> and <I>drag</I>, which are discussed below.
|
|
</P>
|
|
<P>The thermostat is applied to only the translational degrees of freedom
|
|
for the particles. The translational degrees of freedom can also have
|
|
a bias velocity removed before thermostatting takes place; see the
|
|
description below. The desired temperature at each timestep is a
|
|
ramped value during the run from <I>Tstart</I> to <I>Tstop</I>. The <I>Tdamp</I>
|
|
parameter is specified in time units and determines how rapidly the
|
|
temperature is relaxed. For example, a value of 10.0 means to relax
|
|
the temperature in a timespan of (roughly) 10 time units (e.g. tau or
|
|
fmsec or psec - see the <A HREF = "units.html">units</A> command). The atoms in the
|
|
fix group are the only ones whose velocities and positions are updated
|
|
by the velocity/position update portion of the integration.
|
|
</P>
|
|
<P>IMPORTANT NOTE: A Nose-Hoover thermostat will not work well for
|
|
arbitrary values of <I>Tdamp</I>. If <I>Tdamp</I> is too small, the temperature
|
|
can fluctuate wildly; if it is too large, the temperature will take a
|
|
very long time to equilibrate. A good choice for many models is a
|
|
<I>Tdamp</I> of around 100 timesteps. Note that this is NOT the same as
|
|
100 time units for most <A HREF = "units.html">units</A> settings.
|
|
</P>
|
|
<HR>
|
|
|
|
<P>The barostat for fix styles <I>npt</I> and <I>nph</I> is specified using one or
|
|
more of the <I>iso</I>, <I>aniso</I>, <I>tri</I>, <I>x</I>, <I>y</I>, <I>z</I>, <I>xy</I>, <I>xz</I>, <I>yz</I>,
|
|
and <I>couple</I> keywords. These keywords give you the ability to specify
|
|
all 6 components of an external stress tensor, and to couple various
|
|
of these components together so that the dimensions they represent are
|
|
varied together during a constant-pressure simulation.
|
|
</P>
|
|
<P>Other barostat-related keywords are <I>pchain</I>, <I>mtk</I>, <I>ploop</I>,
|
|
<I>nreset</I>, <I>drag</I>, and <I>dilate</I>, which are discussed below.
|
|
</P>
|
|
<P>Orthogonal simulation boxes have 3 adjustable dimensions (x,y,z).
|
|
Triclinic (non-orthogonal) simulation boxes have 6 adjustable
|
|
dimensions (x,y,z,xy,xz,yz). The <A HREF = "create_box.html">create_box</A>, <A HREF = "read_data.html">read
|
|
data</A>, and <A HREF = "read_restart.html">read_restart</A> commands
|
|
specify whether the simulation box is orthogonal or non-orthogonal
|
|
(triclinic) and explain the meaning of the xy,xz,yz tilt factors.
|
|
</P>
|
|
<P>The target pressures for each of the 6 components of the stress tensor
|
|
can be specified independently via the <I>x</I>, <I>y</I>, <I>z</I>, <I>xy</I>, <I>xz</I>, <I>yz</I>
|
|
keywords, which correspond to the 6 simulation box dimensions. For
|
|
each component, the external pressure or tensor component at each
|
|
timestep is a ramped value during the run from <I>Pstart</I> to <I>Pstop</I>.
|
|
If a target pressure is specified for a component, then the
|
|
corresponding box dimension will change during a simulation. For
|
|
example, if the <I>y</I> keyword is used, the y-box length will change. If
|
|
the <I>xy</I> keyword is used, the xy tilt factor will change. A box
|
|
dimension will not change if that component is not specified, although
|
|
you have the option to change that dimension via the <A HREF = "fix_deform.html">fix
|
|
deform</A> command.
|
|
</P>
|
|
<P>Note that in order to use the <I>xy</I>, <I>xz</I>, or <I>yz</I> keywords, the
|
|
simulation box must be triclinic, even if its initial tilt factors are
|
|
0.0.
|
|
</P>
|
|
<P>For all barostat keywords, the <I>Pdamp</I> parameter operates like the
|
|
<I>Tdamp</I> parameter, determining the time scale on which pressure is
|
|
relaxed. For example, a value of 10.0 means to relax the pressure in
|
|
a timespan of (roughly) 10 time units (e.g. tau or fmsec or psec - see
|
|
the <A HREF = "units.html">units</A> command).
|
|
</P>
|
|
<P>IMPORTANT NOTE: A Nose-Hoover barostat will not work well for
|
|
arbitrary values of <I>Pdamp</I>. If <I>Pdamp</I> is too small, the pressure
|
|
and volume can fluctuate wildly; if it is too large, the pressure will
|
|
take a very long time to equilibrate. A good choice for many models
|
|
is a <I>Pdamp</I> of around 1000 timesteps. Note that this is NOT the same
|
|
as 1000 time units for most <A HREF = "units.html">units</A> settings.
|
|
</P>
|
|
<P>Regardless of what atoms are in the fix group, a global pressure or
|
|
stress tensor is computed for all atoms. Similarly, when the size of
|
|
the simulation box is changed, all atoms are re-scaled to new
|
|
positions, unless the keyword <I>dilate</I> is specified with a value of
|
|
<I>partial</I>, in which case only the atoms in the fix group are
|
|
re-scaled. The latter can be useful for leaving the coordinates of
|
|
atoms in a solid substrate unchanged and controlling the pressure of a
|
|
surrounding fluid.
|
|
</P>
|
|
<HR>
|
|
|
|
<P>The <I>couple</I> keyword allows two or three of the diagonal components of
|
|
the pressure tensor to be "coupled" together. The value specified
|
|
with the keyword determines which are coupled. For example, <I>xz</I>
|
|
means the <I>Pxx</I> and <I>Pzz</I> components of the stress tensor are coupled.
|
|
<I>Xyz</I> means all 3 diagonal components are coupled. Coupling means two
|
|
things: the instantaneous stress will be computed as an average of the
|
|
corresponding diagonal components, and the coupled box dimensions will
|
|
be changed together in lockstep, meaning coupled dimensions will be
|
|
dilated or contracted by the same percentage every timestep. The
|
|
<I>Pstart</I>, <I>Pstop</I>, <I>Pdamp</I> parameters for any coupled dimensions must
|
|
be identical. <I>Couple xyz</I> can be used for a 2d simulation; the <I>z</I>
|
|
dimension is simply ignored.
|
|
</P>
|
|
<HR>
|
|
|
|
<P>The <I>iso</I>, <I>aniso</I>, and <I>tri</I> keywords are simply shortcuts that are
|
|
equivalent to specifying several other keywords together.
|
|
</P>
|
|
<P>The keyword <I>iso</I> means couple all 3 diagonal components together when
|
|
pressure is computed (hydrostatic pressure), and dilate/contract the
|
|
dimensions together. Using "iso Pstart Pstop Pdamp" is the same as
|
|
specifying these 4 keywords:
|
|
</P>
|
|
<PRE>x Pstart Pstop Pdamp
|
|
y Pstart Pstop Pdamp
|
|
z Pstart Pstop Pdamp
|
|
couple xyz
|
|
</PRE>
|
|
<P>The keyword <I>aniso</I> means <I>x</I>, <I>y</I>, and <I>z</I> dimensions are controlled
|
|
independently using the <I>Pxx</I>, <I>Pyy</I>, and <I>Pzz</I> components of the
|
|
stress tensor as the driving forces, and the specified scalar external
|
|
pressure. Using "aniso Pstart Pstop Pdamp" is the same as specifying
|
|
these 4 keywords:
|
|
</P>
|
|
<PRE>x Pstart Pstop Pdamp
|
|
y Pstart Pstop Pdamp
|
|
z Pstart Pstop Pdamp
|
|
couple none
|
|
</PRE>
|
|
<P>The keyword <I>tri</I> means <I>x</I>, <I>y</I>, <I>z</I>, <I>xy</I>, <I>xz</I>, and <I>yz</I> dimensions
|
|
are controlled independently using their individual stress components
|
|
as the driving forces, and the specified scalar pressure as the
|
|
external normal stress. Using "tri Pstart Pstop Pdamp" is the same as
|
|
specifying these 7 keywords:
|
|
</P>
|
|
<PRE>x Pstart Pstop Pdamp
|
|
y Pstart Pstop Pdamp
|
|
z Pstart Pstop Pdamp
|
|
xy 0.0 0.0 Pdamp
|
|
yz 0.0 0.0 Pdamp
|
|
xz 0.0 0.0 Pdamp
|
|
couple none
|
|
</PRE>
|
|
<HR>
|
|
|
|
<P>In some cases (e.g. for solids) the pressure (volume) and/or
|
|
temperature of the system can oscillate undesirably when a Nose/Hoover
|
|
barostat and thermostat is applied. The optional <I>drag</I> keyword will
|
|
damp these oscillations, although it alters the Nose/Hoover equations.
|
|
A value of 0.0 (no drag) leaves the Nose/Hoover formalism unchanged.
|
|
A non-zero value adds a drag term; the larger the value specified, the
|
|
greater the damping effect. Performing a short run and monitoring the
|
|
pressure and temperature is the best way to determine if the drag term
|
|
is working. Typically a value between 0.2 to 2.0 is sufficient to
|
|
damp oscillations after a few periods. Note that use of the drag
|
|
keyword will interfere with energy conservation and will also change
|
|
the distribution of positions and velocities so that they do not
|
|
correspond to the nominal NVT, NPT, or NPH ensembles.
|
|
</P>
|
|
<P>An alternative way to control initial oscillations is to use chain
|
|
thermostats. The keyword <I>tchain</I> determines the number of thermostats
|
|
in the particle thermostat. A value of 1 corresponds to the original
|
|
Nose-Hoover thermostat. The keyword <I>pchain</I> specifies the number of
|
|
thermostats in the chain thermostatting the barostat degrees of
|
|
freedom. A value of 0 corresponds to no thermostatting of the
|
|
barostat variables.
|
|
</P>
|
|
<P>The <I>mtk</I> keyword controls whether or not the correction terms due to
|
|
Martyna, Tuckerman, and Klein are included in the equations of motion
|
|
<A HREF = "#Martyna">(Martyna)</A>. Specifying <I>no</I> reproduces the original
|
|
Hoover barostat, whose volume probability distribution function
|
|
differs from the true NPT and NPH ensembles by a factor of 1/V. Hence
|
|
using <I>yes</I> is more correct, but in many cases the difference is
|
|
negligible.
|
|
</P>
|
|
<P>The keyword <I>tloop</I> can be used to improve the accuracy of integration
|
|
scheme at little extra cost. The initial and final updates of the
|
|
thermostat variables are broken up into <I>tloop</I> substeps, each of
|
|
length <I>dt</I>/<I>tloop</I>. This corresponds to using a first-order
|
|
Suzuki-Yoshida scheme <A HREF = "#Tuckerman2006">(Tuckerman2006)</A>. The keyword
|
|
<I>ploop</I> does the same thing for the barostat thermostat.
|
|
</P>
|
|
<P>The keyword <I>nreset</I> controls how often the reference dimensions used
|
|
to define the strain energy are reset. 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. If the
|
|
simulation domain changes significantly during the simulation, then
|
|
the final average pressure tensor will differ significantly from the
|
|
specified values of the external stress tensor. A value of <I>nstep</I>
|
|
means that every <I>nstep</I> timesteps, the reference dimensions are set
|
|
to those of the current simulation domain.
|
|
</P>
|
|
<P>The <I>scaleyz</I>, <I>scalexz</I>, and <I>scalexy</I> keywords control whether or
|
|
not the corresponding tilt factors are scaled with the
|
|
associated box dimensions
|
|
when barostatting triclinic periodic cells.
|
|
The default values <I>yes</I> will turn on scaling, which corresponds to
|
|
adjusting the linear dimensions of the cell while preserving its shape.
|
|
Choosing <I>no</I> ensures that the tilt factors are not scaled with the
|
|
box dimensions. See below for restrictions and default values in different
|
|
situations. In older versions of LAMMPS, scaling of tilt factors was not
|
|
performed. The old behavior can be recovered by setting all three
|
|
scale keywords to <I>no</I>.
|
|
</P>
|
|
<HR>
|
|
|
|
<P>IMPORTANT NOTE: Using a barostat coupled to tilt dimensions <I>xy</I>,
|
|
<I>xz</I>, <I>yz</I> can sometimes result in arbitrarily large values of the
|
|
tilt dimensions, i.e. a dramatically deformed simulation box. LAMMPS
|
|
allows the tilt factors to grow a little beyond the normal limit
|
|
of half the box length (0.6 times the box length), and then performs
|
|
flipping or re-shaping to an equivalent periodic cell. The re-shaping
|
|
operation is described in more detail in the doc page for
|
|
<A HREF = "fix_deform.html">fix deform</A>. Both the barostat dynamics and
|
|
the atom trajectories are unaffected by this operation. However,
|
|
if a tilt factor is incremented by a large amount (1.5 times the
|
|
box length) on a single timestep, LAMMPS can not accomodate
|
|
this event and will terminate the simulation
|
|
with an error. This error typically
|
|
indicates that there is something badly wrong with how the simulation
|
|
was constructed, such as specifying values of <I>Pstart</I> that are
|
|
too far from the current stress value, or specifying a timestep that
|
|
is too large. Triclinic barostatting should be used with
|
|
care. This also is true for other barostat styles, although they tend
|
|
to be more forgiving of insults. In particular, it is important to
|
|
recognize that equilibrium liquids can not support a shear stress and
|
|
that equilibrium solids can not support shear stresses that exceed the yield stress.
|
|
</P>
|
|
<P>IMPORTANT NOTE: Unlike the <A HREF = "fix_temp_berendsen.html">fix
|
|
temp/berendsen</A> command which performs
|
|
thermostatting but NO time integration, these fixes perform
|
|
thermostatting/barostatting AND time integration. Thus you should not
|
|
use any other time integration fix, such as <A HREF = "fix_nve.html">fix nve</A> on
|
|
atoms to which this fix is applied. Likewise, the <I>temp</I> options for
|
|
fix nvt and fix npt should not normally be used on atoms that also
|
|
have their temperature controlled by another fix - e.g. by <A HREF = "fix_nh.html">fix
|
|
langevin</A> or <A HREF = "fix_temp_rescale.html">fix temp/rescale</A>
|
|
commands.
|
|
</P>
|
|
<P>See <A HREF = "Section_howto.html#howto_16">this howto section</A> of the manual for
|
|
a discussion of different ways to compute temperature and perform
|
|
thermostatting and barostatting.
|
|
</P>
|
|
<HR>
|
|
|
|
<P>These fixes compute a temperature and pressure each timestep. To do
|
|
this, the fix creates its own computes of style "temp" and "pressure",
|
|
as if one of these two sets of commands had been issued:
|
|
</P>
|
|
<PRE>compute fix-ID_temp group-ID temp
|
|
compute fix-ID_press group-ID pressure fix-ID_temp
|
|
</PRE>
|
|
<PRE>compute fix-ID_temp all temp
|
|
compute fix-ID_press all pressure fix-ID_temp
|
|
</PRE>
|
|
<P>See the <A HREF = "compute_temp.html">compute temp</A> and <A HREF = "compute_pressure.html">compute
|
|
pressure</A> commands for details. Note that the
|
|
IDs of the new computes are the fix-ID + underscore + "temp" or fix_ID
|
|
+ underscore + "press". For fix nvt, the group for the new computes
|
|
is the same as the fix group. For fix nph and fix npt, the group for
|
|
the new computes is "all" since pressure is computed for the entire
|
|
system.
|
|
</P>
|
|
<P>Note that these are NOT the computes used by thermodynamic output (see
|
|
the <A HREF = "thermo_style.html">thermo_style</A> command) with ID = <I>thermo_temp</I>
|
|
and <I>thermo_press</I>. This means you can change the attributes of this
|
|
fix's temperature or pressure via the
|
|
<A HREF = "compute_modify.html">compute_modify</A> command or print this temperature
|
|
or pressure during thermodynamic output via the <A HREF = "thermo_style.html">thermo_style
|
|
custom</A> command using the appropriate compute-ID.
|
|
It also means that changing attributes of <I>thermo_temp</I> or
|
|
<I>thermo_press</I> will have no effect on this fix.
|
|
</P>
|
|
<P>Like other fixes that perform thermostatting, fix nvt and fix npt can
|
|
be used with <A HREF = "compute.html">compute commands</A> that calculate a
|
|
temperature after removing a "bias" from the atom velocities.
|
|
E.g. removing the center-of-mass velocity from a group of atoms or
|
|
only calculating temperature on the x-component of velocity or only
|
|
calculating temperature for atoms in a geometric region. This is not
|
|
done by default, but only if the <A HREF = "fix_modify.html">fix_modify</A> command
|
|
is used to assign a temperature compute to this fix that includes such
|
|
a bias term. See the doc pages for individual <A HREF = "compute.html">compute
|
|
commands</A> to determine which ones include a bias. In
|
|
this case, the thermostat works in the following manner: the current
|
|
temperature is calculated taking the bias into account, bias is
|
|
removed from each atom, thermostatting is performed on the remaining
|
|
thermal degrees of freedom, and the bias is added back in.
|
|
</P>
|
|
<HR>
|
|
|
|
<P>Styles with a <I>cuda</I> suffix are functionally the same as the
|
|
corresponding style without the suffix. They have been optimized to
|
|
run faster, depending on your available hardware, as discussed in
|
|
<A HREF = "Section_accelerate.html">Section_accelerate</A> of the manual. The
|
|
accelerated styles take the same arguments and should produce the same
|
|
results, except for round-off and precision issues.
|
|
</P>
|
|
<P>These accelerated styles are part of the USER-CUDA package. They are
|
|
only enabled if LAMMPS was built with that package. See the <A HREF = "Section_start.html#start_3">Making
|
|
LAMMPS</A> section for more info.
|
|
</P>
|
|
<P>You can specify the accelerated styles explicitly in your input script
|
|
by including their suffix, or you can use the <A HREF = "Section_start.html#start_7">-suffix command-line
|
|
switch</A> when you invoke LAMMPS, or you can
|
|
use the <A HREF = "suffix.html">suffix</A> command in your input script.
|
|
</P>
|
|
<P>See <A HREF = "Section_accelerate.html">Section_accelerate</A> of the manual for
|
|
more instructions on how to use the accelerated styles effectively.
|
|
</P>
|
|
<HR>
|
|
|
|
<P><B>Restart, fix_modify, output, run start/stop, minimize info:</B>
|
|
</P>
|
|
<P>These fixes writes the state of all the thermostat and barostat
|
|
variables to <A HREF = "restart.html">binary restart files</A>. See the
|
|
<A HREF = "read_restart.html">read_restart</A> command for info on how to re-specify
|
|
a fix in an input script that reads a restart file, so that the
|
|
operation of the fix continues in an uninterrupted fashion.
|
|
</P>
|
|
<P>The <A HREF = "fix_modify.html">fix_modify</A> <I>temp</I> and <I>press</I> options are
|
|
supported by these fixes. You can use them to assign a
|
|
<A HREF = "compute.html">compute</A> you have defined to this fix which will be used
|
|
in its thermostatting or barostatting procedure, as described above.
|
|
If you do this, note that the kinetic energy derived from the compute
|
|
temperature should be consistent with the virial term computed using
|
|
all atoms for the pressure. LAMMPS will warn you if you choose to
|
|
compute temperature on a subset of atoms.
|
|
</P>
|
|
<P>IMPORTANT NOTE: If both the <I>temp</I> and <I>press</I> 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 HREF = "compute_pressure.html">pressure compute</A> defines its own temperature
|
|
compute as an argument when it is specified. The <I>temp</I> keyword will
|
|
override this (for the pressure compute being used by fix npt), but
|
|
only if the <I>temp</I> keyword comes after the <I>press</I> keyword. If the
|
|
<I>temp</I> keyword comes before the <I>press</I> keyword, then the new pressure
|
|
compute specified by the <I>press</I> keyword will be unaffected by the
|
|
<I>temp</I> setting.
|
|
</P>
|
|
<P>The <A HREF = "fix_modify.html">fix_modify</A> <I>energy</I> option is supported by these
|
|
fixes to add the energy change induced by Nose/Hoover thermostatting
|
|
and barostatting to the system's potential energy as part of
|
|
<A HREF = "thermo_style.html">thermodynamic output</A>.
|
|
</P>
|
|
<P>These fixes compute a global scalar and a global vector of quantities,
|
|
which can be accessed by various <A HREF = "Section_howto.html#howto_15">output
|
|
commands</A>. The scalar value calculated by
|
|
these fixes is "extensive"; the vector values are "intensive".
|
|
</P>
|
|
<P>The scalar is the cumulative energy change due to the fix.
|
|
</P>
|
|
<P>The vector stores internal Nose/Hoover thermostat and barostat
|
|
variables. The number and meaning of the vector values depends on
|
|
which fix is used and the settings for keywords <I>tchain</I> and <I>pchain</I>,
|
|
which specify the number of Nose/Hoover chains for the thermostat and
|
|
barostat. If no thermostatting is done, then <I>tchain</I> is 0. If no
|
|
barostatting is done, then <I>pchain</I> is 0. In the following list,
|
|
"ndof" is 0, 1, 3, or 6, and is the number of degrees of freedom in
|
|
the barostat. Its value is 0 if no barostat is used, else its value
|
|
is 6 if any off-diagonal stress tensor component is barostatted, else
|
|
its value is 1 if <I>couple xyz</I> is used or <I>couple xy</I> for a 2d
|
|
simulation, otherwise its value is 3.
|
|
</P>
|
|
<P>The order of values in the global vector and their meaning is as
|
|
follows. The notation means there are tchain values for eta, followed
|
|
by tchain for eta_dot, followed by ndof for omega, etc:
|
|
</P>
|
|
<UL><LI>eta[tchain] = particle thermostat displacements (unitless)
|
|
<LI>eta_dot[tchain] = particle thermostat velocities (1/time units)
|
|
<LI>omega[ndof] = barostat displacements (unitless)
|
|
<LI>omega_dot[ndof] = barostat velocities (1/time units)
|
|
<LI>etap[pchain] = barostat thermostat displacements (unitless)
|
|
<LI>etap_dot[pchain] = barostat thermostat velocities (1/time units)
|
|
<LI>PE_eta[tchain] = potential energy of each particle thermostat displacement (energy units)
|
|
<LI>KE_eta_dot[tchain] = kinetic energy of each particle thermostat velocity (energy units)
|
|
<LI>PE_omega[ndof] = potential energy of each barostat displacement (energy units)
|
|
<LI>KE_omega_dot[ndof] = kinetic energy of each barostat velocity (energy units)
|
|
<LI>PE_etap[pchain] = potential energy of each barostat thermostat displacement (energy units)
|
|
<LI>KE_etap_dot[pchain] = kinetic energy of each barostat thermostat velocity (energy units)
|
|
<LI>PE_strain[1] = scalar strain energy (energy units)
|
|
</UL>
|
|
<P>These fixes can ramp their external temperature and pressure over
|
|
multiple runs, using the <I>start</I> and <I>stop</I> keywords of the
|
|
<A HREF = "run.html">run</A> command. See the <A HREF = "run.html">run</A> command for details of
|
|
how to do this.
|
|
</P>
|
|
<P>These fixes are not invoked during <A HREF = "minimize.html">energy
|
|
minimization</A>.
|
|
</P>
|
|
<P>These fixes can be used with either the <I>verlet</I> or <I>respa</I>
|
|
<A HREF = "run_style.html">integrators</A>. When using one of the barostat fixes
|
|
with <I>respa</I>, LAMMPS uses an integrator constructed
|
|
according to the following factorization of the Liouville propagator
|
|
(for two rRESPA levels):
|
|
</P>
|
|
<CENTER><IMG SRC = "Eqs/fix_nh1.jpg">
|
|
</CENTER>
|
|
<P>This factorization differs somewhat from that of Tuckerman et al., in that
|
|
the barostat is only updated at the outermost rRESPA level, whereas
|
|
Tuckerman's factorization requires splitting the pressure into pieces
|
|
corresponding to the forces computed at each rRESPA level. In theory, the
|
|
latter method will exhibit better numerical stability. In practice,
|
|
because Pdamp is normally chosen to be a large multiple of the
|
|
outermost rRESPA timestep, the barostat dynamics are not the
|
|
limiting factor for numerical stability. Both
|
|
factorizations are time-reversible and can be shown to preserve the phase
|
|
space measure of the underlying non-Hamiltonian equations of motion.
|
|
</P>
|
|
<P><B>Restrictions:</B>
|
|
</P>
|
|
<P>Non-periodic dimensions cannot be barostatted. <I>Z</I>, <I>xz</I>, and <I>yz</I>,
|
|
cannot be barostatted 2D simulations. <I>Xy</I>, <I>xz</I>, and <I>yz</I> can only
|
|
be barostatted if the simulation domain is triclinic and the 2nd
|
|
dimension in the keyword (<I>y</I> dimension in <I>xy</I>) is periodic. The
|
|
<A HREF = "create_box.html">create_box</A>, <A HREF = "read_data.html">read data</A>, and
|
|
<A HREF = "read_restart.html">read_restart</A> commands specify whether the
|
|
simulation box is orthogonal or non-orthogonal (triclinic) and explain
|
|
the meaning of the xy,xz,yz tilt factors.
|
|
</P>
|
|
<P>For the <I>temp</I> keyword, the final Tstop cannot be 0.0 since it would
|
|
make the external T = 0.0 at some timestep during the simulation which
|
|
is not allowed in the Nose/Hoover formulation.
|
|
</P>
|
|
<P>The <I>scaleyz yes</I> and <I>scalexz yes</I> keyword/value pairs can not be used
|
|
for 2D simulations. <I>scaleyz yes</I>, <I>scalexz yes</I>, and <I>scalexy yes</I> options
|
|
can only be used if the 2nd dimension in the keyword is periodic,
|
|
and if the tilt factor is not coupled to the barostat via keywords
|
|
<I>tri</I>, <I>yz</I>, <I>xz</I>, and <I>xy</I>.
|
|
</P>
|
|
<P><B>Related commands:</B>
|
|
</P>
|
|
<P><A HREF = "fix_nve.html">fix nve</A>, <A HREF = "fix_modify.html">fix_modify</A>, <A HREF = "run_style.html">run_style</A>
|
|
</P>
|
|
<P><B>Default:</B>
|
|
</P>
|
|
<P>The keyword defaults are tchain = 3, pchain = 3, mtk = yes, tloop =
|
|
ploop = 1, nreset = 0, drag = 0.0, dilate = all, couple = none,
|
|
scaleyz = scalexz = scalexy = yes if periodic in 2nd dimension and
|
|
not coupled to barostat, otherwise no.
|
|
</P>
|
|
<HR>
|
|
|
|
<A NAME = "Martyna"></A>
|
|
|
|
<P><B>(Martyna)</B> Martyna, Tobias and Klein, J Chem Phys, 101, 4177 (1994).
|
|
</P>
|
|
<A NAME = "Parrinello"></A>
|
|
|
|
<P><B>(Parrinello)</B> Parrinello and Rahman, J Appl Phys, 52, 7182 (1981).
|
|
</P>
|
|
<A NAME = "Tuckerman"></A>
|
|
|
|
<P><B>(Tuckerman)</B> Tuckerman, Alejandre, Lopez-Rendon, Jochim, and
|
|
Martyna, J Phys A: Math Gen, 39, 5629 (2006).
|
|
</P>
|
|
<A NAME = "Shinoda"></A>
|
|
|
|
<P><B>(Shinoda)</B> Shinoda, Shiga, and Mikami, Phys Rev B, 69, 134103 (2004).
|
|
</P>
|
|
</HTML>
|