2006-09-22 00:22:34 +08:00
|
|
|
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
|
|
|
|
|
|
|
:link(lws,http://lammps.sandia.gov)
|
|
|
|
:link(ld,Manual.html)
|
|
|
|
:link(lc,Section_commands.html#comm)
|
|
|
|
|
|
|
|
:line
|
|
|
|
|
|
|
|
fix recenter command :h3
|
|
|
|
|
|
|
|
[Syntax:]
|
|
|
|
|
|
|
|
fix ID group-ID recenter x y z keyword value ... :pre
|
|
|
|
|
|
|
|
ID, group-ID are documented in "fix"_fix.html command :ulb,l
|
|
|
|
recenter = style name of this fix command :l
|
|
|
|
x,y,z = constrain center-of-mass to these coords (distance units), \
|
|
|
|
any coord can also be NULL or INIT (see below) :l
|
2007-07-03 04:04:44 +08:00
|
|
|
zero or more keyword/value pairs may be appended :l
|
2006-09-22 00:22:34 +08:00
|
|
|
keyword = {shift} or {units} :l
|
|
|
|
{shift} value = group-ID
|
|
|
|
group-ID = group of atoms whose coords are shifted
|
|
|
|
{units} value = {box} or {lattice} or {fraction} :pre
|
|
|
|
:ule
|
|
|
|
|
|
|
|
[Examples:]
|
|
|
|
|
2006-10-03 04:53:54 +08:00
|
|
|
fix 1 all recenter 0.0 0.5 0.0
|
2006-10-03 04:21:36 +08:00
|
|
|
fix 1 all recenter INIT INIT NULL
|
|
|
|
fix 1 all recenter INIT 0.0 0.0 units box :pre
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
[Description:]
|
|
|
|
|
|
|
|
Constrain the center-of-mass position of a group of atoms by adjusting
|
|
|
|
the coordinates of the atoms every timestep. This is simply a small
|
|
|
|
shift that does not alter the dynamics of the system or change the
|
|
|
|
relative coordinates of any pair of atoms in the group. This can be
|
|
|
|
used to insure the entire collection of atoms (or a portion of them)
|
|
|
|
do not drift during the simulation due to random perturbations
|
|
|
|
(e.g. "fix langevin"_fix_langevin.html thermostatting).
|
|
|
|
|
|
|
|
Distance units for the x,y,z values are determined by the setting of
|
|
|
|
the {units} keyword, as discussed below. One or more x,y,z values can
|
|
|
|
also be specified as NULL, which means exclude that dimension from
|
|
|
|
this operation. Or it can be specified as INIT which means to
|
2008-02-20 05:47:37 +08:00
|
|
|
constrain the center-of-mass to its initial value at the beginning of
|
2006-09-22 00:22:34 +08:00
|
|
|
the run.
|
|
|
|
|
|
|
|
The center-of-mass (COM) is computed for the group specified by the
|
|
|
|
fix. If the current COM is different than the specified x,y,z, then a
|
|
|
|
group of atoms has their coordinates shifted by the difference. By
|
|
|
|
default the shifted group is also the group specified by the fix. A
|
|
|
|
different group can be shifted by using the {shift} keyword. For
|
|
|
|
example, the COM could be computed on a protein to keep it in the
|
|
|
|
center of the simulation box. But the entire system (protein + water)
|
|
|
|
could be shifted.
|
|
|
|
|
|
|
|
If the {units} keyword is set to {box}, then the distance units of
|
|
|
|
x,y,z are defined by the "units"_units.html command - e.g. Angstroms
|
2006-11-14 06:18:34 +08:00
|
|
|
for {real} units. A {lattice} value means the distance units are in
|
|
|
|
lattice spacings. The "lattice"_lattice.html command must have been
|
|
|
|
previously used to define the lattice spacing. A {fraction} value
|
|
|
|
means a fractional distance between the lo/hi box boundaries, e.g. 0.5
|
|
|
|
= middle of the box. The default is to use lattice units.
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
Note that the "velocity"_velocity.html command can be used to create
|
|
|
|
velocities with zero aggregate linear and/or angular momentum.
|
|
|
|
|
2007-02-20 02:03:15 +08:00
|
|
|
IMPORTANT NOTE: This fix performs its operations at the same point in
|
|
|
|
the timestep as other time integration fixes, such as "fix
|
2010-04-03 00:51:06 +08:00
|
|
|
nve"_fix_nve.html, "fix nvt"_fix_nh.html, or "fix npt"_fix_nh.html.
|
2007-02-20 02:03:15 +08:00
|
|
|
Thus fix recenter should normally be the last such fix specified in
|
|
|
|
the input script, since the adjustments it makes to atom coordinates
|
|
|
|
should come after the changes made by time integration. LAMMPS will
|
|
|
|
warn you if your fixes are not ordered this way.
|
|
|
|
|
2007-09-28 07:25:52 +08:00
|
|
|
IMPORTANT NOTE: If you use this fix on a small group of atoms (e.g. a
|
|
|
|
molecule in solvent) without using the {shift} keyword to adjust the
|
|
|
|
positions of all atoms in the system, then the results can be
|
|
|
|
unpredictable. For example, if the molecule is pushed in one
|
|
|
|
direction by the solvent, its velocity will increase. But its
|
|
|
|
coordinates will be recentered, meaning it is pushed back towards the
|
|
|
|
force. Thus over time, the velocity and temperature of the molecule
|
|
|
|
could become very large (though it won't appear to be moving due to
|
|
|
|
the recentering). If you are thermostatting the entire system, then
|
|
|
|
the solvent would be cooled to compensate. A better solution for this
|
|
|
|
simulation scenario is to use the "fix spring"_fix_spring.html command
|
|
|
|
to tether the molecule in place.
|
|
|
|
|
2007-10-11 06:28:11 +08:00
|
|
|
[Restart, fix_modify, output, run start/stop, minimize info:]
|
2007-06-26 08:03:39 +08:00
|
|
|
|
|
|
|
No information about this fix is written to "binary restart
|
|
|
|
files"_restart.html. None of the "fix_modify"_fix_modify.html options
|
2010-04-03 00:51:06 +08:00
|
|
|
are relevant to this fix. No global or per-atom quantities are stored
|
|
|
|
by this fix for access by various "output
|
2011-08-26 01:01:01 +08:00
|
|
|
commands"_Section_howto.html#howto_15. No parameter of this fix can
|
|
|
|
be used with the {start/stop} keywords of the "run"_run.html command.
|
2007-10-11 06:28:11 +08:00
|
|
|
This fix is not invoked during "energy minimization"_minimize.html.
|
2007-06-26 08:03:39 +08:00
|
|
|
|
2006-09-22 00:22:34 +08:00
|
|
|
[Restrictions:]
|
|
|
|
|
|
|
|
This fix should not be used with an x,y,z setting that causes a large
|
|
|
|
shift in the system on the 1st timestep, due to the requested COM
|
|
|
|
being very different from the initial COM. This could cause atoms to
|
2008-02-20 05:47:37 +08:00
|
|
|
be lost, especially in parallel. Instead, use the
|
2007-04-02 22:26:01 +08:00
|
|
|
"displace_atoms"_displace_atoms.html command, which can be used to
|
|
|
|
move atoms a large distance.
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
[Related commands:]
|
|
|
|
|
|
|
|
"fix momentum"_fix_momentum.html, "velocity"_velocity.html
|
|
|
|
|
|
|
|
[Default:]
|
|
|
|
|
|
|
|
The option defaults are adjust = fix group-ID, and units = lattice.
|