diff --git a/src/compute_centroid_stress_atom.cpp b/src/compute_centroid_stress_atom.cpp index a78c2ee421..dfab2b878a 100644 --- a/src/compute_centroid_stress_atom.cpp +++ b/src/compute_centroid_stress_atom.cpp @@ -123,6 +123,11 @@ void ComputeCentroidStressAtom::init() if (temperature->tempbias) biasflag = BIAS; else biasflag = NOBIAS; } else biasflag = NOBIAS; + + // check if pair styles support centroid atom stress + if (pairflag && force->pair) + if (force->pair->cntratmstressflag & 4) + error->all(FLERR, "Pair style does not support compute centroid/stress/atom"); } /* ---------------------------------------------------------------------- */