Removed obsolete variable from pair_morse_soft.

This commit is contained in:
Stefan Paquay
2016-05-28 15:49:58 +02:00
parent bd81c9b9e8
commit 56e67fac70
2 changed files with 9 additions and 31 deletions

View File

@ -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;

View File

@ -48,7 +48,7 @@ class PairMorseSoft : public PairMorse {
double **lambda;
int nlambda;
double alpham, shift_range;
double shift_range;
void allocate();
};