disallow per substyle special bond factors with certain suffix styles

This commit is contained in:
Axel Kohlmeyer
2020-01-10 16:58:39 -05:00
parent 4989c3a878
commit d0eb41b61e

View File

@ -27,6 +27,7 @@
#include "error.h"
#include "respa.h"
#include "utils.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -919,6 +920,12 @@ void PairHybrid::modify_special(int m, int /*narg*/, char **arg)
special[2] = force->numeric(FLERR,arg[2]);
special[3] = force->numeric(FLERR,arg[3]);
// have to cast to PairHybrid to work around C++ access restriction
if (((PairHybrid *)styles[m])->suffix_flag & (Suffix::INTEL|Suffix::GPU))
error->all(FLERR,"Pair_modify special is not compatible with "
"suffix version of hybrid substyle");
if (strcmp(arg[0],"lj/coul") == 0) {
if (!special_lj[m]) special_lj[m] = new double[4];
if (!special_coul[m]) special_coul[m] = new double[4];