<p>Apply a spring force to a group of atoms or between two groups of
atoms. This is useful for applying an umbrella force to a small
molecule or lightly tethering a large group of atoms (e.g. all the
solvent or a large molecule) to the center of the simulation box so
that it doesn’t wander away over the course of a long simulation. It
can also be used to hold the centers of mass of two groups of atoms at
a given distance or orientation with respect to each other.</p>
<p>The <em>tether</em> style attaches a spring between a fixed point <em>x,y,z</em> and
the center of mass of the fix group of atoms. The equilibrium
position of the spring is R0. At each timestep the distance R from
the center of mass of the group of atoms to the tethering point is
computed, taking account of wrap-around in a periodic simulation box.
A restoring force of magnitude K (R - R0) Mi / M is applied to each
atom in the group where <em>K</em> is the spring constant, Mi is the mass of
the atom, and M is the total mass of all atoms in the group. Note
that <em>K</em> thus represents the spring constant for the total force on
the group of atoms, not for a spring applied to each atom.</p>
<p>The <em>couple</em> style links two groups of atoms together. The first
group is the fix group; the second is specified by group-ID2. The
groups are coupled together by a spring that is at equilibrium when
the two groups are displaced by a vector <em>x,y,z</em> with respect to each
other and at a distance R0 from that displacement. Note that <em>x,y,z</em>
is the equilibrium displacement of group-ID2 relative to the fix
group. Thus (1,1,0) is a different spring than (-1,-1,0). When the
relative positions and distance between the two groups are not in
equilibrium, the same spring force described above is applied to atoms
in each of the two groups.</p>
<p>For both the <em>tether</em> and <em>couple</em> styles, any of the x,y,z values can
be specified as NULL which means do not include that dimension in the
distance calculation or force application.</p>
<p>The first example above pulls the ligand towards the point (0,0,0).
The second example holds the ligand near the surface of a sphere of
radius 5 around the point (0,0,0). The third example holds the ligand
a distance 3 away from the z=2 plane (on either side).</p>
<p>The fourth example holds 2 bilayers a distance 10 apart in z. For the
last two examples, imagine a pore (a slab of atoms with a cylindrical
hole cut out) oriented with the pore axis along z, and an ion moving
within the pore. The fifth example holds the ion a distance of -20
below the z = 0 center plane of the pore (umbrella sampling). The
last example holds the ion a distance 5 away from the pore axis
(assuming the center-of-mass of the pore in x,y is the pore axis).</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The center of mass of a group of atoms is calculated in
“unwrapped” coordinates using atom image flags, which means that the
group can straddle a periodic boundary. See the <a class="reference internal" href="dump.html"><span class="doc">dump</span></a> doc
page for a discussion of unwrapped coordinates. It also means that a
spring connecting two groups or a group and the tether point can cross
a periodic boundary and its length be calculated correctly. One
exception is for rigid bodies, which should not be used with the fix
spring command, if the rigid body will cross a periodic boundary.
This is because image flags for rigid bodies are used in a different
way, as explained on the <a class="reference internal" href="fix_rigid.html"><span class="doc">fix rigid</span></a> doc page.</p>
</div>
<p><strong>Restart, fix_modify, output, run start/stop, minimize info:</strong></p>
<p>No information about this fix is written to <a class="reference internal" href="restart.html"><span class="doc">binary restart files</span></a>.</p>
<p>The <a class="reference internal" href="fix_modify.html"><span class="doc">fix_modify</span></a> <em>energy</em> option is supported by this
fix to add the energy stored in the spring to the system’s potential
energy as part of <a class="reference internal" href="thermo_style.html"><span class="doc">thermodynamic output</span></a>.</p>
<p>The <a class="reference internal" href="fix_modify.html"><span class="doc">fix_modify</span></a> <em>respa</em> option is supported by this
fix. This allows to set at which level of the <a class="reference internal" href="run_style.html"><span class="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
<a class="reference internal" href="Section_howto.html#howto-15"><span class="std std-ref">output commands</span></a>. The scalar is the
spring energy = 0.5 * K * r^2.</p>
<p>This fix also computes global 4-vector which can be accessed by
various <a class="reference internal" href="Section_howto.html#howto-15"><span class="std std-ref">output commands</span></a>. The first 3
quantities in the vector are xyz components of the total force added
to the group of atoms by the spring. In the case of the <em>couple</em>
style, it is the force on the fix group (group-ID) or the negative of
the force on the 2nd group (group-ID2). The 4th quantity in the
vector is the magnitude of the force added by the spring, as a
positive value if (r-R0) > 0 and a negative value if (r-R0) < 0. This
sign convention can be useful when using the spring force to compute a
potential of mean force (PMF).</p>
<p>The scalar and vector values calculated by this fix are “extensive”.</p>
<p>No parameter of this fix can be used with the <em>start/stop</em> keywords of
the <a class="reference internal" href="run.html"><span class="doc">run</span></a> command.</p>
<p>The forces due to this fix are imposed during an energy minimization,
invoked by the <a class="reference internal" href="minimize.html"><span class="doc">minimize</span></a> command.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If you want the spring energy to be included in the total
potential energy of the system (the quantity being minimized), you
MUST enable the <a class="reference internal" href="fix_modify.html"><span class="doc">fix_modify</span></a> <em>energy</em> option for this
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.