Small changes to base dihedral_harmonic class

This commit is contained in:
Stan Moore 2019-09-09 12:06:52 -06:00
parent c36c4d50cc
commit fb0dee49a2
2 changed files with 4 additions and 4 deletions

View File

@ -42,7 +42,7 @@ DihedralHarmonic::DihedralHarmonic(LAMMPS *lmp) : Dihedral(lmp)
DihedralHarmonic::~DihedralHarmonic() DihedralHarmonic::~DihedralHarmonic()
{ {
if (allocated) { if (allocated && !copymode) {
memory->destroy(setflag); memory->destroy(setflag);
memory->destroy(k); memory->destroy(k);
memory->destroy(sign); memory->destroy(sign);

View File

@ -29,16 +29,16 @@ class DihedralHarmonic : public Dihedral {
DihedralHarmonic(class LAMMPS *); DihedralHarmonic(class LAMMPS *);
virtual ~DihedralHarmonic(); virtual ~DihedralHarmonic();
virtual void compute(int, int); virtual void compute(int, int);
void coeff(int, char **); virtual void coeff(int, char **);
void write_restart(FILE *); void write_restart(FILE *);
void read_restart(FILE *); virtual void read_restart(FILE *);
void write_data(FILE *); void write_data(FILE *);
protected: protected:
double *k,*cos_shift,*sin_shift; double *k,*cos_shift,*sin_shift;
int *sign,*multiplicity; int *sign,*multiplicity;
void allocate(); virtual void allocate();
}; };
} }