diff --git a/src/compute_centroid_stress_atom.cpp b/src/compute_centroid_stress_atom.cpp index d4d602ee64..35633d5e4d 100644 --- a/src/compute_centroid_stress_atom.cpp +++ b/src/compute_centroid_stress_atom.cpp @@ -126,7 +126,7 @@ void ComputeCentroidStressAtom::init() // check if pair styles support centroid atom stress if (pairflag && force->pair) - if (force->pair->centroidstressflag == CENTROID_NOTAVAIL) + if (force->pair->centroidstressflag & CENTROID_NOTAVAIL) error->all(FLERR, "Pair style does not support compute centroid/stress/atom"); } @@ -178,7 +178,7 @@ void ComputeCentroidStressAtom::compute_peratom() // per-atom virial and per-atom centroid virial are the same for two-body // many-body pair styles not yet implemented if (pairflag && force->pair && force->pair->compute_flag) { - if (force->pair->centroidstressflag == CENTROID_AVAIL) { + if (force->pair->centroidstressflag & CENTROID_AVAIL) { double **cvatom = force->pair->cvatom; for (i = 0; i < npair; i++) for (j = 0; j < 9; j++) diff --git a/src/pair.cpp b/src/pair.cpp index 0627939eff..470c147798 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -77,7 +77,7 @@ Pair::Pair(LAMMPS *lmp) : Pointers(lmp) ewaldflag = pppmflag = msmflag = dispersionflag = tip4pflag = dipoleflag = spinflag = 0; reinitflag = 1; - centroidstressflag = CENTROID_SAME; + centroidstressflag = CENTROID_NOTAVAIL; // pair_modify settings