diff --git a/doc/src/bond_special.rst b/doc/src/bond_special.rst index 8c90179e96..f7dc43a1b2 100644 --- a/doc/src/bond_special.rst +++ b/doc/src/bond_special.rst @@ -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 ` doc page for more info. -This bond style requires use of a :doc:`pair_style ` which -computes a pairwise interaction. Many-body potentials do not. +This bond style requires the use of a :doc:`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 ` is declared, an error will be issued. diff --git a/src/USER-MISC/bond_special.cpp b/src/USER-MISC/bond_special.cpp index 30630147ce..6c734d482e 100644 --- a/src/USER-MISC/bond_special.cpp +++ b/src/USER-MISC/bond_special.cpp @@ -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)