lammps/doc/fix_move.html

207 lines
9.5 KiB
HTML
Raw Normal View History

<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 move command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>fix ID group-ID move style args keyword values ...
</PRE>
<UL><LI>ID, group-ID are documented in <A HREF = "fix.html">fix</A> command
<LI>move = style name of this fix command
<LI>style = <I>linear</I> or <I>wiggle</I> or <I>rotate</I> or <I>variable</I>
<PRE> <I>linear</I> args = Vx Vy Vz
Vx,Vy,Vz = components of velocity vector (velocity units), any component can be specified as NULL
<I>wiggle</I> args = Ax Ay Az period
Ax,Ay,Az = components of amplitude vector (distance units), any component can be specified as NULL
period = period of oscillation (time units)
<I>rotate</I> args = Px Py Pz Rx Ry Rz period
Px,Py,Pz = origin point of axis of rotation (distance units)
Rx,Ry,Rz = axis of rotation vector
period = period of rotation (time units)
<I>variable</I> args = v_dx v_dy v_dz v_vx v_vy v_vz
v_dx,v_dy,v_dz = 3 variable names that calculate x,y,z displacement as function of time, any component can be specified as NULL
v_vx,v_vy,v_vz = 3 variable names that calculate x,y,z velocity as function of time, any component can be specified as NULL
</PRE>
<LI>zero or more keyword/value pairs may be appended
<LI>keyword = <I>units</I>
<PRE> <I>units</I> value = <I>box</I> or <I>lattice</I>
</PRE>
</UL>
<P><B>Examples:</B>
</P>
<PRE>fix 1 boundary move wiggle 3.0 0.0 0.0 1.0 units box
fix 2 boundary move rotate 0.0 0.0 0.0 0.0 0.0 1.0 5.0
fix 2 boundary move variable v_myx v_myy NULL v_VX v_VY NULL
</PRE>
<P><B>Description:</B>
</P>
<P>Perform updates of position and velocity for atoms in the group each
timestep using the specified settings or formulas, without regard to
forces on the atoms. This can be useful for boundary or other atoms,
whose movement can influence nearby atoms.
</P>
<P>IMPORTANT NOTE: The atoms affected by this fix should not normally be
time integrated by other fixes (e.g. <A HREF = "fix_nve.html">fix nve</A>, <A HREF = "fix_nvt.html">fix
nvt</A>), since that will change their positions and
velocities twice.
</P>
<P>IMPORTANT NOTE: As atoms move due to this fix, they will pass thru
periodic boundaries and be remapped to the other side of the
simulation box, just as they would during normal time integration
(e.g. via the <A HREF = "fix_nve.html">fix nve</A> command). It is up to you to
decide whether periodic boundaries are appropriate with the kind of
atom motion you are prescribing with this fix.
</P>
<P>IMPORTANT NOTE: As dicsussed below, atoms are moved relative to their
initial position at the time the fix is specified. These initial
coordinates are stored by the fix in "unwrapped" form, by using the
image flags associated with each atom. See the <A HREF = "dump.html">dump
custom</A> command for a discussion of "unwrapped" coordinates.
See the Atoms section of the <A HREF = "read_data.html">read_data</A> command for a
discussion of image flags and how they are set for each atom. You can
reset the image flags (e.g. to 0) before invoking this fix by using
the <A HREF = "set.html">set image</A> command.
</P>
<HR>
<P>The <I>linear</I> style moves atoms at a constant velocity, so that their
position <I>X</I> = (x,y,z) as a function of time is given in vector
notation as
</P>
<PRE>X(t) = X0 + V * delta
</PRE>
<P>where <I>X0</I> = (x0,y0,z0) is their position at the time the fix is
specified, <I>V</I> is the specified velocity vector with components
(Vx,Vy,Vz), and <I>delta</I> is the time elapsed since the beginning of the
simulation. This style also sets the velocity of each atom to V =
(Vx,Vy,Vz). If any of the velocity components is specified as NULL,
then the position and velocity of that component is time integrated
the same as the <A HREF = "fix_nve.html">fix nve</A> command would perform, using
the corresponding force component on the atom.
</P>
<P>The <I>wiggle</I> style moves atoms in an oscillatory fashion, so that
their position <I>X</I> = (x,y,z) as a function of time is given in vector
notation as
</P>
<PRE>X(t) = X0 + A sin(omega*delta)
</PRE>
<P>where <I>X0</I> = (x0,y0,z0) is their position at the time the fix is
specified, <I>A</I> is the specified amplitude vector with components
(Ax,Ay,Az), <I>omega</I> is 2 PI / <I>period</I>, and <I>delta</I> is the time
elapsed since the beginning of the simulation. This style also sets
the velocity of each atom to the time derivative of this expression.
If any of the amplitude components is specified as NULL, then the
position and velocity of that component is time integrated the same as
the <A HREF = "fix_nve.html">fix nve</A> command would perform, using the
corresponding force component on the atom.
</P>
<P>The <I>rotate</I> style rotates atoms around a rotation axis <I>R</I> =
(Rx,Ry,Rz) that goes thru a point <I>P</I> = (Px,Py,Pz). The <I>period</I> of
the rotation is also specified. This style also sets the velocity of
each atom to (omega cross Rperp) where omega is its angular velocity
around the rotation axis and Rperp is a perpendicular vector from the
rotation axis to the atom. If the defined
<A HREF = "atom_style.html">atom_style</A> assigns an angular velocity to each atom,
then each atom's angular velocity is also set to omega.
</P>
<P>The <I>variable</I> style allows the position and velocity components of
each atom to be set by formulas specified via the
<A HREF = "variable.html">variable</A> command. Each of the 6 variables is
specified as an argument to the fix as v_name, where <I>name</I> is the
name of the variable that appears elsewhere in the input script.
</P>
<P>Each variable must be of either the <I>equal</I> or <I>atom</I> style.
<I>Equal</I>-style variables compute a single numeric quantity, that can be
a function of the timestep as well as of other simulation values.
<I>Atom</I>-style variables compute a numeric quantity for each atom, that
can be a function per-atom quantities, such as the atom's position, as
well as of the timestep and other simulation values. See the
<A HREF = "variable.html">variable</A> command for details.
</P>
<P>The first 3 variables (v_dx,v_dy,v_dz) specified for the <I>variable</I>
style are used to calculate a displacement from the atom's original
position at the time the fix was specified. The second 3 variables
(v_vx,v_vy,v_vz) specified are used to compute a velocity for each
atom.
</P>
<P>Any of the 6 variables can be specified as NULL. If both the
displacement and velocity variables for a particular x,y,z component
are specified as NULL, then the position and velocity of that
component is time integrated the same as the <A HREF = "fix_nve.html">fix nve</A>
command would perform, using the corresponding force component on the
atom. If only the velocity variable for a component is specified as
NULL, then the displacement variable will be used to set the position
of the atom, and its velocity component will not be changed. If only
the displacement variable for a component is specified as NULL, then
the velocity variable will be used to set the velocity of the atom,
and the position of the atom will be time integrated using that
velocity.
</P>
<P>The <I>units</I> keyword determines the meaning of the distance units used
to define the <I>linear</I> velocity and <I>wiggle</I> amplitude and <I>rotate</I>
origin. This setting is ignored for the <I>variable</I> style. A <I>box</I>
value selects standard units as defined by the <A HREF = "units.html">units</A>
command, e.g. velocity in Angstroms/fmsec and amplitude and position
in Angstroms for units = real. A <I>lattice</I> value means the velocity
units are in lattice spacings per time and the amplitude and position
are in lattice spacings. The <A HREF = "lattice.html">lattice</A> command must have
been previously used to define the lattice spacing. Each of these 3
quantities may be dependent on the x,y,z dimension, since the lattice
spacings can be different in x,y,z.
</P>
<P>For <A HREF = "run_style.html">rRESPA time integration</A>, this fix adjusts the
position and velocity of atoms on the outermost rRESPA level.
</P>
<HR>
<P><B>Restart, fix_modify, output, run start/stop, minimize info:</B>
</P>
<P>This fix writes the original coordinates of moving atoms to <A HREF = "restart.html">binary
restart files</A>, so that the motion can be continuous in a
restarted simulation. 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>None of the <A HREF = "fix_modify.html">fix_modify</A> options are relevant to this
fix.
</P>
<P>This fix produces a per-atom vector which can be accessed by various
<A HREF = "Section_howto.html#4_15">output commands</A>. The length of the vector
for each atom is 3, and the components store the original unwrapped
x,y,z coords of each atom. The per-atom values be accessed on any
timestep.
</P>
<P>This fix can move atoms continously 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>This fix is not invoked during <A HREF = "minimize.html">energy minimization</A>.
</P>
<P><B>Restrictions:</B> none
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "fix_nve.html">fix nve</A>
</P>
<P><B>Default:</B> none
</P>
<P>The option default is units = lattice.
</P>
</HTML>