better argument checking with threebody off, disallow invalid uses

this now reads the potential file only on the first pair_coeff command
and also creates the element to atom type map then. all following
pair_coeff commands must be consistent. LAMMPS will stop if not.

we also need to explicity assign setflag and must not have it reset
when creating the mappings.
This commit is contained in:
Axel Kohlmeyer
2022-11-25 15:37:06 -05:00
parent 2e6fdf2ea3
commit 878b8a8a13
3 changed files with 45 additions and 12 deletions

View File

@ -176,9 +176,13 @@ are placeholders for atom types that will be used with other potentials.
.. note::
When the *threebody off* keyword is used, multiple pair_coeff commands may
be used to specific the pairs of atoms which don't require three-body term.
In these cases, the first 2 arguments are not required to be \* \*.
When the *threebody off* keyword is used, multiple pair_coeff
commands may be used to specific the pairs of atoms which don't
require three-body term. In these cases, the first 2 arguments are
not required to be \* \*, the potential parameter file is only read
by the first :doc:`pair_coeff <command>` and the following element to
atom type mappings must be consistent across all *pair_coeff*
statements.
Stillinger-Weber files in the *potentials* directory of the LAMMPS
distribution have a ".sw" suffix. Lines that are not blank or