From ed575ee664615719d7b7b1407f8c839d8c44669a Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Mon, 21 Feb 2022 10:21:28 -0700 Subject: [PATCH 1/2] clarify how new pair style command works --- doc/src/pair_style.rst | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/doc/src/pair_style.rst b/doc/src/pair_style.rst index f2afe959f3..938c7266f4 100644 --- a/doc/src/pair_style.rst +++ b/doc/src/pair_style.rst @@ -67,20 +67,31 @@ If the pair_style command has a cutoff argument, it sets global cutoffs for all pairs of atom types. The distance(s) can be smaller or larger than the dimensions of the simulation box. -Typically, the global cutoff value can be overridden for a specific -pair of atom types by the :doc:`pair_coeff ` command. The -pair style settings (including global cutoffs) can be changed by a -subsequent pair_style command using the same style. This will reset -the cutoffs for all atom type pairs, including those previously set -explicitly by a :doc:`pair_coeff ` command. The exceptions -to this are that pair_style *table* and *hybrid* settings cannot be -reset. A new pair_style command for these styles will wipe out all -previously specified pair_coeff values. +In many cases, the global cutoff value can be overridden for a +specific pair of atom types by the :doc:`pair_coeff ` +command. + +If a new pair_style command is specified with a new style, all +previous :doc:`pair_coeff ` and :doc:`pair_modify +` command settings are erased; those commands must be +re-specified if necessary. + +If a new pair_style command is specified with the same style, then +only the global settings in that command are reset. Any previous +doc:`pair_coeff ` and :doc:`pair_modify ` +command settings are preserved. This makes it easy, for example, to +only change the global cutoff if desired. + +Two exceptions to this are the pair_style *table* and *hybrid* +commands. A new pair_style command for these styles will wipe out all +previously specified pair_coeff or pair_modify values, including for +the sub-styles of the *hybrid* command. ---------- Here is an alphabetic list of pair styles defined in LAMMPS. They are -also listed in more compact form on the :doc:`Commands pair ` doc page. +also listed in more compact form on the :doc:`Commands pair +` doc page. Click on the style to display the formula it computes, any additional arguments specified in the pair_style command, and coefficients From d6664a8e9e7d9f3ad05a47ece926131c45e1fb12 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Mon, 21 Feb 2022 14:21:35 -0700 Subject: [PATCH 2/2] tweak --- doc/src/pair_style.rst | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/doc/src/pair_style.rst b/doc/src/pair_style.rst index 938c7266f4..f90a718d95 100644 --- a/doc/src/pair_style.rst +++ b/doc/src/pair_style.rst @@ -79,13 +79,16 @@ re-specified if necessary. If a new pair_style command is specified with the same style, then only the global settings in that command are reset. Any previous doc:`pair_coeff ` and :doc:`pair_modify ` -command settings are preserved. This makes it easy, for example, to -only change the global cutoff if desired. +command settings are preserved. The only exception is that if the +global cutoff in the pair_style command is changed, it will override +the corresponding cutoff in any of the previous doc:`pair_modify +` commands. -Two exceptions to this are the pair_style *table* and *hybrid* -commands. A new pair_style command for these styles will wipe out all -previously specified pair_coeff or pair_modify values, including for -the sub-styles of the *hybrid* command. +Two pair styles which do not follow this rule are the pair_style +*table* and *hybrid* commands. A new pair_style command for these +styles will wipe out all previously specified doc:`pair_coeff +` and :doc:`pair_modify ` settings, including +for the sub-styles of the *hybrid* command. ----------