2006-09-22 00:22:34 +08:00
|
|
|
<HTML>
|
|
|
|
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
|
|
|
|
</CENTER>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<HR>
|
|
|
|
|
2007-03-28 00:58:07 +08:00
|
|
|
<H3>fix shake command
|
2006-09-22 00:22:34 +08:00
|
|
|
</H3>
|
2011-06-09 05:46:03 +08:00
|
|
|
<H3>fix shake/cuda command
|
|
|
|
</H3>
|
2006-09-22 00:22:34 +08:00
|
|
|
<P><B>Syntax:</B>
|
|
|
|
</P>
|
2014-01-08 02:06:02 +08:00
|
|
|
<PRE>fix ID group-ID shake tol iter N constraint values ... keyword value ...
|
2006-09-22 00:22:34 +08:00
|
|
|
</PRE>
|
|
|
|
<UL><LI>ID, group-ID are documented in <A HREF = "fix.html">fix</A> command
|
|
|
|
|
|
|
|
<LI>shake = style name of this fix command
|
|
|
|
|
|
|
|
<LI>tol = accuracy tolerance of SHAKE solution
|
|
|
|
|
|
|
|
<LI>iter = max # of iterations in each SHAKE solution
|
|
|
|
|
|
|
|
<LI>N = print SHAKE statistics every this many timesteps (0 = never)
|
|
|
|
|
2014-01-08 02:06:02 +08:00
|
|
|
<LI>one or more constraint/value pairs are appended
|
2006-09-22 00:22:34 +08:00
|
|
|
|
2014-01-08 02:06:02 +08:00
|
|
|
<LI>constraint = <I>b</I> or <I>a</I> or <I>t</I> or <I>m</I>
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
<PRE> <I>b</I> values = one or more bond types
|
|
|
|
<I>a</I> values = one or more angle types
|
|
|
|
<I>t</I> values = one or more atom types
|
|
|
|
<I>m</I> value = one or more mass values
|
|
|
|
</PRE>
|
2014-01-08 02:06:02 +08:00
|
|
|
<LI>zero or more keyword/value pairs may be appended
|
|
|
|
|
|
|
|
<LI>keyword = <I>mol</I>
|
|
|
|
|
|
|
|
<PRE> <I>mol</I> value = template-ID
|
|
|
|
template-ID = ID of molecule template specified in a separate <A HREF = "molecule.html">molecule</A> command
|
|
|
|
</PRE>
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
</UL>
|
|
|
|
<P><B>Examples:</B>
|
|
|
|
</P>
|
|
|
|
<PRE>fix 1 sub shake 0.0001 20 10 b 4 19 a 3 5 2
|
2014-01-08 02:06:02 +08:00
|
|
|
fix 1 sub shake 0.0001 20 10 t 5 6 m 1.0 a 31
|
|
|
|
fix 1 sub shake 0.0001 20 10 t 5 6 m 1.0 a 31 mol myMol
|
2006-09-22 00:22:34 +08:00
|
|
|
</PRE>
|
|
|
|
<P><B>Description:</B>
|
|
|
|
</P>
|
|
|
|
<P>Apply bond and angle constraints to specified bonds and angles in the
|
|
|
|
simulation. This typically enables a longer timestep.
|
|
|
|
</P>
|
|
|
|
<P>Each timestep the specified bonds and angles are reset to their
|
|
|
|
equilibrium lengths and angular values via the well-known SHAKE
|
|
|
|
algorithm. This is done by applying an additional constraint force so
|
|
|
|
that the new positions preserve the desired atom separations. The
|
|
|
|
equations for the additional force are solved via an iterative method
|
|
|
|
that typically converges to an accurate solution in a few iterations.
|
|
|
|
The desired tolerance (e.g. 1.0e-4 = 1 part in 10000) and maximum # of
|
|
|
|
iterations are specified as arguments. Setting the N argument will
|
|
|
|
print statistics to the screen and log file about regarding the
|
|
|
|
lengths of bonds and angles that are being constrained. Small delta
|
|
|
|
values mean SHAKE is doing a good job.
|
|
|
|
</P>
|
|
|
|
<P>In LAMMPS, only small clusters of atoms can be constrained. This is
|
|
|
|
so the constraint calculation for a cluster can be performed by a
|
|
|
|
single processor, to enable good parallel performance. A cluster is
|
|
|
|
defined as a central atom connected to others in the cluster by
|
|
|
|
constrained bonds. LAMMPS allows for the following kinds of clusters
|
|
|
|
to be constrained: one central atom bonded to 1 or 2 or 3 atoms, or
|
|
|
|
one central atom bonded to 2 others and the angle between the 3 atoms
|
2008-03-01 09:13:20 +08:00
|
|
|
also constrained. This means water molecules or CH2 or CH3 groups may
|
2006-09-22 00:22:34 +08:00
|
|
|
be constrained, but not all the C-C backbone bonds of a long polymer
|
|
|
|
chain.
|
|
|
|
</P>
|
2014-01-08 02:06:02 +08:00
|
|
|
<P>The <I>b</I> constraint lists bond types that will be constrained. The <I>t</I>
|
|
|
|
constraint lists atom types. All bonds connected to an atom of the
|
|
|
|
specified type will be constrained. The <I>m</I> constraint lists atom
|
2006-09-22 00:22:34 +08:00
|
|
|
masses. All bonds connected to atoms of the specified masses will be
|
|
|
|
constrained (within a fudge factor of MASSDELTA specified in
|
2014-01-08 02:06:02 +08:00
|
|
|
fix_shake.cpp). The <I>a</I> constraint lists angle types. If both bonds
|
|
|
|
in the angle are constrained then the angle will also be constrained
|
|
|
|
if its type is in the list.
|
2006-09-22 00:22:34 +08:00
|
|
|
</P>
|
2014-01-08 02:06:02 +08:00
|
|
|
<P>For all constraints, a particular bond is only constrained if both
|
|
|
|
atoms in the bond are in the group specified with the SHAKE fix.
|
2006-09-22 00:22:34 +08:00
|
|
|
</P>
|
|
|
|
<P>The degrees-of-freedom removed by SHAKE bonds and angles are accounted
|
|
|
|
for in temperature and pressure computations. Similarly, the SHAKE
|
2008-01-10 23:50:00 +08:00
|
|
|
contribution to the pressure of the system (virial) is also accounted
|
|
|
|
for.
|
2006-09-22 00:22:34 +08:00
|
|
|
</P>
|
2012-01-20 23:13:16 +08:00
|
|
|
<P>IMPORTANT NOTE: This command works by using the current forces on
|
|
|
|
atoms to caculate an additional constraint force which when added will
|
|
|
|
leave the atoms in positions that satisfy the SHAKE constraints
|
|
|
|
(e.g. bond length) after the next time integration step. If you
|
|
|
|
define fixes (e.g. <A HREF = "fix_efield.html">fix efield</A>) that add additional
|
|
|
|
force to the atoms after fix shake operates, then this fix will not
|
|
|
|
take them into account and the time integration will typically not
|
|
|
|
satisfy the SHAKE constraints. The solution for this is to make sure
|
|
|
|
that fix shake is defined in your input script after any other fixes
|
|
|
|
which add or change forces (to atoms that fix shake operates on).
|
|
|
|
</P>
|
2011-06-09 05:46:03 +08:00
|
|
|
<HR>
|
|
|
|
|
2014-01-08 02:06:02 +08:00
|
|
|
<P>The <I>mol</I> keyword should be used when other commands, such as <A HREF = "fix_deposit.html">fix
|
|
|
|
deposit</A> or <A HREF = "fix_pour.html">fix pour</A>, add molecules
|
|
|
|
on-the-fly during a simulation, and you wish to contrain the new
|
|
|
|
molecules via SHAKE. You specify a <I>template-ID</I> previously defined
|
|
|
|
using the <A HREF = "molecule.html">molecule</A> command, which reads a file that
|
|
|
|
defines the molecule. You must use the same <I>template-ID</I> that the
|
|
|
|
command adding molecules uses. The coordinates, atom types, special
|
|
|
|
bond restrictions, and SHAKE info can be specified in the molecule
|
|
|
|
file. See the <A HREF = "molecule.html">molecule</A> command for details. The only
|
|
|
|
settings required to be in this file (by this command) are the SHAKE
|
|
|
|
info of atoms in the molecule.
|
|
|
|
</P>
|
|
|
|
<HR>
|
|
|
|
|
2011-06-09 05:46:03 +08:00
|
|
|
<P>Styles with a <I>cuda</I> suffix are functionally the same as the
|
|
|
|
corresponding style without the suffix. They have been optimized to
|
|
|
|
run faster, depending on your available hardware, as discussed in
|
2011-12-14 04:35:35 +08:00
|
|
|
<A HREF = "Section_accelerate.html">Section_accelerate</A> of the manual. The
|
|
|
|
accelerated styles take the same arguments and should produce the same
|
|
|
|
results, except for round-off and precision issues.
|
2011-06-09 05:46:03 +08:00
|
|
|
</P>
|
2011-08-27 02:53:00 +08:00
|
|
|
<P>These accelerated styles are part of the USER-CUDA package. They are
|
|
|
|
only enabled if LAMMPS was built with that package. See the <A HREF = "Section_start.html#start_3">Making
|
|
|
|
LAMMPS</A> section for more info.
|
2011-06-09 05:46:03 +08:00
|
|
|
</P>
|
|
|
|
<P>You can specify the accelerated styles explicitly in your input script
|
2012-01-28 07:39:14 +08:00
|
|
|
by including their suffix, or you can use the <A HREF = "Section_start.html#start_7">-suffix command-line
|
2011-08-26 00:46:23 +08:00
|
|
|
switch</A> when you invoke LAMMPS, or you can
|
|
|
|
use the <A HREF = "suffix.html">suffix</A> command in your input script.
|
2011-06-09 05:46:03 +08:00
|
|
|
</P>
|
2011-12-14 04:35:35 +08:00
|
|
|
<P>See <A HREF = "Section_accelerate.html">Section_accelerate</A> of the manual for
|
|
|
|
more instructions on how to use the accelerated styles effectively.
|
2011-06-09 05:46:03 +08:00
|
|
|
</P>
|
|
|
|
<HR>
|
|
|
|
|
2007-10-11 06:28:11 +08:00
|
|
|
<P><B>Restart, fix_modify, output, run start/stop, minimize info:</B>
|
2007-06-26 08:03:39 +08:00
|
|
|
</P>
|
|
|
|
<P>No information about this fix is written to <A HREF = "restart.html">binary restart
|
|
|
|
files</A>. None of the <A HREF = "fix_modify.html">fix_modify</A> options
|
2010-04-03 00:51:06 +08:00
|
|
|
are relevant to this fix. No global or per-atom quantities are stored
|
2011-08-26 01:01:01 +08:00
|
|
|
by this fix for access by various <A HREF = "Section_howto.html#howto_15">output
|
|
|
|
commands</A>. No parameter of this fix can
|
|
|
|
be used with the <I>start/stop</I> keywords of the <A HREF = "run.html">run</A> command.
|
2007-10-11 06:28:11 +08:00
|
|
|
This fix is not invoked during <A HREF = "minimize.html">energy minimization</A>.
|
2007-06-26 08:03:39 +08:00
|
|
|
</P>
|
2006-09-22 00:22:34 +08:00
|
|
|
<P><B>Restrictions:</B>
|
|
|
|
</P>
|
2014-01-08 04:59:37 +08:00
|
|
|
<P>This fix is part of the RIGID package. It is only enabled if LAMMPS
|
|
|
|
was built with that package. See the <A HREF = "Section_start.html#start_3">Making
|
|
|
|
LAMMPS</A> section for more info.
|
|
|
|
</P>
|
2006-09-22 00:22:34 +08:00
|
|
|
<P>For computational efficiency, there can only be one shake fix defined
|
|
|
|
in a simulation.
|
|
|
|
</P>
|
|
|
|
<P>If you use a tolerance that is too large or a max-iteration count that
|
|
|
|
is too small, the constraints will not be enforced very strongly,
|
|
|
|
which can lead to poor energy conservation. You can test for this in
|
|
|
|
your system by running a constant NVE simulation with a particular set
|
|
|
|
of SHAKE parameters and monitoring the energy versus time.
|
|
|
|
</P>
|
|
|
|
<P><B>Related commands:</B> none
|
|
|
|
</P>
|
|
|
|
<P><B>Default:</B> none
|
|
|
|
</P>
|
|
|
|
</HTML>
|