use the diameter for sigma in lj/sphere. update docs
This commit is contained in:
@ -54,7 +54,7 @@ Examples
|
||||
|
||||
pair_style lepton/sphere 2.5
|
||||
pair_coeff 1 * "k*((r-r0)^2*step(r0-r)); k=200; r0=radi+radj"
|
||||
pair_coeff 2 2 "4.0*eps*((sig/r)^12 - (sig/r)^6); eps=1.0; sig=sqrt(radi*radj)"
|
||||
pair_coeff 2 2 "4.0*eps*((sig/r)^12 - (sig/r)^6); eps=1.0; sig=2.0*sqrt(radi*radj)"
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
@ -72,9 +72,12 @@ using "r" as the distance variable. With pair style *lepton/coul* one
|
||||
may additionally reference the charges of the two atoms of the pair with
|
||||
"qi" and "qj", respectively. With pair style *lepton/coul* one may
|
||||
instead reference the radii of the two atoms of the pair with "radi" and
|
||||
"radj", respectively. Note that further constants in the expression can
|
||||
be defined in the same string as additional expressions separated by
|
||||
semi-colons as shown in the examples above.
|
||||
"radj", respectively; this is half of the diameter that can be set in
|
||||
:doc:`data files <read_data>` or the :doc:`set command <set>`.
|
||||
|
||||
Note that further constants in the expressions can be defined in the
|
||||
same string as additional expressions separated by semi-colons as shown
|
||||
in the examples above.
|
||||
|
||||
The expression `"200.0*(r-1.5)^2"` represents a harmonic potential
|
||||
around the pairwise distance :math:`r_0` of 1.5 distance units and a
|
||||
|
||||
@ -47,10 +47,11 @@ given by
|
||||
This is the same potential function as used by the :doc:`lj/cut
|
||||
<pair_lj>` pair style, but the :math:`\sigma_{ij}` parameter is not set
|
||||
as a per-type parameter via the :doc:`pair_coeff command <pair_coeff>`,
|
||||
but taken from the per-atom radius attribute of :doc:`atom_style sphere
|
||||
<atom_style>`. The individual value of :math:`\sigma_{ij}` is computed
|
||||
using the mixing rule for pair coefficients as set by the
|
||||
:doc:`pair_modify mix <pair_modify>` command.
|
||||
but taken from the per-atom diameter attribute of :doc:`atom_style
|
||||
sphere <atom_style>`. The individual value of :math:`\sigma_{ij}` is
|
||||
computed from the diameters of the two atoms using the mixing rule for
|
||||
pair coefficients as set by the :doc:`pair_modify mix <pair_modify>`
|
||||
command (defaults to geometric mixing).
|
||||
|
||||
Note that :math:`\sigma_{ij}` is defined in the LJ formula above as the
|
||||
zero-crossing distance for the potential, *not* as the energy minimum which
|
||||
|
||||
@ -101,7 +101,7 @@ void PairLJSphere::compute(int eflag, int vflag)
|
||||
r2inv = 1.0 / rsq;
|
||||
r6inv = r2inv * r2inv * r2inv;
|
||||
|
||||
sigma6 = powint(mix_distance(rtmp, radius[j]), 6);
|
||||
sigma6 = powint(2.0 * mix_distance(rtmp, radius[j]), 6);
|
||||
forcelj = r6inv * 24.0 * epsilon[itype][jtype] * (2.0 * sigma6 * sigma6 * r6inv - sigma6);
|
||||
fpair = factor_lj * forcelj * r2inv;
|
||||
|
||||
@ -330,7 +330,7 @@ double PairLJSphere::single(int i, int j, int itype, int jtype, double rsq, doub
|
||||
{
|
||||
double r2inv, r6inv, sigma6, forcelj, philj;
|
||||
|
||||
sigma6 = powint(mix_distance(atom->radius[i], atom->radius[j]), 6);
|
||||
sigma6 = powint(2.0 * mix_distance(atom->radius[i], atom->radius[j]), 6);
|
||||
r2inv = 1.0 / rsq;
|
||||
r6inv = r2inv * r2inv * r2inv;
|
||||
forcelj = r6inv * 24.0 * epsilon[itype][jtype] * (sigma6 * sigma6 * r6inv - sigma6);
|
||||
|
||||
@ -127,7 +127,7 @@ void PairLJSphereOMP::eval(int iifrom, int iito, ThrData *const thr)
|
||||
r2inv = 1.0 / rsq;
|
||||
r6inv = r2inv * r2inv * r2inv;
|
||||
|
||||
sigma6 = powint(mix_distance(rtmp, radius[j]), 6);
|
||||
sigma6 = powint(2.0 * mix_distance(rtmp, radius[j]), 6);
|
||||
forcelj = r6inv * 24.0 * epsiloni[jtype] * (2.0 * sigma6 * sigma6 * r6inv - sigma6);
|
||||
fpair = factor_lj * forcelj * r2inv;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user