Commit 412cb8f0 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

avoid hang in fix reax/c/species when multiple atoms have the exact same x-coordinate

parent 092806ad
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -500,8 +500,16 @@ void FixReaxCSpecies::Output_ReaxC_Bonds(bigint ntimestep, FILE *fp)

AtomCoord FixReaxCSpecies::chAnchor(AtomCoord in1, AtomCoord in2)
{
  if (in1.x <= in2.x)
  if (in1.x < in2.x)
    return in1;
  else if (in1.x == in2.x) {
    if (in1.y < in2.y)
      return in1;
    else if (in1.y == in2.y) {
      if (in1.z < in2.z)
        return in1;
    }
  }
  return in2;
}