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 command :h3
|
|
|
|
|
|
|
|
[Syntax:]
|
|
|
|
|
|
|
|
fix ID group-ID style args :pre
|
|
|
|
|
|
|
|
ID = user-assigned name for the fix
|
|
|
|
group-ID = ID of the group of atoms to apply the fix to
|
|
|
|
style = one of a long list of possible style names (see below)
|
|
|
|
args = arguments used by a particular style :ul
|
|
|
|
|
|
|
|
[Examples:]
|
|
|
|
|
|
|
|
fix 1 all nve
|
2010-06-15 22:02:04 +08:00
|
|
|
fix 3 all nvt temp 300.0 300.0 0.01
|
2006-09-22 00:22:34 +08:00
|
|
|
fix mine top setforce 0.0 NULL 0.0 :pre
|
|
|
|
|
|
|
|
[Description:]
|
|
|
|
|
|
|
|
Set a fix that will be applied to a group of atoms. In LAMMPS, a
|
|
|
|
"fix" is any operation that is applied to the system during
|
|
|
|
timestepping or minimization. Examples include updating of atom
|
|
|
|
positions and velocities due to time integration, controlling
|
|
|
|
temperature, applying constraint forces to atoms, enforcing boundary
|
|
|
|
conditions, computing diagnostics, etc. There are dozens of fixes
|
2008-01-03 03:25:15 +08:00
|
|
|
defined in LAMMPS and new ones can be added; see "this
|
2006-09-22 00:22:34 +08:00
|
|
|
section"_Section_modify.html for a discussion.
|
|
|
|
|
|
|
|
Fixes perform their operations at different stages of the timestep.
|
2008-01-03 03:25:15 +08:00
|
|
|
If 2 or more fixes operate at the same stage of the timestep, they are
|
|
|
|
invoked in the order they were specified in the input script.
|
|
|
|
|
|
|
|
The ID of a fix can only contain alphanumeric characters and
|
|
|
|
underscores.
|
2006-09-22 00:22:34 +08:00
|
|
|
|
2008-01-03 03:25:15 +08:00
|
|
|
Fixes can be deleted with the "unfix"_unfix.html command.
|
|
|
|
|
|
|
|
IMPORTANT NOTE: The "unfix"_unfix.html command is the only way to turn
|
|
|
|
off a fix; simply specifying a new fix with a similar style will not
|
|
|
|
turn off the first one. This is especially important to realize for
|
|
|
|
integration fixes. For example, using a "fix nve"_fix_nve.html
|
2010-04-03 00:51:06 +08:00
|
|
|
command for a second run after using a "fix nvt"_fix_nh.html command
|
2008-01-03 03:25:15 +08:00
|
|
|
for the first run, will not cancel out the NVT time integration
|
|
|
|
invoked by the "fix nvt" command. Thus two time integrators would be
|
|
|
|
in place!
|
2006-09-22 00:22:34 +08:00
|
|
|
|
2006-12-16 06:53:57 +08:00
|
|
|
If you specify a new fix with the same ID and style as an existing
|
|
|
|
fix, the old fix is deleted and the new one is created (presumably
|
|
|
|
with new settings). This is the same as if an "unfix" command were
|
|
|
|
first performed on the old fix, except that the new fix is kept in the
|
|
|
|
same order relative to the existing fixes as the old one originally
|
|
|
|
was. Note that this operation also wipes out any additional changes
|
|
|
|
made to the old fix via the "fix_modify"_fix_modify.html command.
|
|
|
|
|
2007-06-26 08:03:39 +08:00
|
|
|
The "fix modify"_fix_modify.html command allows settings for some
|
|
|
|
fixes to be reset. See the doc page for individual fixes for details.
|
|
|
|
|
|
|
|
Some fixes store an internal "state" which is written to binary
|
|
|
|
restart files via the "restart"_restart.html or
|
|
|
|
"write_restart"_write_restart.html commands. This allows the fix to
|
|
|
|
continue on with its calculations in a restarted simulation. See the
|
|
|
|
"read_restart"_read_restart.html command for info on how to re-specify
|
|
|
|
a fix in an input script that reads a restart file. See the doc pages
|
|
|
|
for individual fixes for info on which ones can be restarted.
|
|
|
|
|
2009-12-10 05:20:59 +08:00
|
|
|
:line
|
|
|
|
|
|
|
|
Some fixes calculate one of three styles of quantities: global,
|
|
|
|
per-atom, or local, which can be used by other commands or output as
|
|
|
|
described below. A global quantity is one or more system-wide values,
|
|
|
|
e.g. the energy of a wall interacting with particles. A per-atom
|
|
|
|
quantity is one or more values per atom, e.g. the displacement vector
|
|
|
|
for each atom since time 0. Per-atom values are set to 0.0 for atoms
|
|
|
|
not in the specified fix group. Local quantities are calculated by
|
|
|
|
each processor based on the atoms it owns, but there may be zero or
|
|
|
|
more per atoms.
|
|
|
|
|
|
|
|
Note that a single fix may produces either global or per-atom or local
|
|
|
|
quantities (or none at all), but never more than one of these.
|
|
|
|
|
|
|
|
Global, per-atom, and local quantities each come in three kinds: a
|
|
|
|
single scalar value, a vector of values, or a 2d array of values. The
|
|
|
|
doc page for each fix describes the style and kind of values it
|
|
|
|
produces, e.g. a per-atom vector. Some fixes produce more than one
|
|
|
|
kind of a single style, e.g. a global scalar and a global vector.
|
|
|
|
|
|
|
|
When a fix quantity is accessed, as in many of the output commands
|
|
|
|
discussed below, it can be referenced via the following bracket
|
|
|
|
notation, where ID is the ID of the fix:
|
|
|
|
|
|
|
|
f_ID | entire scalar, vector, or array
|
|
|
|
f_ID\[I\] | one element of vector, one column of array
|
|
|
|
f_ID\[I\]\[J\] | one element of array :tb(s=|)
|
|
|
|
|
|
|
|
In other words, using one bracket reduces the dimension of the
|
|
|
|
quantity once (vector -> scalar, array -> vector). Using two brackets
|
|
|
|
reduces the dimension twice (array -> scalar). Thus a command that
|
|
|
|
uses scalar fix values as input can also process elements of a vector
|
|
|
|
or array.
|
|
|
|
|
|
|
|
Note that commands and "variables"_variable.html which use fix
|
|
|
|
quantities typically do not allow for all kinds, e.g. a command may
|
|
|
|
require a vector of values, not a scalar. This means there is no
|
|
|
|
ambiguity about referring to a fix quantity as f_ID even if it
|
|
|
|
produces, for example, both a scalar and vector. The doc pages for
|
|
|
|
various commands explain the details.
|
|
|
|
|
|
|
|
:line
|
|
|
|
|
|
|
|
In LAMMPS, the values generated by a fix can be used in several ways:
|
|
|
|
|
|
|
|
Global values can be output via the "thermo_style
|
|
|
|
custom"_thermo_style.html or "fix ave/time"_fix_ave_time.html command.
|
|
|
|
Or the values can be referenced in a "variable equal"_variable.html or
|
|
|
|
"variable atom"_variable.html command. :ulb,l
|
|
|
|
|
|
|
|
Per-atom values can be output via the "dump custom"_dump.html command
|
|
|
|
or the "fix ave/spatial"_fix_ave_spatial.html command. Or they can be
|
|
|
|
time-averaged via the "fix ave/atom"_fix_ave_atom.html command or
|
|
|
|
reduced by the "compute reduce"_compute_reduce.html command. Or the
|
|
|
|
per-atom values can be referenced in an "atom-style
|
|
|
|
variable"_variable.html. :l
|
|
|
|
|
|
|
|
Local values can be reduced by the "compute
|
|
|
|
reduce"_compute_reduce.html command, or histogrammed by the "fix
|
|
|
|
ave/histo"_fix_ave_histo.html command. :l,ule
|
|
|
|
|
|
|
|
See this "howto section"_Section_howto.html#4_15 for a summary of
|
|
|
|
various LAMMPS output options, many of which involve fixes.
|
|
|
|
|
|
|
|
The results of fixes that calculate global quantities can be either
|
|
|
|
"intensive" or "extensive" values. Intensive means the value is
|
|
|
|
independent of the number of atoms in the simulation,
|
|
|
|
e.g. temperature. Extensive means the value scales with the number of
|
|
|
|
atoms in the simulation, e.g. total rotational kinetic energy.
|
|
|
|
"Thermodynamic output"_thermo_style.html will normalize extensive
|
2010-03-03 05:51:16 +08:00
|
|
|
values by the number of atoms in the system, depending on the
|
|
|
|
"thermo_modify norm" setting. It will not normalize intensive values.
|
|
|
|
If a fix value is accessed in another way, e.g. by a
|
|
|
|
"variable"_variable.html, you may want to know whether it is an
|
|
|
|
intensive or extensive value. See the doc page for individual fixes
|
|
|
|
for further info.
|
2009-12-10 05:20:59 +08:00
|
|
|
|
|
|
|
:line
|
|
|
|
|
2008-01-03 03:25:15 +08:00
|
|
|
Each fix style has its own documentation page which describes its
|
|
|
|
arguments and what it does, as listed below. Here is an alphabetic
|
|
|
|
list of fix styles available in LAMMPS:
|
2006-09-22 00:22:34 +08:00
|
|
|
|
2010-06-18 23:59:35 +08:00
|
|
|
"adapt"_fix_adapt.html - change a simulation parameter over time
|
2007-10-05 23:39:59 +08:00
|
|
|
"addforce"_fix_addforce.html - add a force to each atom
|
|
|
|
"aveforce"_fix_aveforce.html - add an averaged force to each atom
|
|
|
|
"ave/atom"_fix_ave_atom.html - compute per-atom time-averaged quantities
|
2009-12-15 09:21:23 +08:00
|
|
|
"ave/histo"_fix_ave_atom.html - compute/output time-averaged histograms
|
|
|
|
"ave/spatial"_fix_ave_spatial.html - compute/output time-averaged per-atom quantities by layer
|
|
|
|
"ave/time"_fix_ave_time.html - compute/output global time-averaged quantities
|
2009-01-06 06:26:31 +08:00
|
|
|
"bond/break"_fix_bond_break.html - break bonds on the fly
|
|
|
|
"bond/create"_fix_bond_create.html - create bonds on the fly
|
2008-05-16 05:21:50 +08:00
|
|
|
"bond/swap"_fix_bond_swap.html - Monte Carlo bond swapping
|
2009-02-28 06:26:36 +08:00
|
|
|
"box/relax"_fix_box_relax.html - relax box size during energy minimization
|
2007-10-05 23:39:59 +08:00
|
|
|
"deform"_fix_deform.html - change the simulation box size/shape
|
|
|
|
"deposit"_fix_deposit.html - add new atoms above a surface
|
|
|
|
"drag"_fix_drag.html - drag atoms towards a defined coordinate
|
2007-10-11 06:28:11 +08:00
|
|
|
"dt/reset"_fix_dt_reset.html - reset the timestep based on velocity, forces
|
2007-10-05 23:39:59 +08:00
|
|
|
"efield"_fix_efield.html - impose electric field on system
|
|
|
|
"enforce2d"_fix_enforce2d.html - zero out z-dimension velocity and force
|
2009-03-19 01:37:50 +08:00
|
|
|
"evaporate"_fix_evaporate.html - remove atoms from simulation periodically
|
2010-09-17 03:46:13 +08:00
|
|
|
"external"_fix_external.html - callback to an external driver program
|
2007-10-05 23:39:59 +08:00
|
|
|
"freeze"_fix_freeze.html - freeze atoms in a granular simulation
|
|
|
|
"gravity"_fix_gravity.html - add gravity to atoms in a granular simulation
|
2007-10-27 04:42:35 +08:00
|
|
|
"heat"_fix_heat.html - add/subtract momentum-conserving heat
|
2007-10-05 23:39:59 +08:00
|
|
|
"indent"_fix_indent.html - impose force due to an indenter
|
|
|
|
"langevin"_fix_langevin.html - Langevin temperature control
|
|
|
|
"lineforce"_fix_lineforce.html - constrain atoms to move in a line
|
2009-12-17 04:27:03 +08:00
|
|
|
"momentum"_fix_momentum.html - zero the linear and/or angular momentum of a group of atoms
|
2009-12-04 01:57:33 +08:00
|
|
|
"move"_fix_move.html - move atoms in a prescribed fashion
|
2010-06-17 06:47:44 +08:00
|
|
|
"msst"_fix_msst.html - multi-scale shock technique (MSST) integration
|
2010-10-01 04:38:58 +08:00
|
|
|
"neb"_fix_neb.html - nudged elastic band (NEB) spring forces
|
2010-04-03 00:51:06 +08:00
|
|
|
"nph"_fix_nh.html - constant NPH time integration via Nose/Hoover
|
|
|
|
"nph/asphere"_fix_nph_asphere.html - NPH for aspherical particles
|
|
|
|
"nph/sphere"_fix_nph_sphere.html - NPH for spherical particles
|
|
|
|
"npt"_fix_nh.html - constant NPT time integration via Nose/Hoover
|
2007-10-05 23:39:59 +08:00
|
|
|
"npt/asphere"_fix_npt_asphere.html - NPT for aspherical particles
|
2008-03-20 06:23:37 +08:00
|
|
|
"npt/sphere"_fix_npt_sphere.html - NPT for spherical particles
|
2007-10-05 23:39:59 +08:00
|
|
|
"nve"_fix_nve.html - constant NVE time integration
|
|
|
|
"nve/asphere"_fix_nve_asphere.html - NVT for aspherical particles
|
|
|
|
"nve/limit"_fix_nve_limit.html - NVE with limited step length
|
|
|
|
"nve/noforce"_fix_nve_noforce.html - NVE without forces (v only)
|
2010-03-02 23:22:43 +08:00
|
|
|
"nve/sphere"_fix_nve_sphere.html - NVT for spherical particles
|
2010-04-03 00:51:06 +08:00
|
|
|
"nvt"_fix_nh.html - constant NVT time integration via Nose/Hoover
|
2007-10-05 23:39:59 +08:00
|
|
|
"nvt/asphere"_fix_nvt_asphere.html - NVT for aspherical particles
|
|
|
|
"nvt/sllod"_fix_nvt_sllod.html - NVT for NEMD with SLLOD equations
|
2008-03-20 06:23:37 +08:00
|
|
|
"nvt/sphere"_fix_nvt_sphere.html - NVT for spherical particles
|
2007-10-05 23:39:59 +08:00
|
|
|
"orient/fcc"_fix_orient_fcc.html - add grain boundary migration force
|
|
|
|
"planeforce"_fix_planeforce.html - constrain atoms to move in a plane
|
|
|
|
"poems"_fix_poems.html - constrain clusters of atoms to move \
|
2006-09-22 00:22:34 +08:00
|
|
|
as coupled rigid bodies
|
2007-10-05 23:39:59 +08:00
|
|
|
"pour"_fix_pour.html - pour new atoms into a granular simulation domain
|
2008-03-19 06:21:46 +08:00
|
|
|
"press/berendsen"_fix_press_berendsen.html - pressure control by \
|
|
|
|
Berendsen barostat
|
2007-10-05 23:39:59 +08:00
|
|
|
"print"_fix_print.html - print text and variables during a simulation
|
2009-06-23 05:17:38 +08:00
|
|
|
"reax/bonds"_fix_reax_bonds.html - write out ReaxFF bond information \
|
2007-10-05 23:39:59 +08:00
|
|
|
"recenter"_fix_recenter.html - constrain the center-of-mass position \
|
2006-09-22 00:22:34 +08:00
|
|
|
of a group of atoms
|
2007-10-05 23:39:59 +08:00
|
|
|
"rigid"_fix_rigid.html - constrain one or more clusters of atoms to \
|
2010-05-02 08:59:55 +08:00
|
|
|
move as a rigid body with NVE integration
|
|
|
|
"rigid/nve"_fix_rigid.html - constrain one or more clusters of atoms to \
|
|
|
|
move as a rigid body with alternate NVE integration
|
|
|
|
"rigid/nvt"_fix_rigid.html - constrain one or more clusters of atoms to \
|
|
|
|
move as a rigid body with NVT integration
|
2007-10-05 23:39:59 +08:00
|
|
|
"setforce"_fix_setforce.html - set the force on each atom
|
|
|
|
"shake"_fix_shake.html - SHAKE constraints on bonds and/or angles
|
|
|
|
"spring"_fix_spring.html - apply harmonic spring force to group of atoms
|
|
|
|
"spring/rg"_fix_spring_rg.html - spring on radius of gyration of \
|
2006-09-22 00:22:34 +08:00
|
|
|
group of atoms
|
2007-10-05 23:39:59 +08:00
|
|
|
"spring/self"_fix_spring_self.html - spring from each atom to its origin
|
2010-10-01 23:48:37 +08:00
|
|
|
"srd"_fix_srd.html - stochastic rotation dynamics (SRD)
|
2009-12-22 08:22:16 +08:00
|
|
|
"store/force"_fix_store_force.html - store force on each atom
|
2010-06-04 08:37:28 +08:00
|
|
|
"store/state"_fix_store_state.html - store attributes for each atom
|
2008-03-12 00:37:01 +08:00
|
|
|
"temp/berendsen"_fix_temp_berendsen.html - temperature control by \
|
|
|
|
Berendsen thermostat
|
2007-10-05 23:39:59 +08:00
|
|
|
"temp/rescale"_fix_temp_rescale.html - temperature control by \
|
2006-09-22 00:22:34 +08:00
|
|
|
velocity rescaling
|
2008-05-15 05:40:02 +08:00
|
|
|
"thermal/conductivity"_fix_thermal_conductivity.html - Muller-Plathe kinetic energy exchange for \
|
|
|
|
thermal conductivity calculation
|
2007-10-05 23:39:59 +08:00
|
|
|
"tmd"_fix_tmd.html - guide a group of atoms to a new configuration
|
2009-04-07 05:26:59 +08:00
|
|
|
"ttm"_fix_ttm.html - two-temperature model for electronic/atomic coupling
|
2007-10-17 02:39:08 +08:00
|
|
|
"viscosity"_fix_viscosity.html - Muller-Plathe momentum exchange for \
|
|
|
|
viscosity calculation
|
2007-10-05 23:39:59 +08:00
|
|
|
"viscous"_fix_viscous.html - viscous damping for granular simulations
|
2010-01-09 06:54:29 +08:00
|
|
|
"wall/colloid"_fix_wall.html - Lennard-Jones wall interacting with finite-size particles
|
2009-11-07 05:01:28 +08:00
|
|
|
"wall/gran"_fix_wall_gran.html - frictional wall(s) for granular simulations
|
2010-01-09 06:54:29 +08:00
|
|
|
"wall/harmonic"_fix_wall.html - harmonic spring wall
|
|
|
|
"wall/lj126"_fix_wall.html - Lennard-Jones 12-6 wall
|
|
|
|
"wall/lj93"_fix_wall.html - Lennard-Jones 9-3 wall
|
2010-01-09 06:55:57 +08:00
|
|
|
"wall/reflect"_fix_wall_reflect.html - reflecting wall(s)
|
2010-10-28 05:01:30 +08:00
|
|
|
"wall/region"_fix_wall_region.html - use region surface as wall
|
|
|
|
"wall/srd"_fix_wall_srd.html - slip/no-slip wall for SRD particles :ul
|
2006-09-22 00:22:34 +08:00
|
|
|
|
2007-10-03 06:56:45 +08:00
|
|
|
There are also additional fix styles submitted by users which are
|
|
|
|
included in the LAMMPS distribution. The list of these with links to
|
|
|
|
the individual styles are given in the fix section of "this
|
|
|
|
page"_Section_commands.html#3_5.
|
|
|
|
|
2006-09-22 00:22:34 +08:00
|
|
|
[Restrictions:]
|
|
|
|
|
|
|
|
Some fix styles are part of specific packages. They are only enabled
|
|
|
|
if LAMMPS was built with that package. See the "Making
|
2007-06-26 08:03:39 +08:00
|
|
|
LAMMPS"_Section_start.html#2_3 section for more info on packages. The
|
|
|
|
doc pages for individual fixes tell if it is part of a package.
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
[Related commands:]
|
|
|
|
|
|
|
|
"unfix"_unfix.html, "fix_modify"_fix_modify.html
|
|
|
|
|
|
|
|
[Default:] none
|