diff --git a/src/KSPACE/pppm.cpp b/src/KSPACE/pppm.cpp index 2423be4ed3..9b94ecdae1 100644 --- a/src/KSPACE/pppm.cpp +++ b/src/KSPACE/pppm.cpp @@ -232,7 +232,8 @@ void PPPM::init() int typeA = *p_typeA; int typeB = *p_typeB; - if (force->angle == NULL || force->bond == NULL) + if (force->angle == NULL || force->bond == NULL || + force->angle->setflag == NULL || force->bond->setflag == NULL) error->all(FLERR,"Bond and angle potentials must be defined for TIP4P"); if (typeA < 1 || typeA > atom->nangletypes || force->angle->setflag[typeA] == 0) diff --git a/src/angle.cpp b/src/angle.cpp index 816e84997a..9c2e29188a 100644 --- a/src/angle.cpp +++ b/src/angle.cpp @@ -38,6 +38,7 @@ Angle::Angle(LAMMPS *lmp) : Pointers(lmp) maxeatom = maxvatom = 0; eatom = NULL; vatom = NULL; + setflag = NULL; datamask = ALL_MASK; datamask_ext = ALL_MASK; diff --git a/src/bond.cpp b/src/bond.cpp index b375b6229b..941bb7e9a4 100644 --- a/src/bond.cpp +++ b/src/bond.cpp @@ -39,6 +39,7 @@ Bond::Bond(LAMMPS *lmp) : Pointers(lmp) maxeatom = maxvatom = 0; eatom = NULL; vatom = NULL; + setflag = NULL; datamask = ALL_MASK; datamask_ext = ALL_MASK; diff --git a/src/dihedral.cpp b/src/dihedral.cpp index 889a6c48d6..6f9f69ca06 100644 --- a/src/dihedral.cpp +++ b/src/dihedral.cpp @@ -39,6 +39,7 @@ Dihedral::Dihedral(LAMMPS *lmp) : Pointers(lmp) maxeatom = maxvatom = 0; eatom = NULL; vatom = NULL; + setflag = NULL; datamask = ALL_MASK; datamask_ext = ALL_MASK; diff --git a/src/improper.cpp b/src/improper.cpp index 0c2ce290fd..f9dd99c5f2 100644 --- a/src/improper.cpp +++ b/src/improper.cpp @@ -36,6 +36,7 @@ Improper::Improper(LAMMPS *lmp) : Pointers(lmp) maxeatom = maxvatom = 0; eatom = NULL; vatom = NULL; + setflag = NULL; datamask = ALL_MASK; datamask_ext = ALL_MASK;