lammps/doc/neighbor.txt

92 lines
3.8 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
neighbor command :h3
[Syntax:]
neighbor skin style :pre
skin = extra distance beyond force cutoff (distance units)
style = {bin} or {nsq} or {multi} :ul
[Examples:]
neighbor 0.3 bin
neighbor 2.0 nsq :pre
[Description:]
This command sets parameters that affect the building of the pairwise
neighbor list. All atom pairs within a cutoff distance equal to the
their force cutoff plus the {skin} distance are stored in the list.
Typically, the larger the skin distance, the less often neighbor lists
need to be built, but more pairs must be checked for possible force
interactions every timestep. The default value for {skin} depends on
the choice of units for the simulation (see below).
The {style} value selects what algorithm is used to build the list.
The {bin} style creates the list by binning which is an operation that
scales linearly with N/P, the number of atoms per processor where N =
total number of atoms and P = number of processors. It is almost
always faster than the {nsq} style which scales as (N/P)^2. For
unsolvated small molecules in a non-periodic box, the {nsq} choice can
sometimes be faster. Either style should give the same answers.
The {multi} style is a modified binning algorithm that is useful for
systems with a wide range of cutoff distances, e.g. due to different
size particles. For the {bin} style, the bin size is set to 1/2 of
the largest cutoff distance between any pair of atom types and a
single set of bins is defined to search over for all atom types. This
can be inefficient if one pair of types has a very long cutoff, but
other type pairs have a much shorter cutoff. For style {multi} the
bin size is set to 1/2 of the shortest cutoff distance and multiple
sets of bins are defined to search over for different atom types.
This imposes some extra setup overhead, but the searches themselves
may be much faster for the short-cutoff cases. See the "communicate
multi"_communicate.html command for a communication option option that
may also be beneficial for simulations of this kind.
The "neigh_modify"_neigh_modify.html command has additional options
that control how often neighbor lists are built and which pairs are
stored in the list.
When a run is finished, counts of the number of neighbors stored in
the pairwise list and the number of times neighbor lists were built
are printed to the screen and log file. See "this
section"_Section_start.html#2_7 for details.
[Restrictions:]
For simulations without pairwise interactions (see "pair_style none"
command), but that include bonded interactions, you still need to set
the neighbor skin distance. Pairwise neighbor lists will not be
formed, but the pair cutoff (0.0 in this case) plus the skin distance
is the range at which atoms are communicated from nearby processors.
This needs to be large enough that atoms in the same bond, angle, etc
as an atom owned by a processor are acquired. What distance is
appropriate depends on the "newton bond"_newton.html setting. For
newton bond off, the distance needs to be the furthest distance
between any two atoms in the bond, angle, etc. E.g. the distance
between the 1-4 atoms in a dihedral. For newton bond on, the distance
is between the central atom in the bond, angle, etc and any other
atom. E.g. the distance between the 2-4 atoms in a dihedral.
The same logic applies to systems that include bonded interactions and
a pairwise cutoff shorter than the distances just described.
[Related commands:]
"neigh_modify"_neigh_modify.html, "units"_units.html,
"communicate"_communicate.html
[Default:]
0.3 bin for lj units (0.3 sigma)
2.0 bin for real or metal units (2.0 Angstroms) :pre