Unverified Commit d0eb41b6 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

disallow per substyle special bond factors with certain suffix styles

parent 4989c3a8
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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];