Unverified Commit c0c61268 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

store only dihedral style info in restart, no coeffs

parent cf8bee9b
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -1006,10 +1006,6 @@ void DihedralTableCut::write_restart(FILE *fp)
{
  fwrite(&tabstyle,sizeof(int),1,fp);
  fwrite(&tablength,sizeof(int),1,fp);

  fwrite(&aat_k[1],sizeof(double),atom->ndihedraltypes,fp);
  fwrite(&aat_theta0_1[1],sizeof(double),atom->ndihedraltypes,fp);
  fwrite(&aat_theta0_2[1],sizeof(double),atom->ndihedraltypes,fp);
}

/* ----------------------------------------------------------------------
@@ -1023,19 +1019,10 @@ void DihedralTableCut::read_restart(FILE *fp)
  if (comm->me == 0) {
    fread(&tabstyle,sizeof(int),1,fp);
    fread(&tablength,sizeof(int),1,fp);

    fread(&aat_k[1],sizeof(double),atom->ndihedraltypes,fp);
    fread(&aat_theta0_1[1],sizeof(double),atom->ndihedraltypes,fp);
    fread(&aat_theta0_2[1],sizeof(double),atom->ndihedraltypes,fp);
  }

  MPI_Bcast(&aat_k[1],atom->ndihedraltypes,MPI_DOUBLE,0,world);
  MPI_Bcast(&aat_theta0_1[1],atom->ndihedraltypes,MPI_DOUBLE,0,world);
  MPI_Bcast(&aat_theta0_2[1],atom->ndihedraltypes,MPI_DOUBLE,0,world);
  MPI_Bcast(&tabstyle,1,MPI_INT,0,world);
  MPI_Bcast(&tablength,1,MPI_INT,0,world);

  for (int i = 1; i <= atom->ndihedraltypes; i++) setflag[i] = 1;
}

/* ---------------------------------------------------------------------- */
+0 −1
Original line number Diff line number Diff line
@@ -33,7 +33,6 @@ class DihedralTableCut : public Dihedral {
  void coeff(int, char **);
  void write_restart(FILE *);
  void read_restart(FILE *);
  double single(int type, int i1, int i2, int i3, int i4);

 protected:
  double *aat_k,*aat_theta0_1,*aat_theta0_2;