LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Commands

### fix spring/self command

Syntax:

    fix ID group-ID spring/self K

- ID, group-ID are documented in fix command
- spring/self = style name of this fix command
- K = spring constant (force/distance units)

Examples:

    fix tether boundary-atoms spring/self 10.0

Description:

Apply a spring force independently to each atom in the group to tether it to its initial position. The initial position for each atom is its location at the time the fix command was issued. At each timestep, the magnitude of the force on each atom is -Kr, where r is the displacement of the atom from its current position to its initial position.

Restart, fix_modify, output, run start/stop, minimize info:

This fix writes the original coordinates of tethered atoms to binary restart files, so that the spring effect will be the same in a restarted simulation. See the read_restart command for info on how to re-specify a fix in an input script that reads a restart file, so that the operation of the fix continues in an uninterrupted fashion.

The fix_modify energy option is supported by this fix to add the energy stored in the per-atom springs to the system's potential energy as part of thermodynamic output.

This fix computes a scalar energy which can be accessed by various output commands. This energy is the sum of the spring energy for each atom, where the per-atom energy is 0.5 * K * r^2.

No parameter of this fix can be used with the start/stop keywords of the run command.

The forces due to this fix are imposed during an energy minimization, invoked by the minimize command.

IMPORTANT NOTE: If you want the per-atom spring energy to be included in the total potential energy of the system (the quantity being minimized), you MUST enable the fix_modify energy option for this fix.

Restrictions: none

Related commands:

fix drag, fix spring, fix smd, fix spring/rg

Default: none