Syntax:
fix ID group-ID style args
Examples:
fix 1 all nve fix 3 all nvt 300.0 300.0 0.01 fix mine top setforce 0.0 NULL 0.0
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 defined in LAMMPS and new ones can be added - see this section for a discussion.
Each fix style has its own documentation page which describes its arguments and what it does. For example, see the fix setforce page for information on style setforce.
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.
Specifying a new fix with the same ID as an existing fix effectively replaces the old fix (and its parameters) with the new fix. This can only be done if the new fix has the same style as the existing fix.
Fixes can be deleted with the unfix 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, using a "fix nve" command for a second run after using a "fix nvt" 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!
Here is an alphabetic list of fix styles defined in LAMMPS:
Restrictions:
Some fix styles are part of specific packages. They are only enabled if LAMMPS was built with that package. See the Making LAMMPS section for more info.
The freeze, gran/diag, gravity, insert, nve/gran, and wall/gran styles are part of the "granular" package.
Related commands:
Default: none