From 7937bec396d478ef52955dd1a8abd800c8422aba Mon Sep 17 00:00:00 2001 From: Donatas Surblys Date: Mon, 11 Nov 2019 22:45:59 +0900 Subject: [PATCH] add pair style compatibility check to compute centroid/stress/atom --- src/compute_centroid_stress_atom.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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"); } /* ---------------------------------------------------------------------- */