diff --git a/src/QEQ/fix_qeq.cpp b/src/QEQ/fix_qeq.cpp index 56491228fd..542670f1f3 100644 --- a/src/QEQ/fix_qeq.cpp +++ b/src/QEQ/fix_qeq.cpp @@ -24,6 +24,8 @@ #include "force.h" #include "memory.h" #include "neigh_list.h" +#include "pair.h" +#include "suffix.h" #include "text_file_reader.h" #include "update.h" @@ -300,6 +302,12 @@ void FixQEq::setup_pre_force(int vflag) if (force->newton_pair == 0) error->all(FLERR,"QEQ with 'newton pair off' not supported"); + if (force->pair) { + if (force->pair->suffix_flag & (Suffix::INTEL|Suffix::GPU)) + error->all(FLERR,"QEQ is not compatiple with suffix version " + "of pair style"); + } + deallocate_storage(); allocate_storage(); diff --git a/src/pair.h b/src/pair.h index b25ad448eb..5b35d029ab 100644 --- a/src/pair.h +++ b/src/pair.h @@ -28,6 +28,8 @@ class Pair : protected Pointers { friend class FixGPU; friend class FixIntel; friend class FixOMP; + friend class FixQEq; + friend class PairHybrid; friend class ThrOMP; friend class Info; diff --git a/src/pair_hybrid.cpp b/src/pair_hybrid.cpp index 48ba1ccff7..485257858d 100644 --- a/src/pair_hybrid.cpp +++ b/src/pair_hybrid.cpp @@ -948,9 +948,7 @@ void PairHybrid::modify_special(int m, int /*narg*/, char **arg) special[2] = utils::numeric(FLERR,arg[2],false,lmp); special[3] = utils::numeric(FLERR,arg[3],false,lmp); - // have to cast to PairHybrid to work around C++ access restriction - - if (((PairHybrid *)styles[m])->suffix_flag & (Suffix::INTEL|Suffix::GPU)) + if (styles[m]->suffix_flag & (Suffix::INTEL|Suffix::GPU)) error->all(FLERR,"Pair_modify special is not compatible with " "suffix version of hybrid substyle");