2006-09-22 00:22:34 +08:00
|
|
|
<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 command
|
|
|
|
</H3>
|
|
|
|
<P><B>Syntax:</B>
|
|
|
|
</P>
|
|
|
|
<PRE>fix ID group-ID style args
|
|
|
|
</PRE>
|
|
|
|
<UL><LI>ID = user-assigned name for the fix
|
|
|
|
<LI>group-ID = ID of the group of atoms to apply the fix to
|
|
|
|
<LI>style = one of a long list of possible style names (see below)
|
|
|
|
<LI>args = arguments used by a particular style
|
|
|
|
</UL>
|
|
|
|
<P><B>Examples:</B>
|
|
|
|
</P>
|
|
|
|
<PRE>fix 1 all nve
|
|
|
|
fix 3 all nvt 300.0 300.0 0.01
|
|
|
|
fix mine top setforce 0.0 NULL 0.0
|
|
|
|
</PRE>
|
|
|
|
<P><B>Description:</B>
|
|
|
|
</P>
|
|
|
|
<P>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
|
|
|
|
defined in LAMMPS and new ones can be added - see <A HREF = "Section_modify.html">this
|
|
|
|
section</A> for a discussion.
|
|
|
|
</P>
|
|
|
|
<P>Each fix style has its own documentation page which describes its
|
2007-06-25 22:36:36 +08:00
|
|
|
arguments and what it does, as listed below.
|
2006-09-22 00:22:34 +08:00
|
|
|
</P>
|
|
|
|
<P>Fixes perform their operations at different stages of the timestep.
|
|
|
|
If 2 or more fixes both operate at the same stage of the timestep,
|
|
|
|
they are invoked in the order they were specified in the input script.
|
|
|
|
</P>
|
|
|
|
<P>Fixes can be deleted with the <A HREF = "unfix.html">unfix</A> command. Note that
|
|
|
|
this 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. For example,
|
2007-06-25 22:36:36 +08:00
|
|
|
using a <A HREF = "fix_nve.html">fix nve</A> command for a second run after using a
|
|
|
|
<A HREF = "fix_nvt.html">fix nvt</A> command 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
|
|
|
</P>
|
2006-12-16 06:53:57 +08:00
|
|
|
<P>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 <A HREF = "fix_modify.html">fix_modify</A> command.
|
|
|
|
</P>
|
2007-06-25 22:36:36 +08:00
|
|
|
<P>The <A HREF = "fix_modify.html">fix modify</A> command allows settings for some
|
|
|
|
fixes to be reset. See the doc page for individual fixes for details.
|
|
|
|
</P>
|
2007-10-10 02:24:42 +08:00
|
|
|
<P>Some fixes calculate a global scalar or vector quantity which can be
|
|
|
|
accessed by various output commands, including
|
|
|
|
<A HREF = "variable.html">variables</A>, <A HREF = "thermo_style.html">thermo_style custom</A>,
|
|
|
|
and <A HREF = "fix_ave_time.html">fix ave/time</A>. See this <A HREF = "Section_howto.html#4_15">howto
|
|
|
|
section</A> for a summary of various LAMMPS
|
|
|
|
output options. See the doc pages for individual fixes for info on
|
|
|
|
which ones calculate these quantities.
|
|
|
|
</P>
|
2007-06-25 22:36:36 +08:00
|
|
|
<P>Some fixes store an internal "state" which is written to binary
|
|
|
|
restart files via the <A HREF = "restart.html">restart</A> or
|
|
|
|
<A HREF = "write_restart.html">write_restart</A> commands. This allows the fix to
|
|
|
|
continue on with its calculations 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. See the doc pages
|
|
|
|
for individual fixes for info on which ones can be restarted.
|
|
|
|
</P>
|
|
|
|
<P>Here is an alphabetic list of fix styles available in LAMMPS:
|
2006-09-22 00:22:34 +08:00
|
|
|
</P>
|
2007-10-05 23:39:59 +08:00
|
|
|
<UL><LI><A HREF = "fix_addforce.html">addforce</A> - add a force to each atom
|
|
|
|
<LI><A HREF = "fix_aveforce.html">aveforce</A> - add an averaged force to each atom
|
|
|
|
<LI><A HREF = "fix_ave_atom.html">ave/atom</A> - compute per-atom time-averaged quantities
|
|
|
|
<LI><A HREF = "fix_ave_spatial.html">ave/spatial</A> - output per-atom quantities by layer
|
|
|
|
<LI><A HREF = "fix_ave_time.html">ave/time</A> - output time-averaged compute quantities
|
|
|
|
<LI><A HREF = "fix_com.html">com</A> - compute a center-of-mass
|
|
|
|
<LI><A HREF = "fix_deform.html">deform</A> - change the simulation box size/shape
|
|
|
|
<LI><A HREF = "fix_deposit.html">deposit</A> - add new atoms above a surface
|
|
|
|
<LI><A HREF = "fix_drag.html">drag</A> - drag atoms towards a defined coordinate
|
2007-10-11 06:28:11 +08:00
|
|
|
<LI><A HREF = "fix_dt_reset.html">dt/reset</A> - reset the timestep based on velocity, forces
|
2007-10-05 23:39:59 +08:00
|
|
|
<LI><A HREF = "fix_efield.html">efield</A> - impose electric field on system
|
|
|
|
<LI><A HREF = "fix_enforce2d.html">enforce2d</A> - zero out z-dimension velocity and force
|
|
|
|
<LI><A HREF = "fix_freeze.html">freeze</A> - freeze atoms in a granular simulation
|
|
|
|
<LI><A HREF = "fix_gravity.html">gravity</A> - add gravity to atoms in a granular simulation
|
|
|
|
<LI><A HREF = "fix_gyration.html">gyration</A> - compute radius of gyration
|
2007-10-27 04:42:35 +08:00
|
|
|
<LI><A HREF = "fix_heat.html">heat</A> - add/subtract momentum-conserving heat
|
2007-10-05 23:39:59 +08:00
|
|
|
<LI><A HREF = "fix_indent.html">indent</A> - impose force due to an indenter
|
|
|
|
<LI><A HREF = "fix_langevin.html">langevin</A> - Langevin temperature control
|
|
|
|
<LI><A HREF = "fix_lineforce.html">lineforce</A> - constrain atoms to move in a line
|
|
|
|
<LI><A HREF = "fix_msd.html">msd</A> - compute mean-squared displacement (i.e. diffusion coefficient)
|
|
|
|
<LI><A HREF = "fix_momentum.html">momentum</A> - zero the linear and/or angular momentum of a group of atoms
|
|
|
|
<LI><A HREF = "fix_nph.html">nph</A> - constant NPH time integration via Nose/Hoover
|
|
|
|
<LI><A HREF = "fix_npt.html">npt</A> - constant NPT time integration via Nose/Hoover
|
|
|
|
<LI><A HREF = "fix_npt_asphere.html">npt/asphere</A> - NPT for aspherical particles
|
|
|
|
<LI><A HREF = "fix_nve.html">nve</A> - constant NVE time integration
|
|
|
|
<LI><A HREF = "fix_nve_asphere.html">nve/asphere</A> - NVT for aspherical particles
|
|
|
|
<LI><A HREF = "fix_nve_dipole.html">nve/dipole</A> - NVE for point dipolar particles
|
|
|
|
<LI><A HREF = "fix_nve_gran.html">nve/gran</A> - NVE for granular particles
|
|
|
|
<LI><A HREF = "fix_nve_limit.html">nve/limit</A> - NVE with limited step length
|
|
|
|
<LI><A HREF = "fix_nve_noforce.html">nve/noforce</A> - NVE without forces (v only)
|
|
|
|
<LI><A HREF = "fix_nvt.html">nvt</A> - constant NVT time integration via Nose/Hoover
|
|
|
|
<LI><A HREF = "fix_nvt_asphere.html">nvt/asphere</A> - NVT for aspherical particles
|
|
|
|
<LI><A HREF = "fix_nvt_sllod.html">nvt/sllod</A> - NVT for NEMD with SLLOD equations
|
|
|
|
<LI><A HREF = "fix_orient_fcc.html">orient/fcc</A> - add grain boundary migration force
|
|
|
|
<LI><A HREF = "fix_planeforce.html">planeforce</A> - constrain atoms to move in a plane
|
|
|
|
<LI><A HREF = "fix_poems.html">poems</A> - constrain clusters of atoms to move as coupled rigid bodies
|
|
|
|
<LI><A HREF = "fix_pour.html">pour</A> - pour new atoms into a granular simulation domain
|
|
|
|
<LI><A HREF = "fix_print.html">print</A> - print text and variables during a simulation
|
|
|
|
<LI><A HREF = "fix_rdf.html">rdf</A> - compute radial distribution functions
|
|
|
|
<LI><A HREF = "fix_recenter.html">recenter</A> - constrain the center-of-mass position of a group of atoms
|
|
|
|
<LI><A HREF = "fix_rigid.html">rigid</A> - constrain one or more clusters of atoms to move as a rigid body
|
|
|
|
<LI><A HREF = "fix_setforce.html">setforce</A> - set the force on each atom
|
|
|
|
<LI><A HREF = "fix_shake.html">shake</A> - SHAKE constraints on bonds and/or angles
|
|
|
|
<LI><A HREF = "fix_spring.html">spring</A> - apply harmonic spring force to group of atoms
|
|
|
|
<LI><A HREF = "fix_spring_rg.html">spring/rg</A> - spring on radius of gyration of group of atoms
|
|
|
|
<LI><A HREF = "fix_spring_self.html">spring/self</A> - spring from each atom to its origin
|
|
|
|
<LI><A HREF = "fix_temp_rescale.html">temp/rescale</A> - temperature control by velocity rescaling
|
|
|
|
<LI><A HREF = "fix_tmd.html">tmd</A> - guide a group of atoms to a new configuration
|
2007-10-17 02:39:08 +08:00
|
|
|
<LI><A HREF = "fix_viscosity.html">viscosity</A> - Muller-Plathe momentum exchange for viscosity calculation
|
2007-10-05 23:39:59 +08:00
|
|
|
<LI><A HREF = "fix_viscous.html">viscous</A> - viscous damping for granular simulations
|
|
|
|
<LI><A HREF = "fix_wall_gran.html">wall/gran</A> - frictional wall(s) for granular simulations
|
|
|
|
<LI><A HREF = "fix_wall_lj126.html">wall/lj126</A> - Lennard-Jones 12-6 wall
|
|
|
|
<LI><A HREF = "fix_wall_lj93.html">wall/lj93</A> - Lennard-Jones 9-3 wall
|
|
|
|
<LI><A HREF = "fix_wall_reflect.html">wall/reflect</A> - reflecting wall(s)
|
|
|
|
<LI><A HREF = "fix_wiggle.html">wiggle</A> - oscillate walls and frozen atoms
|
2006-09-22 00:22:34 +08:00
|
|
|
</UL>
|
2007-10-03 06:56:45 +08:00
|
|
|
<P>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 <A HREF = "Section_commands.html#3_5">this
|
|
|
|
page</A>.
|
|
|
|
</P>
|
2006-09-22 00:22:34 +08:00
|
|
|
<P><B>Restrictions:</B>
|
|
|
|
</P>
|
|
|
|
<P>Some fix styles are part of specific packages. They are only enabled
|
2007-06-25 22:36:36 +08:00
|
|
|
if LAMMPS was built with that package. See the <A HREF = "Section_start.html#2_3">Making
|
|
|
|
LAMMPS</A> 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
|
|
|
</P>
|
|
|
|
<P><B>Related commands:</B>
|
|
|
|
</P>
|
|
|
|
<P><A HREF = "unfix.html">unfix</A>, <A HREF = "fix_modify.html">fix_modify</A>
|
|
|
|
</P>
|
|
|
|
<P><B>Default:</B> none
|
|
|
|
</P>
|
|
|
|
</HTML>
|