diff --git a/src/MESONT/pair_mesocnt.cpp b/src/MESONT/pair_mesocnt.cpp index 2251073b18..792f744339 100644 --- a/src/MESONT/pair_mesocnt.cpp +++ b/src/MESONT/pair_mesocnt.cpp @@ -756,6 +756,8 @@ void PairMesoCNT::init_style() { if (atom->tag_enable == 0) error->all(FLERR, "Pair style mesocnt requires atom IDs"); if (force->newton_pair == 0) error->all(FLERR, "Pair style mesocnt requires newton pair on"); + if (force->special_lj[1] == 0.0 || force->special_lj[2] == 0.0 || force->special_lj[3] == 0.0) + error->all(FLERR,"Pair mesocnt requires special_bond lj x y z to have non-zero x, y and z"); // need a full neighbor list diff --git a/src/MESONT/pair_mesocnt_viscous.cpp b/src/MESONT/pair_mesocnt_viscous.cpp index 06c2b38046..c58d6a6774 100644 --- a/src/MESONT/pair_mesocnt_viscous.cpp +++ b/src/MESONT/pair_mesocnt_viscous.cpp @@ -19,6 +19,7 @@ #include "pair_mesocnt_viscous.h" #include "atom.h" +#include "comm.h" #include "error.h" #include "force.h" #include "math_const.h" @@ -747,6 +748,24 @@ void PairMesoCNTViscous::coeff(int narg, char **arg) for (int j = i; j <= ntypes; j++) setflag[i][j] = 1; } +/* ---------------------------------------------------------------------- + init specific to this pair style +------------------------------------------------------------------------- */ + +void PairMesoCNTViscous::init_style() +{ + if (atom->tag_enable == 0) error->all(FLERR, "Pair style mesocnt/viscous requires atom IDs"); + if (force->newton_pair == 0) error->all(FLERR, "Pair style mesocnt/viscous requires newton pair on"); + if (force->special_lj[1] == 0.0 || force->special_lj[2] == 0.0 || force->special_lj[3] == 0.0) + error->all(FLERR,"Pair mesocnt/viscous requires special_bond lj x y z to have non-zero x, y and z"); + if (comm->ghost_velocity == 0) + error->all(FLERR,"Pair mesocnt/viscous requires ghost atoms store velocity"); + + // need a full neighbor list + + neighbor->add_request(this, NeighConst::REQ_FULL); +} + /* ---------------------------------------------------------------------- weight for averaged friction from CNT chain ------------------------------------------------------------------------- */ diff --git a/src/MESONT/pair_mesocnt_viscous.h b/src/MESONT/pair_mesocnt_viscous.h index 2027435da3..dc5a701e0b 100644 --- a/src/MESONT/pair_mesocnt_viscous.h +++ b/src/MESONT/pair_mesocnt_viscous.h @@ -27,6 +27,7 @@ class PairMesoCNTViscous : public PairMesoCNT { void compute(int, int) override; void coeff(int, char **) override; + void init_style() override; protected: double a1, a2, b2, vswitch;