From 29e64df1ba6fe6f8ceb8c00d66fed9786fe884fe Mon Sep 17 00:00:00 2001 From: sjplimp Date: Fri, 1 Jul 2016 21:27:04 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15240 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/CLASS2/dihedral_class2.cpp | 12 ++++++++---- src/atom_vec_line.cpp | 6 +++++- src/atom_vec_tri.cpp | 4 ++++ src/fix.h | 1 + 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/CLASS2/dihedral_class2.cpp b/src/CLASS2/dihedral_class2.cpp index 9e907f87b7..d18d75b155 100644 --- a/src/CLASS2/dihedral_class2.cpp +++ b/src/CLASS2/dihedral_class2.cpp @@ -662,7 +662,8 @@ void DihedralClass2::coeff(int narg, char **arg) } } else if (strcmp(arg[1],"ebt") == 0) { - if (narg != 10) error->all(FLERR,"Incorrect args for dihedral coefficients"); + if (narg != 10) + error->all(FLERR,"Incorrect args for dihedral coefficients"); double f1_1_one = force->numeric(FLERR,arg[2]); double f2_1_one = force->numeric(FLERR,arg[3]); @@ -687,7 +688,8 @@ void DihedralClass2::coeff(int narg, char **arg) } } else if (strcmp(arg[1],"at") == 0) { - if (narg != 10) error->all(FLERR,"Incorrect args for dihedral coefficients"); + if (narg != 10) + error->all(FLERR,"Incorrect args for dihedral coefficients"); double f1_1_one = force->numeric(FLERR,arg[2]); double f2_1_one = force->numeric(FLERR,arg[3]); @@ -924,8 +926,10 @@ void DihedralClass2::read_restart(FILE *fp) void DihedralClass2::write_data(FILE *fp) { for (int i = 1; i <= atom->ndihedraltypes; i++) - fprintf(fp,"%d %g %g %g %g %g %g\n", - i,k1[i],phi1[i],k2[i],phi2[i],k3[i],phi3[i]); + fprintf(fp,"%d %g %g %g %g %g %g\n",i, + k1[i],phi1[i]*180.0/MY_PI, + k2[i],phi2[i]*180.0/MY_PI, + k3[i],phi3[i]*180.0/MY_PI); fprintf(fp,"\nAngleAngleTorsion Coeffs\n\n"); for (int i = 1; i <= atom->ndihedraltypes; i++) diff --git a/src/atom_vec_line.cpp b/src/atom_vec_line.cpp index 0839530e4b..0e534577f3 100644 --- a/src/atom_vec_line.cpp +++ b/src/atom_vec_line.cpp @@ -178,7 +178,7 @@ void AtomVecLine::copy(int i, int j, int delflag) /* ---------------------------------------------------------------------- copy bonus data from I to J, effectively deleting the J entry - also reset ine that points to I to now point to J + also reset line that points to I to now point to J ------------------------------------------------------------------------- */ void AtomVecLine::copy_bonus(int i, int j) @@ -195,6 +195,10 @@ void AtomVecLine::copy_bonus(int i, int j) void AtomVecLine::clear_bonus() { nghost_bonus = 0; + + if (atom->nextra_grow) + for (int iextra = 0; iextra < atom->nextra_grow; iextra++) + modify->fix[atom->extra_grow[iextra]]->clear_bonus(); } /* ---------------------------------------------------------------------- diff --git a/src/atom_vec_tri.cpp b/src/atom_vec_tri.cpp index 7dc65d5f0f..8ffc39cec3 100644 --- a/src/atom_vec_tri.cpp +++ b/src/atom_vec_tri.cpp @@ -206,6 +206,10 @@ void AtomVecTri::copy_bonus(int i, int j) void AtomVecTri::clear_bonus() { nghost_bonus = 0; + + if (atom->nextra_grow) + for (int iextra = 0; iextra < atom->nextra_grow; iextra++) + modify->fix[atom->extra_grow[iextra]]->clear_bonus(); } /* ---------------------------------------------------------------------- diff --git a/src/fix.h b/src/fix.h index a2aa3782cc..6ebeed26b3 100644 --- a/src/fix.h +++ b/src/fix.h @@ -136,6 +136,7 @@ class Fix : protected Pointers { virtual void set_arrays(int) {} virtual void update_arrays(int, int) {} virtual void set_molecule(int, tagint, int, double *, double *, double *) {} + virtual void clear_bonus() {} virtual int pack_border(int, int *, double *) {return 0;} virtual int unpack_border(int, int, double *) {return 0;}