Commit 7937bec3 authored by Donatas Surblys's avatar Donatas Surblys
Browse files

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

parent a7822451
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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");
}

/* ---------------------------------------------------------------------- */