diff --git a/src/AMOEBA/amoeba_induce.cpp b/src/AMOEBA/amoeba_induce.cpp index 7434c57e27..ae801e5a62 100644 --- a/src/AMOEBA/amoeba_induce.cpp +++ b/src/AMOEBA/amoeba_induce.cpp @@ -53,8 +53,7 @@ enum{GORDON1,GORDON2}; void PairAmoeba::induce() { bool done; - int i,j,m,itype; - int iter,maxiter; + int i,j,m,itype,iter; double polmin; double eps,epsold; double epsd,epsp; @@ -159,7 +158,6 @@ void PairAmoeba::induce() if (poltyp == MUTUAL) { done = false; - maxiter = 100; iter = 0; polmin = 0.00000001; eps = 100.0; diff --git a/src/MISC/pair_srp_react.h b/src/MISC/pair_srp_react.h index 95a8163900..a6e4cebb6f 100644 --- a/src/MISC/pair_srp_react.h +++ b/src/MISC/pair_srp_react.h @@ -34,7 +34,7 @@ class PairSRPREACT : public PairSRP { private: char *idbreak; char *idcreate; - bool bond_create, bond_break; + bool bond_break, bond_create; }; } // namespace LAMMPS_NS #endif diff --git a/src/ML-SNAP/compute_snap.cpp b/src/ML-SNAP/compute_snap.cpp index 5d2f3666bc..11b17ebcb2 100644 --- a/src/ML-SNAP/compute_snap.cpp +++ b/src/ML-SNAP/compute_snap.cpp @@ -539,18 +539,18 @@ void ComputeSnap::compute_array() for (int icoeff = 0; icoeff < ncoeff; icoeff++) snap[irow][k++] += snaptr->blist[icoeff]; - // quadratic contributions + // quadratic contributions - if (quadraticflag) { - for (int icoeff = 0; icoeff < ncoeff; icoeff++) { - double bveci = snaptr->blist[icoeff]; - snap[irow][k++] += 0.5*bveci*bveci; - for (int jcoeff = icoeff+1; jcoeff < ncoeff; jcoeff++) { - double bvecj = snaptr->blist[jcoeff]; - snap[irow][k++] += bveci*bvecj; - } + if (quadraticflag) { + for (int icoeff = 0; icoeff < ncoeff; icoeff++) { + double bveci = snaptr->blist[icoeff]; + snap[irow][k++] += 0.5*bveci*bveci; + for (int jcoeff = icoeff+1; jcoeff < ncoeff; jcoeff++) { + double bvecj = snaptr->blist[jcoeff]; + snap[irow][k++] += bveci*bvecj; } } + } } else { int k = 3; diff --git a/src/REAXFF/fix_reaxff_species.cpp b/src/REAXFF/fix_reaxff_species.cpp index 0f5af77453..f38b6fb1c5 100644 --- a/src/REAXFF/fix_reaxff_species.cpp +++ b/src/REAXFF/fix_reaxff_species.cpp @@ -827,12 +827,11 @@ void FixReaxFFSpecies::WritePos(int Nmole, int Nspec) void FixReaxFFSpecies::DeleteSpecies(int Nmole, int Nspec) { - int i, j, m, n, k, itype, cid; + int i, j, m, n, itype, cid; int ndel, ndelone, count, count_tmp; int *Nameall; int *mask = atom->mask; double localmass, totalmass; - double **spec_atom = f_SPECBOND->array_atom; std::string species_str; AtomVec *avec = atom->avec; diff --git a/src/SMTBQ/pair_smtbq.cpp b/src/SMTBQ/pair_smtbq.cpp index 60198f062e..988958ca36 100644 --- a/src/SMTBQ/pair_smtbq.cpp +++ b/src/SMTBQ/pair_smtbq.cpp @@ -1232,8 +1232,6 @@ void PairSMTBQ::tabqeq() double aCoeff,bCoeff,rcoupe,nang; int n = atom->ntypes; - int nlocal = atom->nlocal; - int nghost = atom->nghost; nmax = atom->nmax; nntype = int((n+1)*n/2); @@ -1242,7 +1240,7 @@ void PairSMTBQ::tabqeq() #if VERBOSE printf ("kmax %d, ds %f, nmax %d\n",kmax,ds,nmax); - printf ("nlocal = %d, nghost = %d\n",nlocal,nghost); + printf ("nlocal = %d, nghost = %d\n",atom->nlocal,atom->nghost); printf ("nntypes %d, kmax %d, rc %f, n %d\n",nntype,kmax,rc,n); #endif