diff --git a/src/CLASS2/bond_class2.cpp b/src/CLASS2/bond_class2.cpp index 097c8fe387..7feec1a4b3 100644 --- a/src/CLASS2/bond_class2.cpp +++ b/src/CLASS2/bond_class2.cpp @@ -224,7 +224,7 @@ double BondClass2::single(int type, double rsq, int /*i*/, int /*j*/, double &ff /* ---------------------------------------------------------------------- */ -void *BondClass2::extract( char *str, int &dim ) +void *BondClass2::extract(const char *str, int &dim) { dim = 1; if (strcmp(str,"r0")==0) return (void*) r0; diff --git a/src/CLASS2/bond_class2.h b/src/CLASS2/bond_class2.h index fb7eb884df..f83fecfce0 100644 --- a/src/CLASS2/bond_class2.h +++ b/src/CLASS2/bond_class2.h @@ -35,7 +35,7 @@ class BondClass2 : public Bond { virtual void read_restart(FILE *); void write_data(FILE *); double single(int, double, int, int, double &); - virtual void *extract(char *, int &); + virtual void *extract(const char *, int &); protected: double *r0,*k2,*k3,*k4; diff --git a/src/MOLECULE/bond_fene.cpp b/src/MOLECULE/bond_fene.cpp index e3c47b6241..91c0877478 100644 --- a/src/MOLECULE/bond_fene.cpp +++ b/src/MOLECULE/bond_fene.cpp @@ -276,7 +276,7 @@ double BondFENE::single(int type, double rsq, int /*i*/, int /*j*/, /* ---------------------------------------------------------------------- */ -void *BondFENE::extract( char *str, int &dim ) +void *BondFENE::extract(const char *str, int &dim) { dim = 1; if (strcmp(str,"kappa")==0) return (void*) k; diff --git a/src/MOLECULE/bond_fene.h b/src/MOLECULE/bond_fene.h index 77c7db1200..78ce169870 100644 --- a/src/MOLECULE/bond_fene.h +++ b/src/MOLECULE/bond_fene.h @@ -36,7 +36,7 @@ class BondFENE : public Bond { void read_restart(FILE *); void write_data(FILE *); double single(int, double, int, int, double &); - virtual void *extract(char *, int &); + virtual void *extract(const char *, int &); protected: double TWO_1_3; diff --git a/src/MOLECULE/bond_gromos.cpp b/src/MOLECULE/bond_gromos.cpp index 6732cc4457..27447d7298 100644 --- a/src/MOLECULE/bond_gromos.cpp +++ b/src/MOLECULE/bond_gromos.cpp @@ -189,7 +189,7 @@ void BondGromos::write_data(FILE *fp) /* ---------------------------------------------------------------------- */ double BondGromos::single(int type, double rsq, int /*i*/, int /*j*/, - double &fforce) + double &fforce) { double dr = rsq - r0[type]*r0[type]; fforce = -4.0*k[type] * dr; @@ -199,7 +199,7 @@ double BondGromos::single(int type, double rsq, int /*i*/, int /*j*/, /* ---------------------------------------------------------------------- Return ptr to internal members upon request. ------------------------------------------------------------------------ */ -void *BondGromos::extract( char *str, int &dim ) +void *BondGromos::extract(const char *str, int &dim) { dim = 1; if (strcmp(str,"kappa")==0) return (void*) k; diff --git a/src/MOLECULE/bond_gromos.h b/src/MOLECULE/bond_gromos.h index 966b914437..95ecf8db10 100644 --- a/src/MOLECULE/bond_gromos.h +++ b/src/MOLECULE/bond_gromos.h @@ -35,7 +35,7 @@ class BondGromos : public Bond { void read_restart(FILE *); void write_data(FILE *); double single(int, double, int, int, double &); - virtual void *extract(char *, int &); + virtual void *extract(const char *, int &); protected: double *k,*r0; diff --git a/src/MOLECULE/bond_harmonic.cpp b/src/MOLECULE/bond_harmonic.cpp index 569c92f99d..5ea60cda46 100644 --- a/src/MOLECULE/bond_harmonic.cpp +++ b/src/MOLECULE/bond_harmonic.cpp @@ -190,7 +190,7 @@ void BondHarmonic::write_data(FILE *fp) /* ---------------------------------------------------------------------- */ double BondHarmonic::single(int type, double rsq, int /*i*/, int /*j*/, - double &fforce) + double &fforce) { double r = sqrt(rsq); double dr = r - r0[type]; @@ -203,7 +203,7 @@ double BondHarmonic::single(int type, double rsq, int /*i*/, int /*j*/, /* ---------------------------------------------------------------------- Return ptr to internal members upon request. ------------------------------------------------------------------------ */ -void *BondHarmonic::extract( char *str, int &dim ) +void *BondHarmonic::extract(const char *str, int &dim) { dim = 1; if (strcmp(str,"kappa")==0) return (void*) k; diff --git a/src/MOLECULE/bond_harmonic.h b/src/MOLECULE/bond_harmonic.h index 576e63629b..39b4f68af5 100644 --- a/src/MOLECULE/bond_harmonic.h +++ b/src/MOLECULE/bond_harmonic.h @@ -35,7 +35,7 @@ class BondHarmonic : public Bond { virtual void read_restart(FILE *); void write_data(FILE *); double single(int, double, int, int, double &); - virtual void *extract(char *, int &); + virtual void *extract(const char *, int &); protected: double *k,*r0; diff --git a/src/MOLECULE/bond_morse.cpp b/src/MOLECULE/bond_morse.cpp index 0a92229879..c644d2be1c 100644 --- a/src/MOLECULE/bond_morse.cpp +++ b/src/MOLECULE/bond_morse.cpp @@ -209,7 +209,7 @@ double BondMorse::single(int type, double rsq, int /*i*/, int /*j*/, /* ---------------------------------------------------------------------- */ -void *BondMorse::extract(char *str, int &dim ) +void *BondMorse::extract(const char *str, int &dim) { dim = 1; if (strcmp(str,"r0")==0) return (void*) r0; diff --git a/src/MOLECULE/bond_morse.h b/src/MOLECULE/bond_morse.h index cbab0aed1d..6d7ec8f8aa 100644 --- a/src/MOLECULE/bond_morse.h +++ b/src/MOLECULE/bond_morse.h @@ -35,7 +35,7 @@ class BondMorse : public Bond { void read_restart(FILE *); void write_data(FILE *); double single(int, double, int, int, double &); - virtual void *extract(char *, int &); + virtual void *extract(const char *, int &); protected: double *d0,*alpha,*r0; diff --git a/src/MOLECULE/bond_nonlinear.cpp b/src/MOLECULE/bond_nonlinear.cpp index 8f0616e03e..1451fa29c2 100644 --- a/src/MOLECULE/bond_nonlinear.cpp +++ b/src/MOLECULE/bond_nonlinear.cpp @@ -206,7 +206,7 @@ double BondNonlinear::single(int type, double rsq, int /*i*/, int /*j*/, /* ---------------------------------------------------------------------- */ -void *BondNonlinear::extract( char *str, int &dim ) +void *BondNonlinear::extract(const char *str, int &dim) { dim = 1; if (strcmp(str,"epsilon")==0) return (void*) epsilon; diff --git a/src/MOLECULE/bond_nonlinear.h b/src/MOLECULE/bond_nonlinear.h index 76dffdba31..29191698d3 100644 --- a/src/MOLECULE/bond_nonlinear.h +++ b/src/MOLECULE/bond_nonlinear.h @@ -35,7 +35,7 @@ class BondNonlinear : public Bond { void read_restart(FILE *); void write_data(FILE *); double single(int, double, int, int, double &); - virtual void *extract(char *, int &); + virtual void *extract(const char *, int &); protected: double *epsilon,*r0,*lamda; diff --git a/src/bond.h b/src/bond.h index b558a2a35e..8d7585b388 100644 --- a/src/bond.h +++ b/src/bond.h @@ -52,7 +52,7 @@ class Bond : protected Pointers { virtual void write_data(FILE *) {} virtual double single(int, double, int, int, double &) = 0; virtual double memory_usage(); - virtual void *extract(char *, int &) {return NULL;} + virtual void *extract(const char *, int &) {return NULL;} virtual void reinit(); void write_file(int, char**);