lammps/doc/pair_modify.txt

176 lines
7.2 KiB
Plaintext
Raw Normal View History

"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
pair_modify command :h3
[Syntax:]
pair_modify keyword value ... :pre
one or more keyword/value pairs may be listed :ulb,l
keyword = {shift} or {mix} or {table} or {tabinner} or {tail} or {compute} :l
{mix} value = {geometric} or {arithmetic} or {sixthpower}
{shift} value = {yes} or {no}
{table} value = N
2^N = # of values in table
{tabinner} value = cutoff
cutoff = inner cutoff at which to begin table (distance units)
{tail} value = {yes} or {no}
{compute} value = {yes} or {no} :pre
:ule
[Examples:]
pair_modify shift yes mix geometric
pair_modify tail yes
pair_modify table 12 :pre
[Description:]
Modify the parameters of the currently defined pair style. Not all
parameters are relevant to all pair styles.
The {mix} keyword affects pair coefficients for interactions between
atoms of type I and J, when I != J and the coefficients are not
explicitly set in the input script. Note that coefficients for I = J
must be set explicitly, either in the input script via the
"pair_coeff" command or in the "Pair Coeffs" section of the "data
file"_read_data.html. For some pair styles it is not necessary to
specify coefficients when I != J, since a "mixing" rule will create
them from the I,I and J,J settings. The pair_modify {mix} value
determines what formulas are used to compute the mixed coefficients.
In each case, the cutoff distance is mixed the same way as sigma.
Note that not all pair styles support mixing. Also, some mix options
are not available for certain pair styles. See the doc page for
individual pair styles for those restrictions. Note also that the
"pair_coeff"_pair_coeff.html command also can be to directly set
coefficients for a specific I != J pairing, in which case no mixing is
performed.
mix {geometric}
epsilon_ij = sqrt(epsilon_i * epsilon_j)
sigma_ij = sqrt(sigma_i * sigma_j) :pre
mix {arithmetic}
epsilon_ij = sqrt(epsilon_i * epsilon_j)
sigma_ij = (sigma_i + sigma_j) / 2 :pre
mix {sixthpower}
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
The {shift} keyword determines whether a 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 included in the thermodynamic
output, but does not affect pair forces or atom trajectories. See the
doc page for individual pair styles to see which ones support this
option.
The {table} keyword applies to pair styles with a long-range Coulombic
term; see the doc page for individual styles to see which potentials
support this option. 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 "(Wolff)"_#Wolff 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.
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.
The {tabinner} 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.
When the {tail} keyword is set to {yes}, certain pair styles will add
a long-range VanderWaals tail "correction" to the energy and pressure.
See the doc page for individual styles to see which support this
option. These corrections are included in the calculation and
printing of thermodynamic quantities (see the
"thermo_style"_thermo_style.html command). Their effect will also be
included in constant NPT or NPH simulations where the pressure
influences the simulation box dimensions (e.g. the "fix
npt"_fix_nh.html and "fix nph"_fix_nh.html commands). The formulas
used for the long-range corrections come from equation 5 of
"(Sun)"_#Sun.
Several assumptions are inherent in using tail corrections, including
the following:
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. :ulb,l
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. :l
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. :l,ule
The {compute} keyword allows pairwise computations to be turned off,
even though a "pair_style"_pair_style.html is defined. This is not
useful for running a real simulation, but can be useful for debugging
purposes or for computing only partial forces that do not include the
pairwise contribution. You can also do this by simply not defining a
"pair_style"_pair_style.html, but a Kspace-compatible pair_style is
required if you also want to define a
"kspace_style"_kspace_style.html. This keyword gives you that option.
[Restrictions:] none
You cannot use {shift} yes with {tail} yes, since those are
conflicting options. You cannot use {tail} yes with 2d simulations.
[Related commands:]
"pair_style"_pair_style.html, "pair_coeff"_pair_coeff.html,
"thermo_style"_thermo_style.html
[Default:]
The option defaults are mix = geometric, shift = no, table = 12,
tabinner = sqrt(2.0), tail = no, and compute = yes.
Note that some pair styles perform mixing, but only a certain style of
mixing. See the doc pages for individual pair styles for details.
:line
:link(Wolff)
[(Wolff)] Wolff and Rudd, Comp Phys Comm, 120, 200-32 (1999).
:link(Sun)
[(Sun)] Sun, J Phys Chem B, 102, 7338-7364 (1998).