style = <I>final</I> or <I>delta</I> or <I>scale</I> or <I>vel</I> or <I>erate</I> or <I>trate</I> or <I>volume</I> or <I>wiggle</I> or <I>variable</I>
<I>final</I> values = lo hi
lo hi = box boundaries at end of run (distance units)
<I>delta</I> values = dlo dhi
dlo dhi = change in box boundaries at end of run (distance units)
<I>scale</I> values = factor
factor = multiplicative factor for change in box length at end of run
<I>vel</I> value = V
V = change box length at this velocity (distance/time units),
effectively an engineering strain rate
<I>erate</I> value = R
R = engineering strain rate (1/time units)
<I>trate</I> value = R
R = true strain rate (1/time units)
<I>volume</I> value = none = adjust this dim to preserve volume of system
<I>wiggle</I> values = A Tp
A = amplitude of oscillation (distance units)
Tp = period of oscillation (time units)
<I>variable</I> values = v_name1 v_name2
v_name1 = variable with name1 for box length change as function of time
v_name2 = variable with name2 for change rate as function of time
<I>xy</I>, <I>xz</I>, <I>yz</I> args = style value
style = <I>final</I> or <I>delta</I> or <I>vel</I> or <I>erate</I> or <I>trate</I> or <I>wiggle</I>
<I>final</I> value = tilt
tilt = tilt factor at end of run (distance units)
<I>delta</I> value = dtilt
dtilt = change in tilt factor at end of run (distance units)
<I>vel</I> value = V
V = change tilt factor at this velocity (distance/time units),
effectively an engineering shear strain rate
<I>erate</I> value = R
R = engineering shear strain rate (1/time units)
<I>trate</I> value = R
R = true shear strain rate (1/time units)
<I>wiggle</I> values = A Tp
A = amplitude of oscillation (distance units)
Tp = period of oscillation (time units)
<I>variable</I> values = v_name1 v_name2
v_name1 = variable with name1 for tilt change as function of time
v_name2 = variable with name2 for change rate as function of time
</PRE>
<LI>zero or more keyword/value pairs may be appended
<LI>keyword = <I>remap</I> or <I>flip</I> or <I>units</I>
<PRE><I>remap</I> value = <I>x</I> or <I>v</I> or <I>none</I>
x = remap coords of atoms in group into deforming box
v = remap velocities of all atoms when they cross periodic boundaries
none = no remapping of x or v
<I>flip</I> value = <I>yes</I> or <I>no</I>
allow or disallow box flips when it becomes highly skewed
<I>units</I> value = <I>lattice</I> or <I>box</I>
lattice = distances are defined in lattice units
box = distances are defined in simulation box units
</PRE>
</UL>
<P><B>Examples:</B>
</P>
<PRE>fix 1 all deform 1 x final 0.0 9.0 z final 0.0 5.0 units box
fix 1 all deform 1 x trate 0.1 y volume z volume
fix 1 all deform 1 xy erate 0.001 remap v
fix 1 all deform 10 y delta -0.5 0.5 xz vel 1.0
</PRE>
<P><B>Description:</B>
</P>
<P>Change the volume and/or shape of the simulation box during a dynamics
run. Orthogonal simulation boxes have 3 adjustable parameters
(x,y,z). Triclinic (non-orthogonal) simulation boxes have 6
adjustable parameters (x,y,z,xy,xz,yz). Any or all of them can be
adjusted independently and simultaneously by this command. This fix
can be used to perform non-equilibrium MD (NEMD) simulations of a
continuously strained system. See the <AHREF ="fix_nvt_sllod.html">fix
nvt/sllod</A> and <AHREF ="compute_temp_deform.html">compute
temp/deform</A> commands for more details.
</P>
<P>For the <I>x</I>, <I>y</I>, <I>z</I> parameters, the associated dimension cannot be
shrink-wrapped. For the <I>xy</I>, <I>yz</I>, <I>xz</I> parameters, the associated
2nd dimension cannot be shrink-wrapped. Dimensions not varied by this
command can be periodic or non-periodic. Dimensions corresponding to
unspecified parameters can also be controlled by a <AHREF ="fix_nh.html">fix
npt</A> or <AHREF ="fix_nh.html">fix nph</A> command.
</P>
<P>The size and shape of the simulation box at the beginning of the
simulation run were either specified by the
<AHREF ="create_box.html">create_box</A> or <AHREF ="read_data.html">read_data</A> or
<AHREF ="read_restart.html">read_restart</A> command used to setup the simulation
initially if it is the first run, or they are the values from the end
of the previous run. The <AHREF ="create_box.html">create_box</A>, <AHREF ="read_data.html">read
data</A>, and <AHREF ="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. If
fix deform changes the xy,xz,yz tilt factors, then the simulation box
must be triclinic, even if its initial tilt factors are 0.0.
</P>
<P>As described below, the desired simulation box size and shape at the
end of the run are determined by the parameters of the fix deform
command. Every Nth timestep during the run, the simulation box is
expanded, contracted, or tilted to ramped values between the initial
and final values.
</P>
<HR>
<P>For the <I>x</I>, <I>y</I>, and <I>z</I> parameters, this is the meaning of their
styles and values.
</P>
<P>The <I>final</I>, <I>delta</I>, <I>scale</I>, <I>vel</I>, and <I>erate</I> styles all change
the specified dimension of the box via "constant displacement" which
is effectively a "constant engineering strain rate". This means the
box dimension changes linearly with time from its initial to final
value.
</P>
<P>For style <I>final</I>, the final lo and hi box boundaries of a dimension
are specified. The values can be in lattice or box distance units.
See the discussion of the units keyword below.
</P>
<P>For style <I>delta</I>, plus or minus changes in the lo/hi box boundaries
of a dimension are specified. The values can be in lattice or box
distance units. See the discussion of the units keyword below.
</P>
<P>For style <I>scale</I>, a multiplicative factor to apply to the box length
of a dimension is specified. For example, if the initial box length
is 10, and the factor is 1.1, then the final box length will be 11. A
factor less than 1.0 means compression.
</P>
<P>For style <I>vel</I>, a velocity at which the box length changes is
specified in units of distance/time. This is effectively a "constant
engineering strain rate", where rate = V/L0 and L0 is the initial box
length. The distance can be in lattice or box distance units. See
the discussion of the units keyword below. For example, if the
initial box length is 100 Angstroms, and V is 10 Angstroms/psec, then
after 10 psec, the box length will have doubled. After 20 psec, it
will have tripled.
</P>
<P>The <I>erate</I> style changes a dimension of the the box at a "constant
engineering strain rate". The units of the specified strain rate are
1/time. See the <AHREF ="units.html">units</A> command for the time units
associated with different choices of simulation units,
e.g. picoseconds for "metal" units). Tensile strain is unitless and
is defined as delta/L0, where L0 is the original box length and delta
is the change relative to the original length. The box length L as a
function of time will change as
</P>
<PRE>L(t) = L0 (1 + erate*dt)
</PRE>
<P>where dt is the elapsed time (in time units). Thus if <I>erate</I> R is
specified as 0.1 and time units are picoseconds, this means the box
length will increase by 10% of its original length every picosecond.
I.e. strain after 1 psec = 0.1, strain after 2 psec = 0.2, etc. R =
-0.01 means the box length will shrink by 1% of its original length
every picosecond. Note that for an "engineering" rate the change is
based on the original box length, so running with R = 1 for 10
picoseconds expands the box length by a factor of 11 (strain of 10),
which is different that what the <I>trate</I> style would induce.
</P>
<P>The <I>trate</I> style changes a dimension of the box at a "constant true
strain rate". Note that this is not an "engineering strain rate", as
the other styles are. Rather, for a "true" rate, the rate of change
is constant, which means the box dimension changes non-linearly with
time from its initial to final value. The units of the specified
strain rate are 1/time. See the <AHREF ="units.html">units</A> command for the
time units associated with different choices of simulation units,
e.g. picoseconds for "metal" units). Tensile strain is unitless and
is defined as delta/L0, where L0 is the original box length and delta
is the change relative to the original length.
</P>
<P>The box length L as a function of time will change as
</P>
<PRE>L(t) = L0 exp(trate*dt)
</PRE>
<P>where dt is the elapsed time (in time units). Thus if <I>trate</I> R is
specified as ln(1.1) and time units are picoseconds, this means the
box length will increase by 10% of its current (not original) length
every picosecond. I.e. strain after 1 psec = 0.1, strain after 2 psec
= 0.21, etc. R = ln(2) or ln(3) means the box length will double or
triple every picosecond. R = ln(0.99) means the box length will
shrink by 1% of its current length every picosecond. Note that for a
"true" rate the change is continuous and based on the current length,
so running with R = ln(2) for 10 picoseconds does not expand the box
length by a factor of 11 as it would with <I>erate</I>, but by a factor of
1024 since the box length will double every picosecond.
</P>
<P>Note that to change the volume (or cross-sectional area) of the
simulation box at a constant rate, you can change multiple dimensions
via <I>erate</I> or <I>trate</I>. E.g. to double the box volume in a picosecond
picosecond, you could set "x erate M", "y erate M", "z erate M", with
M = pow(2,1/3) - 1 = 0.26, since if each box dimension grows by 26%,
the box volume doubles. Or you could set "x trate M", "y trate M", "z
trate M", with M = ln(1.26) = 0.231, and the box volume would double
every picosecond.
</P>
<P>The <I>volume</I> style changes the specified dimension in such a way that
the box volume remains constant while other box dimensions are changed
explicitly via the styles discussed above. For example, "x scale 1.1
y scale 1.1 z volume" will shrink the z box length as the x,y box
lengths increase, to keep the volume constant (product of x,y,z
lengths). If "x scale 1.1 z volume" is specified and parameter <I>y</I> is
unspecified, then the z box length will shrink as x increases to keep
the product of x,z lengths constant. If "x scale 1.1 y volume z
volume" is specified, then both the y,z box lengths will shrink as x
increases to keep the volume constant (product of x,y,z lengths). In
this case, the y,z box lengths shrink so as to keep their relative
aspect ratio constant.
</P>
<P>For solids or liquids, note that when one dimension of the box is
expanded via fix deform (i.e. tensile strain), it may be physically
undesirable to hold the other 2 box lengths constant (unspecified by
fix deform) since that implies a density change. Using the <I>volume</I>
style for those 2 dimensions to keep the box volume constant may make
more physical sense, but may also not be correct for materials and
potentials whose Poisson ratio is not 0.5. An alternative is to use
<AHREF ="fix_nh.html">fix npt aniso</A> with zero applied pressure on those 2
dimensions, so that they respond to the tensile strain dynamically.
</P>
<P>The <I>wiggle</I> style oscillates the specified box length dimension
sinusoidally with the specified amplitude and period. I.e. the box
length L as a function of time is given by
</P>
<PRE>L(t) = L0 + A sin(2*pi t/Tp)
</PRE>
<P>where L0 is its initial length. If the amplitude A is a positive
number the box initially expands, then contracts, etc. If A is
negative then the box initially contracts, then expands, etc. The
amplitude can be in lattice or box distance units. See the discussion
of the units keyword below.
</P>
<P>The <I>variable</I> style changes the specified box length dimension by
evaluating a variable, which presumably is a function of time. The
variable with <I>name1</I> must be an <AHREF ="variable.html">equal-style variable</A>
and should calculate a change in box length in units of distance.
Note that this distance is in box units, not lattice units; see the
discussion of the <I>units</I> keyword below. The formula associated with
variable <I>name1</I> can reference the current timestep. Note that it
should return the "change" in box length, not the absolute box length.
This means it should evaluate to 0.0 when invoked on the initial
timestep of the run following the definition of fix deform. It should
evaluate to a value > 0.0 to dilate the box at future times, or a
value < 0.0tocompressthebox.
</P>
<P>The variable <I>name2</I> must also be an <AHREF ="variable.html">equal-style
variable</A> and should calculate the rate of box length
change, in units of distance/time, i.e. the time-derivative of the
<I>name1</I> variable. This quantity is used internally by LAMMPS to reset
atom velocities when they cross periodic boundaries. It is computed
internally for the other styles, but you must provide it when using an
arbitrary variable.
</P>
<P>Here is an example of using the <I>variable</I> style to perform the same
box deformation as the <I>wiggle</I> style formula listed above, where we