From 56e67fac70dade8d6b73ea0164403745cebec5df Mon Sep 17 00:00:00 2001 From: Stefan Paquay Date: Sat, 28 May 2016 15:49:58 +0200 Subject: [PATCH] Removed obsolete variable from pair_morse_soft. --- src/USER-FEP/pair_morse_soft.cpp | 38 +++++++------------------------- src/USER-FEP/pair_morse_soft.h | 2 +- 2 files changed, 9 insertions(+), 31 deletions(-) diff --git a/src/USER-FEP/pair_morse_soft.cpp b/src/USER-FEP/pair_morse_soft.cpp index ed2a600651..0dbfa30839 100644 --- a/src/USER-FEP/pair_morse_soft.cpp +++ b/src/USER-FEP/pair_morse_soft.cpp @@ -46,9 +46,9 @@ void PairMorseSoft::compute(int eflag, int vflag) { int i,j,ii,jj,inum,jnum,itype,jtype; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair; - double rsq,r,dr,dexp,dexp2,dexp3,dexp4,factor_lj; - double ea,ea2,ea3,phi,V0,iea,iea2,iea3; - double D, a, x0, y0, l, B, s1, llf; + double rsq,r,dr,dexp,dexp2,dexp3,factor_lj; + double ea,phi,V0,iea2; + double D, a, x0, l, B, s1, llf; int *ilist,*jlist,*numneigh,**firstneigh; @@ -100,21 +100,14 @@ void PairMorseSoft::compute(int eflag, int vflag) dexp = exp( -a * dr ); dexp2 = dexp*dexp; dexp3 = dexp2*dexp; - dexp4 = dexp2*dexp2; l = lambda[itype][jtype]; ea = exp( a * x0 ); - ea2 = ea*ea; - ea3 = ea2*ea; - - iea = exp( -a*x0 ); iea2 = exp( -2.*a*x0 ); - iea3 = exp( -3.*a*x0 ); V0 = D * dexp * ( dexp - 2.0 ); - y0 = alpham * D * ea * ( ea - 2.0 ); B = -2.0 * D * iea2 * ( ea - 1.0 ) / 3.0; @@ -223,9 +216,8 @@ void PairMorseSoft::settings(int narg, char **arg) if (narg != 4) error->all(FLERR,"Illegal pair_style command"); nlambda = force->inumeric(FLERR,arg[0]); - alpham = force->numeric(FLERR,arg[1]); - shift_range = force->numeric(FLERR,arg[2]); - cut_global = force->numeric(FLERR,arg[3]); + shift_range = force->numeric(FLERR,arg[1]); + cut_global = force->numeric(FLERR,arg[2]); // reset cutoffs that have been explicitly set @@ -257,17 +249,11 @@ double PairMorseSoft::init_one(int i, int j) double dexp = exp( alpha_dr ); double dexp2 = dexp*dexp; double dexp3 = dexp2*dexp; - double dexp4 = dexp2*dexp2; l = lambda[i][j]; double ea = exp( a*x0 ); - double ea2 = ea*ea; - double ea3 = ea2*ea; - - double iea = exp( -a*x0 ); double iea2 = exp( -2.*a*x0 ); - double iea3 = exp( -3.*a*x0 ); V0 = D * dexp * ( dexp - 2.0 ); @@ -381,9 +367,9 @@ double PairMorseSoft::single(int i, int j, int itype, int jtype, double rsq, double factor_coul, double factor_lj, double &fforce) { - double r, dr, dexp, dexp2, dexp3, dexp4, phi; - double A, B, D, a, ea, ea2, ea3, iea, iea2, iea3; - double y0, x0, V0, s1, l, llf; + double r, dr, dexp, dexp2, dexp3, phi; + double B, D, a, ea, iea2; + double x0, V0, s1, l, llf; D = d0[itype][jtype]; a = alpha[itype][jtype]; @@ -393,22 +379,14 @@ double PairMorseSoft::single(int i, int j, int itype, int jtype, double rsq, dexp = exp( -a * dr ); dexp2 = dexp*dexp; dexp3 = dexp2*dexp; - dexp4 = dexp2*dexp2; l = lambda[itype][jtype]; ea = exp( a * x0 ); - ea2 = ea*ea; - ea3 = ea2*ea; - - iea = exp( -a*x0 ); iea2 = exp( -2.*a*x0 ); - iea3 = exp( -3.*a*x0 ); - V0 = D * dexp * ( dexp - 2.0 ); - y0 = alpham * D * ea * ( ea - 2.0 ); B = -2.0 * D * iea2 * ( ea - 1.0 ) / 3.0; diff --git a/src/USER-FEP/pair_morse_soft.h b/src/USER-FEP/pair_morse_soft.h index 5d9ddd578b..68ce71789c 100644 --- a/src/USER-FEP/pair_morse_soft.h +++ b/src/USER-FEP/pair_morse_soft.h @@ -48,7 +48,7 @@ class PairMorseSoft : public PairMorse { double **lambda; int nlambda; - double alpham, shift_range; + double shift_range; void allocate(); };