make test for unsupported pair styles more restrictive and improve docs about that
EAM styles have a single function but are not compatible, so we test for single_enable == 0 and manybody_flag != 0. Improve explanation in the documentation about which pair styles are not supported.
This commit is contained in:
@ -89,8 +89,11 @@ This bond style can only be used if LAMMPS was built with the
|
||||
USER-MISC package. See the :doc:`Build package <Build_package>` doc
|
||||
page for more info.
|
||||
|
||||
This bond style requires use of a :doc:`pair_style <pair_style>` which
|
||||
computes a pairwise interaction. Many-body potentials do not.
|
||||
This bond style requires the use of a :doc:`pair_style <pair_style>` which
|
||||
computes a pairwise additive interaction and provides the ability to
|
||||
compute interactions for individual pairs of atoms. Manybody potentials
|
||||
are not compatible in general, but also some other pair styles are missing
|
||||
the required functionality and thus will cause an error.
|
||||
|
||||
This command is not compatible with long-range Coulombic interactions. If a
|
||||
`kspace_style <kspace_style>` is declared, an error will be issued.
|
||||
|
||||
@ -47,7 +47,8 @@ BondSpecial::~BondSpecial()
|
||||
|
||||
void BondSpecial::init_style()
|
||||
{
|
||||
if (force->pair == NULL || force->pair->single_enable == 0)
|
||||
if (force->pair == NULL) error->all(FLERR,"No pair style defined");
|
||||
else if ((force->pair->single_enable == 0) || force->pair->manybody_flag)
|
||||
error->all(FLERR,"Pair style does not support bond style special");
|
||||
|
||||
if (force->special_lj[1] != 0.0 || force->special_coul[1] != 0)
|
||||
|
||||
Reference in New Issue
Block a user