add pair style compatibility check to compute centroid/stress/atom

This commit is contained in:
Donatas Surblys
2019-11-11 22:45:59 +09:00
parent a782245179
commit 7937bec396

View File

@ -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");
}
/* ---------------------------------------------------------------------- */