remove dead code and silence compiler warnings in USER-YAFF package

This commit is contained in:
Axel Kohlmeyer
2019-02-13 07:19:57 -05:00
parent 38b003261d
commit 76533b1572
5 changed files with 28 additions and 35 deletions

View File

@ -61,9 +61,9 @@ void AngleCross::compute(int eflag, int vflag)
int i1,i2,i3,n,type;
double delx1,dely1,delz1,delx2,dely2,delz2;
double eangle,f1[3],f3[3];
double dtheta,dtheta2,dtheta3,dtheta4,de_angle;
double dtheta;
double dr1,dr2,tk1,tk2,aa1,aa2,aa11,aa12,aa21,aa22;
double rsq1,rsq2,r1,r2,c,s,a,a11,a12,a22,b1,b2;
double rsq1,rsq2,r1,r2,c,s,b1,b2;
double vx11,vx12,vy11,vy12,vz11,vz12,vx21,vx22,vy21,vy22,vz21,vz22;
eangle = 0.0;
@ -305,7 +305,7 @@ void AngleCross::read_restart(FILE *fp)
void AngleCross::write_data(FILE *fp)
{
for (int i = 1; i <= atom->nangletypes; i++)
fprintf(fp,"%d %g %g %g %g\n",
fprintf(fp,"%d %g %g %g %g %g %g\n",
i,kss[i],kbs0[i],kbs1[i],r00[i],r01[i],theta0[i]/MY_PI*180.0);
}

View File

@ -58,9 +58,7 @@ void AngleMM3::compute(int eflag, int vflag)
double delx1,dely1,delz1,delx2,dely2,delz2;
double eangle,f1[3],f3[3];
double dtheta,dtheta2,dtheta3,dtheta4,de_angle;
double dr1,dr2,tk1,tk2,aa1,aa2,aa11,aa12,aa21,aa22;
double rsq1,rsq2,r1,r2,c,s,a,a11,a12,a22,b1,b2;
double vx11,vx12,vy11,vy12,vz11,vz12,vx21,vx22,vy21,vy22,vz21,vz22;
double rsq1,rsq2,r1,r2,c,s,a,a11,a12,a22;
eangle = 0.0;
if (eflag || vflag) ev_setup(eflag,vflag);

View File

@ -201,12 +201,13 @@ void BondMM3::write_data(FILE *fp)
/* ---------------------------------------------------------------------- */
double BondMM3::single(int type, double rsq, int i, int j, double &fforce)
double BondMM3::single(int type, double rsq,
int /* i */, int /* j */, double &fforce)
{
/*
E = K(r-r0)^2 [1-2.55*(r-r0)+(7/12)*2.55^(2)*(r-r0)^2]
with -2.55 in angstrom^(-1) and (7/12)*2.55^(2) in angstrom^(-2)
These prefactors are converted here to the correct units
E = K(r-r0)^2 [1-2.55*(r-r0)+(7/12)*2.55^(2)*(r-r0)^2]
with -2.55 in angstrom^(-1) and (7/12)*2.55^(2) in angstrom^(-2)
These prefactors are converted here to the correct units
*/
double K3 = -2.55/force->angstrom;
double K4 = 7.0/12.0*2.55*2.55/force->angstrom/force->angstrom;

View File

@ -82,13 +82,13 @@ PairLJSwitch3CoulGaussLong::~PairLJSwitch3CoulGaussLong()
void PairLJSwitch3CoulGaussLong::compute(int eflag, int vflag)
{
int i,ii,j,jj,inum,jnum,itype,jtype,itable,jtable,ktable;
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,ecoul2,fpair;
double fraction,fraction2,table;
int i,ii,j,jj,inum,jnum,itype,jtype,itable;
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair;
double fraction,table;
double r,r2inv,r6inv,forcecoul,forcecoul2,forcelj,factor_coul,factor_lj,tr,ftr,trx;
double grij,expm2,prefactor,prefactor2,t,erfc1,erfc2,rrij,expn2,expb,g_ewald2i,g_ewaldi;
double grij,expm2,prefactor,prefactor2,t,erfc1,erfc2,rrij,expn2;
int *ilist,*jlist,*numneigh,**firstneigh;
double rsq, lookup_corr;
double rsq;
evdwl = ecoul = 0.0;
if (eflag || vflag) ev_setup(eflag,vflag);
@ -109,9 +109,6 @@ void PairLJSwitch3CoulGaussLong::compute(int eflag, int vflag)
ilist = list->ilist;
numneigh = list->numneigh;
firstneigh = list->firstneigh;
g_ewaldi = 1.0/g_ewald;
g_ewald2i = g_ewaldi*g_ewaldi;
lookup_corr = 0.0;
// loop over neighbors of my atoms
for (ii = 0; ii < inum; ii++) {
@ -610,13 +607,13 @@ void PairLJSwitch3CoulGaussLong::write_data_all(FILE *fp)
/* ---------------------------------------------------------------------- */
double PairLJSwitch3CoulGaussLong::single(int i, int j, int itype, int jtype,
double rsq,
double factor_coul, double factor_lj,
double &fforce)
double rsq,
double factor_coul, double factor_lj,
double &fforce)
{
double r2inv,r6inv,r,grij,expm2,t,erfc1,prefactor,prefactor2,rrij,expn2,erfc2;
double fraction,table,forcecoul,forcecoul2,forcelj,phicoul,phicoul2,philj;
double expb, ecoul, evdwl, trx, tr, ftr;
double r2inv,r6inv,r,grij,expm2,t,erfc1,prefactor,prefactor2;
double fraction,table,forcecoul,forcecoul2,forcelj,phicoul;
double rrij,expn2,erfc2,expb,ecoul,evdwl,trx,tr,ftr;
int itable;

View File

@ -82,13 +82,13 @@ PairMM3Switch3CoulGaussLong::~PairMM3Switch3CoulGaussLong()
void PairMM3Switch3CoulGaussLong::compute(int eflag, int vflag)
{
int i,ii,j,jj,inum,jnum,itype,jtype,itable,jtable,ktable;
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,ecoul2,fpair;
double fraction,fraction2,table;
int i,ii,j,jj,inum,jnum,itype,jtype,itable;
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair;
double fraction,table;
double r,r2inv,r6inv,forcecoul,forcecoul2,forcelj,factor_coul,factor_lj,tr,ftr,trx;
double grij,expm2,prefactor,prefactor2,t,erfc1,erfc2,rrij,expn2,expb,g_ewald2i,g_ewaldi;
double grij,expm2,prefactor,prefactor2,t,erfc1,erfc2,rrij,expn2,expb;
int *ilist,*jlist,*numneigh,**firstneigh;
double rsq, lookup_corr;
double rsq;
evdwl = ecoul = 0.0;
if (eflag || vflag) ev_setup(eflag,vflag);
@ -109,9 +109,6 @@ void PairMM3Switch3CoulGaussLong::compute(int eflag, int vflag)
ilist = list->ilist;
numneigh = list->numneigh;
firstneigh = list->firstneigh;
g_ewaldi = 1.0/g_ewald;
g_ewald2i = g_ewaldi*g_ewaldi;
lookup_corr = 0.0;
// loop over neighbors of my atoms
for (ii = 0; ii < inum; ii++) {
@ -615,9 +612,9 @@ double PairMM3Switch3CoulGaussLong::single(int i, int j, int itype, int jtype,
double factor_coul, double factor_lj,
double &fforce)
{
double r2inv,r6inv,r,grij,expm2,t,erfc1,prefactor,prefactor2,rrij,expn2,erfc2;
double fraction,table,forcecoul,forcecoul2,forcelj,phicoul,phicoul2,philj;
double expb, ecoul, evdwl, trx, tr, ftr;
double r2inv,r6inv,r,grij,expm2,t,erfc1,prefactor,prefactor2;
double fraction,table,forcecoul,forcecoul2,forcelj,phicoul;
double expb,rrij,expn2,erfc2,ecoul,evdwl,trx,tr,ftr;
int itable;