1 "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
3 :link(lws,http://lammps.sandia.gov)
5 :link(lc,Section_commands.html#comm)
13 fix ID group-ID move style args keyword values ... :pre
15 ID, group-ID are documented in "fix"_fix.html command :ulb,l
16 move = style name of this fix command :l
17 style = {linear} or {wiggle} or {rotate} or {variable} :l
18 {linear} args = Vx Vy Vz
19 Vx,Vy,Vz = components of velocity vector (velocity units), any component can be specified as NULL
20 {wiggle} args = Ax Ay Az period
21 Ax,Ay,Az = components of amplitude vector (distance units), any component can be specified as NULL
22 period = period of oscillation (time units)
23 {rotate} args = Px Py Pz Rx Ry Rz period
24 Px,Py,Pz = origin point of axis of rotation (distance units)
25 Rx,Ry,Rz = axis of rotation vector
26 period = period of rotation (time units)
27 {variable} args = v_dx v_dy v_dz v_vx v_vy v_vz
28 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
29 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
31 zero or more keyword/value pairs may be appended :l
33 {units} value = {box} or {lattice} :pre
38 fix 1 boundary move wiggle 3.0 0.0 0.0 1.0 units box
39 fix 2 boundary move rotate 0.0 0.0 0.0 0.0 0.0 1.0 5.0
40 fix 2 boundary move variable v_myx v_myy NULL v_VX v_VY NULL :pre
44 Perform updates of position and velocity for atoms in the group each
45 timestep using the specified settings or formulas, without regard to
46 forces on the atoms. This can be useful for boundary or other atoms,
47 whose movement can influence nearby atoms.
49 NOTE: The atoms affected by this fix should not normally be time
50 integrated by other fixes (e.g. "fix nve"_fix_nve.html, "fix
51 nvt"_fix_nh.html), since that will change their positions and
54 NOTE: As atoms move due to this fix, they will pass thru periodic
55 boundaries and be remapped to the other side of the simulation box,
56 just as they would during normal time integration (e.g. via the "fix
57 nve"_fix_nve.html command). It is up to you to decide whether
58 periodic boundaries are appropriate with the kind of atom motion you
59 are prescribing with this fix.
61 NOTE: As dicsussed below, atoms are moved relative to their initial
62 position at the time the fix is specified. These initial coordinates
63 are stored by the fix in "unwrapped" form, by using the image flags
64 associated with each atom. See the "dump custom"_dump.html command
65 for a discussion of "unwrapped" coordinates. See the Atoms section of
66 the "read_data"_read_data.html command for a discussion of image flags
67 and how they are set for each atom. You can reset the image flags
68 (e.g. to 0) before invoking this fix by using the "set image"_set.html
73 The {linear} style moves atoms at a constant velocity, so that their
74 position {X} = (x,y,z) as a function of time is given in vector
77 X(t) = X0 + V * delta :pre
79 where {X0} = (x0,y0,z0) is their position at the time the fix is
80 specified, {V} is the specified velocity vector with components
81 (Vx,Vy,Vz), and {delta} is the time elapsed since the fix was
82 specified. This style also sets the velocity of each atom to V =
83 (Vx,Vy,Vz). If any of the velocity components is specified as NULL,
84 then the position and velocity of that component is time integrated
85 the same as the "fix nve"_fix_nve.html command would perform, using
86 the corresponding force component on the atom.
88 Note that the {linear} style is identical to using the {variable}
89 style with an "equal-style variable"_variable.html that uses the
90 vdisplace() function. E.g.
93 variable x equal vdisplace(0.0,$V)
94 fix 1 boundary move variable v_x NULL NULL v_V NULL NULL :pre
96 The {wiggle} style moves atoms in an oscillatory fashion, so that
97 their position {X} = (x,y,z) as a function of time is given in vector
100 X(t) = X0 + A sin(omega*delta) :pre
102 where {X0} = (x0,y0,z0) is their position at the time the fix is
103 specified, {A} is the specified amplitude vector with components
104 (Ax,Ay,Az), {omega} is 2 PI / {period}, and {delta} is the time
105 elapsed since the fix was specified. This style also sets the
106 velocity of each atom to the time derivative of this expression. If
107 any of the amplitude components is specified as NULL, then the
108 position and velocity of that component is time integrated the same as
109 the "fix nve"_fix_nve.html command would perform, using the
110 corresponding force component on the atom.
112 Note that the {wiggle} style is identical to using the {variable}
113 style with "equal-style variables"_variable.html that use the
114 swiggle() and cwiggle() functions. E.g.
116 variable A equal 10.0
118 variable omega equal 2.0*PI/$T
119 variable x equal swiggle(0.0,$A,$T)
120 variable v equal v_omega*($A-cwiggle(0.0,$A,$T))
121 fix 1 boundary move variable v_x NULL NULL v_v NULL NULL :pre
123 The {rotate} style rotates atoms around a rotation axis {R} =
124 (Rx,Ry,Rz) that goes thru a point {P} = (Px,Py,Pz). The {period} of
125 the rotation is also specified. The direction of rotation for the
126 atoms around the rotation axis is consistent with the right-hand rule:
127 if your right-hand thumb points along {R}, then your fingers wrap
128 around the axis in the direction of rotation.
130 This style also sets the velocity of each atom to (omega cross Rperp)
131 where omega is its angular velocity around the rotation axis and Rperp
132 is a perpendicular vector from the rotation axis to the atom. If the
133 defined "atom_style"_atom_style.html assigns an angular velocity or
134 angular moementum or orientation to each atom ("atom
135 styles"_atom_style.html sphere, ellipsoid, line, tri, body), then
136 those properties are also updated appropriately to correspond to the
137 atom's motion and rotation over time.
139 The {variable} style allows the position and velocity components of
140 each atom to be set by formulas specified via the
141 "variable"_variable.html command. Each of the 6 variables is
142 specified as an argument to the fix as v_name, where name is the
143 variable name that is defined elsewhere in the input script.
145 Each variable must be of either the {equal} or {atom} style.
146 {Equal}-style variables compute a single numeric quantity, that can be
147 a function of the timestep as well as of other simulation values.
148 {Atom}-style variables compute a numeric quantity for each atom, that
149 can be a function per-atom quantities, such as the atom's position, as
150 well as of the timestep and other simulation values. Note that this
151 fix stores the original coordinates of each atom (see note below) so
152 that per-atom quantity can be used in an atom-style variable formula.
153 See the "variable"_variable.html command for details.
155 The first 3 variables (v_dx,v_dy,v_dz) specified for the {variable}
156 style are used to calculate a displacement from the atom's original
157 position at the time the fix was specified. The second 3 variables
158 (v_vx,v_vy,v_vz) specified are used to compute a velocity for each
161 Any of the 6 variables can be specified as NULL. If both the
162 displacement and velocity variables for a particular x,y,z component
163 are specified as NULL, then the position and velocity of that
164 component is time integrated the same as the "fix nve"_fix_nve.html
165 command would perform, using the corresponding force component on the
166 atom. If only the velocity variable for a component is specified as
167 NULL, then the displacement variable will be used to set the position
168 of the atom, and its velocity component will not be changed. If only
169 the displacement variable for a component is specified as NULL, then
170 the velocity variable will be used to set the velocity of the atom,
171 and the position of the atom will be time integrated using that
174 The {units} keyword determines the meaning of the distance units used
175 to define the {linear} velocity and {wiggle} amplitude and {rotate}
176 origin. This setting is ignored for the {variable} style. A {box}
177 value selects standard units as defined by the "units"_units.html
178 command, e.g. velocity in Angstroms/fmsec and amplitude and position
179 in Angstroms for units = real. A {lattice} value means the velocity
180 units are in lattice spacings per time and the amplitude and position
181 are in lattice spacings. The "lattice"_lattice.html command must have
182 been previously used to define the lattice spacing. Each of these 3
183 quantities may be dependent on the x,y,z dimension, since the lattice
184 spacings can be different in x,y,z.
188 [Restart, fix_modify, output, run start/stop, minimize info:]
190 This fix writes the original coordinates of moving atoms to "binary
191 restart files"_restart.html, as well as the initial timestep, so that
192 the motion can be continuous in a restarted simulation. See the
193 "read_restart"_read_restart.html command for info on how to re-specify
194 a fix in an input script that reads a restart file, so that the
195 operation of the fix continues in an uninterrupted fashion.
197 NOTE: Because the move positions are a function of the current
198 timestep and the initial timestep, you cannot reset the timestep to a
199 different value after reading a restart file, if you expect a fix move
200 command to work in an uninterrupted fashion.
202 None of the "fix_modify"_fix_modify.html options are relevant to this
205 This fix produces a per-atom array which can be accessed by various
206 "output commands"_Section_howto.html#howto_15. The number of columns
207 for each atom is 3, and the columns store the original unwrapped x,y,z
208 coords of each atom. The per-atom values can be accessed on any
211 No parameter of this fix can be used with the {start/stop} keywords of
212 the "run"_run.html command. This fix is not invoked during "energy
213 minimization"_minimize.html.
215 For "rRESPA time integration"_run_style.html, this fix adjusts the
216 position and velocity of atoms on the outermost rRESPA level.
222 "fix nve"_fix_nve.html, "displace_atoms"_displace_atoms.html
226 The option default is units = lattice.