Commit d34f9af2 authored by Steve Plimpton's avatar Steve Plimpton
Browse files

fixed bug with writing of data file velocities

parent ccc8f29d
Loading
Loading
Loading
Loading
+31 −35
Original line number Diff line number Diff line
@@ -1979,12 +1979,10 @@ void AtomVec::write_vel(FILE *fp, int n, double **buf)
  void *pdata;

  for (i = 0; i < n; i++) {
    fprintf(fp,TAGINT_FORMAT " %-1.16e %-1.16e %-1.16e\n",
            (tagint) ubuf(buf[i][0]).i,buf[i][1],buf[i][2],buf[i][3]);
    fprintf(fp,TAGINT_FORMAT,(tagint) ubuf(buf[i][0]).i);

    if (ndata_vel) {
      j = 4;
      for (nn = 0; nn < ndata_vel; nn++) {
    j = 1;
    for (nn = 1; nn < ndata_vel; nn++) {
      pdata = mdata_vel.pdata[nn];
      datatype = mdata_vel.datatype[nn];
      cols = mdata_vel.cols[nn];
@@ -2017,8 +2015,6 @@ void AtomVec::write_vel(FILE *fp, int n, double **buf)
        }
      }
    }
    }

  fprintf(fp,"\n");
  }
}