Unverified Commit 0efc3765 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

add warning when writing incomplete data file due to bonus data

parent a0450fbd
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -177,6 +177,17 @@ void WriteData::write(char *file)
    MPI_Allreduce(&nimpropers_local,&nimpropers,1,MPI_LMP_BIGINT,MPI_SUM,world);
  }

  // check for bonus data.
  if (me == 0) {
    if ((atom->nellipsoids > 0)
        || (atom->nlines > 0)
        || (atom->ntris > 0)
        || (atom->nbodies > 0))
      error->warning(FLERR,"System has ellipsoids, lines, triangles, or bodies. "
                     "Those are not yet supported by write_data. The data file "
                     "will thus be incomplete.");
  }

  // open data file

  if (me == 0) {