2006-09-22 00:22:34 +08:00
|
|
|
"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
|
|
|
|
|
|
|
|
neigh_modify command :h3
|
|
|
|
|
|
|
|
[Syntax:]
|
|
|
|
|
|
|
|
neigh_modify keyword values ... :pre
|
|
|
|
|
|
|
|
one or more keyword/value pairs may be listed :ulb,l
|
2009-02-20 00:40:15 +08:00
|
|
|
keyword = {delay} or {every} or {check} or {once} or {include} or {exclude} or {page} or {one} or {binsize}
|
2006-09-22 00:22:34 +08:00
|
|
|
{delay} value = N
|
|
|
|
N = delay building until this many steps since last build
|
|
|
|
{every} value = M
|
|
|
|
M = build neighbor list every this many steps
|
|
|
|
{check} value = {yes} or {no}
|
|
|
|
{yes} = only build if some atom has moved half the skin distance or more
|
|
|
|
{no} = always build on 1st step that {every} and {delay} are satisfied
|
2009-02-20 00:40:15 +08:00
|
|
|
{once}
|
|
|
|
{yes} = only build neighbor list once at start of run and never rebuild
|
|
|
|
{no} = rebuild neighbor list according to other settings
|
2008-02-15 07:13:41 +08:00
|
|
|
{include} value = group-ID
|
|
|
|
group-ID = only build pair neighbor lists for atoms in this group
|
2006-09-22 00:22:34 +08:00
|
|
|
{exclude} values:
|
|
|
|
type M N
|
|
|
|
M,N = exclude if one atom in pair is type M, other is type N
|
|
|
|
group group1-ID group2-ID
|
|
|
|
group1-ID,group2-ID = exclude if one atom is in 1st group, other in 2nd
|
|
|
|
molecule group-ID
|
|
|
|
groupname = exclude if both atoms are in the same molecule and in the same group
|
|
|
|
none
|
|
|
|
delete all exclude settings
|
|
|
|
{page} value = N
|
|
|
|
N = number of pairs stored in a single neighbor page
|
|
|
|
{one} value = N
|
2009-03-17 23:41:12 +08:00
|
|
|
N = max number of neighbors of one atom
|
2007-12-07 00:48:43 +08:00
|
|
|
{binsize} value = size
|
|
|
|
size = bin size for neighbor list construction (distance units) :pre
|
2006-09-22 00:22:34 +08:00
|
|
|
:ule
|
|
|
|
|
|
|
|
[Examples:]
|
|
|
|
|
|
|
|
neigh_modify every 2 delay 10 check yes page 100000
|
|
|
|
neigh_modify exclude type 2 3
|
|
|
|
neigh_modify exclude group frozen frozen check no
|
|
|
|
neigh_modify exclude group residue1 chain3
|
|
|
|
neigh_modify exclude molecule rigid :pre
|
|
|
|
|
|
|
|
[Description:]
|
|
|
|
|
2008-08-21 21:53:06 +08:00
|
|
|
This command sets parameters that affect the building and use of
|
|
|
|
pairwise neighbor lists.
|
2006-09-22 00:22:34 +08:00
|
|
|
|
2009-02-20 00:40:15 +08:00
|
|
|
The {every}, {delay}, {check}, and {once} options affect how often
|
|
|
|
lists are built as a simulation runs. The {delay} setting means never
|
|
|
|
build a new list until at least N steps after the previous build. The
|
|
|
|
{every} setting means build the list every M steps (after the delay
|
|
|
|
has passed). If the {check} setting is {no}, the list is built on the
|
|
|
|
1st step that satisfies the {delay} and {every} settings. If the
|
|
|
|
{check} setting is {yes}, then the list is only built on a particular
|
|
|
|
step if some atom has moved more than half the skin distance
|
|
|
|
(specified in the "neighbor"_neighbor.html command) since the last
|
|
|
|
build. If the {once} setting is yes, then the neighbor list is only
|
|
|
|
built once at the beginning of each run, and never rebuilt. This
|
|
|
|
should only be done if you are certain atoms will not move far enough
|
|
|
|
that the list should be rebuilt. E.g. running a simulation of a cold
|
|
|
|
crystal. Note that it is not that expensive to check if neighbor
|
|
|
|
lists should be rebuilt.
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
When the rRESPA integrator is used (see the "run_style"_run_style.html
|
|
|
|
command), the {every} and {delay} parameters refer to the longest
|
|
|
|
(outermost) timestep.
|
|
|
|
|
2008-02-16 03:09:18 +08:00
|
|
|
The {include} option limits the building of pairwise neighbor lists to
|
|
|
|
atoms in the specified group. This can be useful for models where a
|
|
|
|
large portion of the simulation is particles that do not interact with
|
|
|
|
other particles or with each other via pairwise interactions. The
|
|
|
|
group specified with this option must also be specified via the
|
2008-04-19 07:58:41 +08:00
|
|
|
"atom_modify first"_atom_modify.html command.
|
2008-02-16 03:09:18 +08:00
|
|
|
|
2006-09-22 00:22:34 +08:00
|
|
|
The {exclude} option turns off pairwise interactions between certain
|
|
|
|
pairs of atoms, by not including them in the neighbor list. These are
|
|
|
|
sample scenarios where this is useful:
|
|
|
|
|
|
|
|
In crack simulations, pairwise interactions can be shut off between 2
|
|
|
|
slabs of atoms to effectively create a crack. :ulb,l
|
|
|
|
|
|
|
|
When a large collection of atoms is treated as frozen, interactions
|
|
|
|
between those atoms can be turned off to save needless
|
|
|
|
computation. E.g. Using the "fix setforce"_fix_setforce.html command
|
|
|
|
to freeze a wall or portion of a bio-molecule. :l
|
|
|
|
|
|
|
|
When one or more rigid bodies are specified, interactions within each
|
|
|
|
body can be turned off to save needless computation. See the "fix
|
|
|
|
rigid"_fix_rigid.html command for more details. :l,ule
|
|
|
|
|
|
|
|
The {exclude type} option turns off the pairwise interaction if one
|
|
|
|
atom is of type M and the other of type N. M can equal N. The
|
|
|
|
{exclude group} option turns off the interaction if one atom is in the
|
|
|
|
first group and the other is the second. Group1-ID can equal
|
|
|
|
group2-ID. The {exclude molecule} option turns off the interaction if
|
|
|
|
both atoms are in the specified group and in the same molecule, as
|
|
|
|
determined by their molecule ID.
|
|
|
|
|
|
|
|
Each of the exclude options can be specified multiple times. The
|
2008-03-01 09:13:20 +08:00
|
|
|
{exclude type} option is the most efficient option to use; it requires
|
2006-09-22 00:22:34 +08:00
|
|
|
only a single check, no matter how many times it has been specified.
|
|
|
|
The other exclude options are more expensive if specified multiple
|
|
|
|
times; they require one check for each time they have been specified.
|
|
|
|
|
|
|
|
Note that the exclude options only affect pairwise interactions; see
|
|
|
|
the "delete_bonds"_delete_bonds.html command for information on
|
|
|
|
turning off bond interactions.
|
|
|
|
|
2012-10-11 22:42:31 +08:00
|
|
|
IMPORTANT NOTE: Excluding pairwise interactions will not work
|
|
|
|
correctly when also using a long-range solver via the
|
|
|
|
"kspace_style"_kspace_style.html command. LAMMPS will give a warning
|
|
|
|
to this effect. This is because the short-range pairwise interaction
|
|
|
|
needs to subtract off a term from the total energy for pairs whose
|
|
|
|
short-range interaction is excluded, to compensate for how the
|
|
|
|
long-range solver treats the interaction. This is done correctly for
|
|
|
|
pairwise interactions that are excluded (or weighted) via the
|
|
|
|
"special_bonds"_special_bonds.html command. But it is not done for
|
|
|
|
interactions that are excluded via these neigh_modify exclude options.
|
|
|
|
|
2006-09-22 00:22:34 +08:00
|
|
|
The {page} and {one} options affect how memory is allocated for the
|
|
|
|
neighbor lists. For most simulations the default settings for these
|
|
|
|
options are fine, but if a very large problem is being run or a very
|
|
|
|
long cutoff is being used, these parameters can be tuned. The indices
|
|
|
|
of neighboring atoms are stored in "pages", which are allocated one
|
|
|
|
after another as they fill up. The size of each page is set by the
|
|
|
|
{page} value. A new page is allocated when the next atom's neighbors
|
2008-03-01 09:13:20 +08:00
|
|
|
could potentially overflow the list. This threshold is set by the
|
2006-09-22 00:22:34 +08:00
|
|
|
{one} value which tells LAMMPS the maximum number of neighbor's one
|
|
|
|
atom can have.
|
|
|
|
|
2009-05-01 00:53:04 +08:00
|
|
|
IMPORTANT NOTE: LAMMPS can crash without an error message if the
|
|
|
|
number of neighbors for a single particle is larger than the {page}
|
|
|
|
setting, which means it is much, much larger than the {one} setting.
|
|
|
|
This is because LAMMPS doesn't error check these limits for every
|
|
|
|
pairwise interaction (too costly), but only after all the particle's
|
|
|
|
neighbors have been found. This problem usually means something is
|
|
|
|
very wrong with the way you've setup your problem (particle spacing,
|
|
|
|
cutoff length, neighbor skin distance, etc). If you really expect
|
|
|
|
that many neighbors per particle, then boost the {one} and {page}
|
|
|
|
settings accordingly.
|
|
|
|
|
2007-12-07 00:48:43 +08:00
|
|
|
The {binsize} option allows you to specify what size of bins will be
|
|
|
|
used in neighbor list construction to sort and find neighboring atoms.
|
|
|
|
By default, for "neighbor style bin"_neighbor.html, LAMMPS uses bins
|
|
|
|
that are 1/2 the size of the maximum pair cutoff. For "neighbor style
|
|
|
|
multi"_neighbor.html, the bins are 1/2 the size of the minimum pair
|
|
|
|
cutoff. Typically these are good values values for minimizing the
|
|
|
|
time for neighbor list construction. This setting overrides the
|
|
|
|
default. If you make it too big, there is little overhead due to
|
|
|
|
looping over bins, but more atoms are checked. If you make it too
|
|
|
|
small, the optimal number of atoms is checked, but bin overhead goes
|
|
|
|
up. If you set the binsize to 0.0, LAMMPS will use the default
|
|
|
|
binsize of 1/2 the cutoff.
|
|
|
|
|
2006-09-22 00:22:34 +08:00
|
|
|
[Restrictions:]
|
|
|
|
|
|
|
|
If the "delay" setting is non-zero, then it must be a multiple of the
|
|
|
|
"every" setting.
|
|
|
|
|
|
|
|
The exclude molecule option can only be used with atom styles that
|
|
|
|
define molecule IDs.
|
|
|
|
|
2007-12-07 00:48:43 +08:00
|
|
|
The value of the {page} setting must be at least 10x larger than the
|
|
|
|
{one} setting. This insures neighbor pages are not mostly empty
|
|
|
|
space.
|
|
|
|
|
2006-09-22 00:22:34 +08:00
|
|
|
[Related commands:]
|
|
|
|
|
|
|
|
"neighbor"_neighbor.html, "delete_bonds"_delete_bonds.html
|
|
|
|
|
|
|
|
[Default:]
|
|
|
|
|
2009-02-18 02:50:26 +08:00
|
|
|
The option defaults are delay = 10, every = 1, check = yes, once = no,
|
|
|
|
include = all, exclude = none, page = 100000, one = 2000, and binsize = 0.0.
|