<p>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. The distance r correctly takes into account any crossings
of periodic boundary by the atom since it was in its intitial
position.</p>
<p>With the (optional) dir flag, one can select in which direction the
spring force is applied. By default, the restraint is applied in all
directions, but it can be limited to the xy-, xz-, yz-plane and the
x-, y-, or z-direction, thus restraining the atoms to a line or a
plane, respectively.</p>
<p><strong>Restart, fix_modify, output, run start/stop, minimize info:</strong></p>
<p>This fix writes the original coordinates of tethered atoms to <aclass="reference internal"href="restart.html"><spanclass="doc">binary restart files</span></a>, so that the spring effect will be the
same in a restarted simulation. See the
<aclass="reference internal"href="read_restart.html"><spanclass="doc">read_restart</span></a> 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.</p>
<p>The <aclass="reference internal"href="fix_modify.html"><spanclass="doc">fix_modify</span></a><em>energy</em> 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 <aclass="reference internal"href="thermo_style.html"><spanclass="doc">thermodynamic output</span></a>.</p>
<p>The <aclass="reference internal"href="fix_modify.html"><spanclass="doc">fix_modify</span></a><em>respa</em> option is supported by
this fix. This allows to set at which level of the <aclass="reference internal"href="run_style.html"><spanclass="doc">r-RESPA</span></a>
integrator the fix is adding its forces. Default is the outermost level.</p>
<p>This fix computes a global scalar which can be accessed by various
<aclass="reference internal"href="Section_howto.html#howto-15"><spanclass="std std-ref">output commands</span></a>. The scalar is an
energy which is the sum of the spring energy for each atom, where the
per-atom energy is 0.5 * K * r^2. The scalar value calculated by this
fix is “extensive”.</p>
<p>No parameter of this fix can be used with the <em>start/stop</em> keywords of
the <aclass="reference internal"href="run.html"><spanclass="doc">run</span></a> command.</p>
<p>The forces due to this fix are imposed during an energy minimization,
invoked by the <aclass="reference internal"href="minimize.html"><spanclass="doc">minimize</span></a> command.</p>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<pclass="last">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 <aclass="reference internal"href="fix_modify.html"><spanclass="doc">fix_modify</span></a><em>energy</em> option for
Built with <ahref="http://sphinx-doc.org/">Sphinx</a> using a <ahref="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.