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.
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!
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 command.
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, nve/gran, pour, and wall/gran styles are part of the "granular" package.
The poems style is part of the "poems" package.
Related commands:
Default: none