Merge pull request #3145 from lammps/pair-style-doc-page

clarify how new pair style command works
This commit is contained in:
Axel Kohlmeyer
2022-02-21 18:22:47 -05:00
committed by GitHub

View File

@ -67,20 +67,34 @@ 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 cutoffs for all pairs of atom types. The distance(s) can be smaller
or larger than the dimensions of the simulation box. or larger than the dimensions of the simulation box.
Typically, the global cutoff value can be overridden for a specific In many cases, the global cutoff value can be overridden for a
pair of atom types by the :doc:`pair_coeff <pair_coeff>` command. The specific pair of atom types by the :doc:`pair_coeff <pair_coeff>`
pair style settings (including global cutoffs) can be changed by a command.
subsequent pair_style command using the same style. This will reset
the cutoffs for all atom type pairs, including those previously set If a new pair_style command is specified with a new style, all
explicitly by a :doc:`pair_coeff <pair_coeff>` command. The exceptions previous :doc:`pair_coeff <pair_coeff>` and :doc:`pair_modify
to this are that pair_style *table* and *hybrid* settings cannot be <pair_modify>` command settings are erased; those commands must be
reset. A new pair_style command for these styles will wipe out all re-specified if necessary.
previously specified pair_coeff values.
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 <pair_coeff>` and :doc:`pair_modify <pair_modify>`
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
<pair_coeff>` commands.
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
<pair_coeff>` and :doc:`pair_modify <pair_modify>` settings, including
for the sub-styles of the *hybrid* command.
---------- ----------
Here is an alphabetic list of pair styles defined in LAMMPS. They are Here is an alphabetic list of pair styles defined in LAMMPS. They are
also listed in more compact form on the :doc:`Commands pair <Commands_pair>` doc page. also listed in more compact form on the :doc:`Commands pair
<Commands_pair>` doc page.
Click on the style to display the formula it computes, any additional Click on the style to display the formula it computes, any additional
arguments specified in the pair_style command, and coefficients arguments specified in the pair_style command, and coefficients