From 5d34150bed6e793c570f19690308805ba0730f7d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 3 Apr 2023 19:23:45 -0400 Subject: [PATCH] attempty to discuss cutoffs and neighbor list bin vs. multi --- doc/src/pair_lj_sphere.rst | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/doc/src/pair_lj_sphere.rst b/doc/src/pair_lj_sphere.rst index fa108e9ef9..df30ebaa23 100644 --- a/doc/src/pair_lj_sphere.rst +++ b/doc/src/pair_lj_sphere.rst @@ -51,13 +51,41 @@ sphere `. 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 ` command (defaults to geometric mixing). The cutoff is not specified as -a distance, but as ratio that must be multiplied with -:math:`\sigma_{ij}` to obtain the cutoff for a specific pair. +a distance, but as ratio that is internally multiplied with +:math:`\sigma_{ij}` to obtain the actual cutoff for each pair of atoms. 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 is at :math:`2^{\frac{1}{6}} \sigma_{ij}`. +.. admonition:: Notes on cutoffs, neighbor lists, and efficiency + :class: note + + Because the cutoff in this pair style depends on the diameter of the + atoms, this influences which cutoff is used to build neighbor lists + and how effective those neighbor lists are in avoiding to compute + distances between non-interacting atoms. This pair style uses a + conventional neighbor list construction like for :doc:`pair style + lj/cut `, where the cutoffs are typically rather similar. + LAMMPS will determine the largest cutoff and use this value for + building the neighbor lists. This can be inefficient, if the + difference between cutoffs is very large. The command :doc:`neighbor + multi ` can be used to enable a modified neighbor list + algorithm, that uses different size bins for atom types with + different cutoffs and constructs neighbor lists based on those + cutoffs. + + If atom diameters vary largely when using pair style *lj/sphere*, + neighbor lists will be similarly inefficient. However, the + multi-cutoff neighbor list algorithm can only be applied when atoms + with different cutoffs have different atom types. Thus atoms with + different ranges of diameters need to have different atom types, for + LAMMPS to use multi-cutoff neighbor lists. LAMMPS will determine the + largest diameter for each atom type, multiply it with the cutoff + ratio, and use this cutoff in the same way as the per-type cutoffs in + :doc:`pair style lj/cut ` + + Coefficients """"""""""""