lammps/doc/pair_modify.html

184 lines
7.4 KiB
HTML
Raw Normal View History

<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>
<H3>pair_modify command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>pair_modify keyword value ...
</PRE>
<UL><LI>one or more keyword/value pairs may be listed
<LI>keyword = <I>shift</I> or <I>mix</I> or <I>table</I> or <I>tabinner</I> or <I>tail</I>
<PRE> <I>shift</I> value = <I>yes</I> or <I>no</I>
<I>mix</I> value = <I>geometric</I> or <I>arithmetic</I> or <I>sixthpower</I>
<I>table</I> value = N
2^N = # of values in table
<I>tabinner</I> value = cutoff
cutoff = inner cutoff at which to begin table (distance units)
<I>tail</I> value = <I>yes</I> or <I>no</I>
</PRE>
</UL>
<P><B>Examples:</B>
</P>
<PRE>pair_modify shift yes mix geometric
pair_modify tail yes
pair_modify table 12
</PRE>
<P><B>Description:</B>
</P>
<P>Modify the parameters of the currently defined pair style. Not all
parameters are relevant to all pair styles.
</P>
<P>The <I>shift</I> keyword determines whether the Lennard-Jones potential is
shifted at its cutoff to 0.0. If so, this adds an energy term to each
pairwise interaction which will be printed in the thermodynamic
output, but does not affect atom dynamics (forces). Pair styles that
are already 0.0 at their cutoff such as <I>lj/charmm/coul/charmm</I> are
not affected by this setting.
</P>
<P>The <I>mix</I> keyword affects how Lennard-Jones coefficients for epsilon
and sigma are generated for interactions between atoms of type I and
J, when I != J. (I = J coefficients are set explicitly in the data
file or input script.) The <A HREF = "pair_coeff.html">pair_coeff</A> command can
be used in the input script to specify epilon/sigma for a specific I,J
pairing, which overrides the setting of the <I>mix</I> keyword. In each
case, the LJ cutoff is mixed the same way as sigma.
</P>
<P>These are the formulas used by the 3 <I>mix</I> options:
</P>
<P><I>geometric</I>
</P>
<PRE>epsilon_ij = sqrt(epsilon_i * epsilon_j)
sigma_ij = sqrt(sigma_i * sigma_j)
</PRE>
<P><I>arithmetic</I>
</P>
<PRE>epsilon_ij = sqrt(epsilon_i * epsilon_j)
sigma_ij = (sigma_i + sigma_j) / 2
</PRE>
<P><I>sixthpower</I>
</P>
<PRE>epsilon_ij = (2 * sqrt(epsilon_i*epsilon_j) * sigma_i^3 * sigma_j^3) /
(sigma_i^6 + sigma_j^6)
sigma_ij= ((sigma_i**6 + sigma_j**6) / 2) ^ (1/6)
</PRE>
<P>Style <I>soft</I> only uses a pre-factor coefficient, which is always mixed
geometrically, regardless of the <I>mix</I> setting. The <I>charmm</I> styles
are always mixed arithmetically, regardless of the <I>mix</I> setting. The
<I>class2</I> styles are always mixed as a sixthpower, regardless of the
<I>mix</I> setting, except that the cutoff is mixed according to the mix
setting. Style <I>lj/expand</I> always mixes its delta coefficient using
the rule
</P>
<PRE>delta_ij = (delta_i + delta_j) / 2
</PRE>
<P>The <I>table</I> keyword applies to pair styles with a long-range Coulombic
term (lj/cut/coul/long and lj/charmm/coul/long). If N is non-zero, a
table of length 2^N is pre-computed for forces and energies, which can
shrink their computational cost by up to a factor of 2. The table is
indexed via a bit-mapping technique <A HREF = "#Wolff">(Wolff)</A> and a linear
interpolation is performed between adjacent table values. In our
experiments with different table styles (lookup, linear, spline), this
method typically gave the best performance in terms of speed and
accuracy.
</P>
<P>The choice of table length is a tradeoff in accuracy versus speed. A
larger N yields more accurate force computations, but requires more
memory which can slow down the computation due to cache misses. A
reasonable value of N is between 8 and 16. The default value of 12
(table of length 4096) gives approximately the same accuracy as the
no-table (N = 0) option. For N = 0, forces and energies are computed
directly, using a polynomial fit for the needed erfc() function
evaluation, which is what earlier versions of LAMMPS did. Values
greater than 16 typically slow down the simulation and will not
improve accuracy; values from 1 to 8 give unreliable results.
</P>
<P>The <I>tabinner</I> keyword sets an inner cutoff above which the pairwise
computation is done by table lookup (if tables are invoked). The
smaller this value is set, the less accurate the table becomes (for a
given number of table values), which can require use of larger tables.
The default cutoff value is sqrt(2.0) distance units which means
nearly all pairwise interactions are computed via table lookup for
simulations with "real" units, but some close pairs may be computed
directly (non-table) for simulations with "lj" units.
</P>
<P>When the <I>tail</I> keyword is set to <I>yes</I>, long-range VanderWaals tail
"corrections" are added to the energy and pressure. These are
included in the calculation and printing of thermodynamic quantities
(see the <A HREF = "thermo_style.html">thermo_style</A> command). Their effect will
also be included in constant NPT or NPH simulations where the pressure
influences the simulation box dimensions (see the <A HREF = "fix_npt.html">fix
npt</A> and <A HREF = "fix_nph.html">fix nph</A> commands).
</P>
<P>The <I>tail</I> keyword is only supported by <A HREF = "pair_style.html">pair_style</A>
pairwise potentials which include Lennard-Jones interactions which are
cutoff at a non-zero energy. This does not include the LJ CHARMM
potentials or <I>lj/smooth</I> since they go to zero at the cutoff. The
formulas used for the long-range corrections come from equation 5 of
<A HREF = "#Sun">(Sun)</A>.
</P>
<P>Several assumptions are inherent in using tail corrections, including
the following:
</P>
<UL><LI>The simulated system is a 3d bulk homogeneous liquid. This option
should not be used for systems that are non-liquid, 2d, have a slab
geometry (only 2d periodic), or inhomogeneous.
<LI>G(r), the radial distribution function (rdf), is unity beyond the
cutoff, so a fairly large cutoff should be used (i.e. 2.5 sigma for an
LJ fluid), and it is probably a good idea to verify this assumption by
checking the rdf. The rdf is not exactly unity beyond the cutoff for
each pair of interaction types, so the tail correction is necessarily
an approximation.
<LI>Thermophysical properties obtained from calculations with this option
enabled will not be thermodynamically consistent with the truncated
force-field that was used. In other words, atoms do not feel any LJ
pair interactions beyond the cutoff, but the energy and pressure
reported by the simulation include an estimated contribution from
those interactions.
</UL>
<P><B>Restrictions:</B> none
</P>
<P>Not all pair styles support mixing. See the doc page for individual
pair styles for details.
</P>
<P>You cannot use <I>shift</I> yes with <I>tail</I> yes, since those are
conflicting options.
</P>
<P>You cannot use <I>tail</I> yes with 2d simulations.
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "pair_style.html">pair_style</A>, <A HREF = "pair_coeff.html">pair_coeff</A>,
<A HREF = "thermo_style.html">thermo_style</A>
</P>
<P><B>Default:</B>
</P>
<P>The option defaults are shift = no, mix = arithmetic (for lj/charmm
pair styles), mix = geometric (for other pair styles), table = 12,
and tabinner = sqrt(2.0), tail = no.
</P>
<HR>
<A NAME = "Wolff"></A>
<P><B>(Wolff)</B> Wolff and Rudd, Comp Phys Comm, 120, 200-32 (1999).
</P>
<A NAME = "Sun"></A>
<P><B>(Sun)</B> Sun, J Phys Chem B, 102, 7338-7364 (1998).
</P>
</HTML>