diff --git a/src/CG-DNA/pair_oxdna2_dh.cpp b/src/CG-DNA/pair_oxdna2_dh.cpp index cf79fd07cf..19b158ea61 100644 --- a/src/CG-DNA/pair_oxdna2_dh.cpp +++ b/src/CG-DNA/pair_oxdna2_dh.cpp @@ -18,7 +18,6 @@ #include "pair_oxdna2_dh.h" #include "atom.h" -#include "atom_vec_ellipsoid.h" #include "comm.h" #include "error.h" #include "force.h" @@ -101,10 +100,6 @@ void PairOxdna2Dh::compute(int eflag, int vflag) int *alist,*blist,*numneigh,**firstneigh; double *special_lj = force->special_lj; - AtomVecEllipsoid *avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); - AtomVecEllipsoid::Bonus *bonus = avec->bonus; - int *ellipsoid = atom->ellipsoid; - int a,b,ia,ib,anum,bnum,atype,btype; evdwl = 0.0; diff --git a/src/CG-DNA/pair_oxdna_coaxstk.cpp b/src/CG-DNA/pair_oxdna_coaxstk.cpp index 6df434c012..1976de0f62 100644 --- a/src/CG-DNA/pair_oxdna_coaxstk.cpp +++ b/src/CG-DNA/pair_oxdna_coaxstk.cpp @@ -18,7 +18,6 @@ #include "pair_oxdna_coaxstk.h" #include "atom.h" -#include "atom_vec_ellipsoid.h" #include "comm.h" #include "error.h" #include "force.h" @@ -107,7 +106,7 @@ PairOxdnaCoaxstk::~PairOxdnaCoaxstk() void PairOxdnaCoaxstk::compute(int eflag, int vflag) { double delf[3],delt[3],delta[3],deltb[3]; // force, torque increment; - double evdwl,fpair,finc,tpair,factor_lj; + double evdwl,finc,tpair,factor_lj; double v1tmp[3],v2tmp[3],v3tmp[3]; double delr_ss[3],delr_ss_norm[3],rsq_ss,r_ss,rinv_ss; double delr_st[3],delr_st_norm[3],rsq_st,r_st,rinv_st; @@ -142,10 +141,6 @@ void PairOxdnaCoaxstk::compute(int eflag, int vflag) int *alist,*blist,*numneigh,**firstneigh; double *special_lj = force->special_lj; - AtomVecEllipsoid *avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); - AtomVecEllipsoid::Bonus *bonus = avec->bonus; - int *ellipsoid = atom->ellipsoid; - int a,b,ia,ib,anum,bnum,atype,btype; double f2,f4t1,f4t4,f4t5,f4t6,f5c3; @@ -345,8 +340,6 @@ void PairOxdnaCoaxstk::compute(int eflag, int vflag) // force, torque and virial contribution for forces between stacking sites - fpair = 0.0; - delf[0] = 0.0; delf[1] = 0.0; delf[2] = 0.0; @@ -361,7 +354,6 @@ void PairOxdnaCoaxstk::compute(int eflag, int vflag) // radial force finc = -df2 * f4t1 * f4t4 * f4t5 * f4t6 * f5c3 * f5c3 * rinv_st * factor_lj; - fpair += finc; delf[0] += delr_st[0] * finc; delf[1] += delr_st[1] * finc; @@ -371,7 +363,6 @@ void PairOxdnaCoaxstk::compute(int eflag, int vflag) if (theta5 && theta5p) { finc = -f2 * f4t1 * f4t4 * df4t5 * f4t6 * f5c3 * f5c3 * rinv_st * factor_lj; - fpair += finc; delf[0] += (delr_st_norm[0]*cost5 - az[0]) * finc; delf[1] += (delr_st_norm[1]*cost5 - az[1]) * finc; @@ -383,7 +374,6 @@ void PairOxdnaCoaxstk::compute(int eflag, int vflag) if (theta6 && theta6p) { finc = -f2 * f4t1* f4t4 * f4t5 * df4t6 * f5c3 * f5c3 * rinv_st * factor_lj; - fpair += finc; delf[0] += (delr_st_norm[0]*cost6 - bz[0]) * finc; delf[1] += (delr_st_norm[1]*cost6 - bz[1]) * finc; @@ -400,7 +390,6 @@ void PairOxdnaCoaxstk::compute(int eflag, int vflag) ay[2] = ny_xtrct[a][2]; finc = -f2 * f4t1* f4t4 * f4t5 * f4t6 * 2.0 * f5c3 * df5c3 * factor_lj; - fpair += finc; gamma = d_cs - d_cst; gammacub = gamma * gamma * gamma; diff --git a/src/CG-DNA/pair_oxdna_excv.h b/src/CG-DNA/pair_oxdna_excv.h index 5cf781feaa..a255c954bb 100644 --- a/src/CG-DNA/pair_oxdna_excv.h +++ b/src/CG-DNA/pair_oxdna_excv.h @@ -41,8 +41,8 @@ class PairOxdnaExcv : public Pair { void write_data(FILE *) override; void write_data_all(FILE *) override; void *extract(const char *, int &) override; - virtual int pack_forward_comm(int, int *, double *, int, int *); - virtual void unpack_forward_comm(int, int, double *); + int pack_forward_comm(int, int *, double *, int, int *) override; + void unpack_forward_comm(int, int, double *) override; protected: // s=sugar-phosphate backbone site, b=base site, st=stacking site diff --git a/src/CG-DNA/pair_oxdna_hbond.cpp b/src/CG-DNA/pair_oxdna_hbond.cpp index 926e9207a0..3f563767c5 100644 --- a/src/CG-DNA/pair_oxdna_hbond.cpp +++ b/src/CG-DNA/pair_oxdna_hbond.cpp @@ -18,7 +18,6 @@ #include "pair_oxdna_hbond.h" #include "atom.h" -#include "atom_vec_ellipsoid.h" #include "comm.h" #include "error.h" #include "force.h" @@ -135,7 +134,7 @@ void PairOxdnaHbond::compute(int eflag, int vflag) { double delf[3],delta[3],deltb[3]; // force, torque increment; - double evdwl,fpair,finc,tpair,factor_lj; + double evdwl,finc,tpair,factor_lj; double delr_hb[3],delr_hb_norm[3],rsq_hb,r_hb,rinv_hb; double theta1,t1dir[3],cost1; double theta2,t2dir[3],cost2; @@ -162,10 +161,6 @@ void PairOxdnaHbond::compute(int eflag, int vflag) int *alist,*blist,*numneigh,**firstneigh; double *special_lj = force->special_lj; - AtomVecEllipsoid *avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); - AtomVecEllipsoid::Bonus *bonus = avec->bonus; - int *ellipsoid = atom->ellipsoid; - int a,b,ia,ib,anum,bnum,atype,btype; double f1,f4t1,f4t4,f4t2,f4t3,f4t7,f4t8; @@ -338,8 +333,6 @@ void PairOxdnaHbond::compute(int eflag, int vflag) // force, torque and virial contribution for forces between h-bonding sites - fpair = 0.0; - delf[0] = 0.0; delf[1] = 0.0; delf[2] = 0.0; @@ -354,7 +347,6 @@ void PairOxdnaHbond::compute(int eflag, int vflag) // radial force finc = -df1 * f4t1 * f4t2 * f4t3 * f4t4 * f4t7 * f4t8 * factor_lj; - fpair += finc; delf[0] += delr_hb[0] * finc; delf[1] += delr_hb[1] * finc; @@ -364,7 +356,6 @@ void PairOxdnaHbond::compute(int eflag, int vflag) if (theta2) { finc = -f1 * f4t1 * df4t2 * f4t3 * f4t4 * f4t7 * f4t8 * rinv_hb * factor_lj; - fpair += finc; delf[0] += (delr_hb_norm[0]*cost2 + ax[0]) * finc; delf[1] += (delr_hb_norm[1]*cost2 + ax[1]) * finc; @@ -376,7 +367,6 @@ void PairOxdnaHbond::compute(int eflag, int vflag) if (theta3) { finc = -f1 * f4t1 * f4t2 * df4t3 * f4t4 * f4t7 * f4t8 * rinv_hb * factor_lj; - fpair += finc; delf[0] += (delr_hb_norm[0]*cost3 - bx[0]) * finc; delf[1] += (delr_hb_norm[1]*cost3 - bx[1]) * finc; @@ -388,7 +378,6 @@ void PairOxdnaHbond::compute(int eflag, int vflag) if (theta7) { finc = -f1 * f4t1 * f4t2 * f4t3 * f4t4 * df4t7 * f4t8 * rinv_hb * factor_lj; - fpair += finc; delf[0] += (delr_hb_norm[0]*cost7 + az[0]) * finc; delf[1] += (delr_hb_norm[1]*cost7 + az[1]) * finc; @@ -400,7 +389,6 @@ void PairOxdnaHbond::compute(int eflag, int vflag) if (theta8) { finc = -f1 * f4t1 * f4t2 * f4t3 * f4t4 * f4t7 * df4t8 * rinv_hb * factor_lj; - fpair += finc; delf[0] += (delr_hb_norm[0]*cost8 - bz[0]) * finc; delf[1] += (delr_hb_norm[1]*cost8 - bz[1]) * finc; diff --git a/src/CG-DNA/pair_oxdna_stk.cpp b/src/CG-DNA/pair_oxdna_stk.cpp index feeb41d78b..0f17d332d6 100644 --- a/src/CG-DNA/pair_oxdna_stk.cpp +++ b/src/CG-DNA/pair_oxdna_stk.cpp @@ -18,7 +18,6 @@ #include "pair_oxdna_stk.h" #include "atom.h" -#include "atom_vec_ellipsoid.h" #include "comm.h" #include "error.h" #include "force.h" @@ -213,7 +212,7 @@ void PairOxdnaStk::ev_tally_xyz(int i, int j, int nlocal, int newton_bond, void PairOxdnaStk::compute(int eflag, int vflag) { double delf[3],delta[3],deltb[3]; // force, torque increment; - double evdwl,fpair,finc,tpair; + double evdwl,finc,tpair; double delr_ss[3],delr_ss_norm[3],rsq_ss,r_ss,rinv_ss; double delr_st[3],delr_st_norm[3],rsq_st,r_st,rinv_st; double theta4,t4dir[3],cost4; @@ -243,10 +242,6 @@ void PairOxdnaStk::compute(int eflag, int vflag) tagint *id5p = atom->id5p; - AtomVecEllipsoid *avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); - AtomVecEllipsoid::Bonus *bonus = avec->bonus; - int *ellipsoid = atom->ellipsoid; - int a,b,btemp,in,atype,btype; double f1,f4t4,f4t5,f4t6,f5c1,f5c2; @@ -430,8 +425,6 @@ void PairOxdnaStk::compute(int eflag, int vflag) // force, torque and virial contribution for forces between stacking sites - fpair = 0.0; - delf[0] = 0.0; delf[1] = 0.0; delf[2] = 0.0; @@ -446,7 +439,6 @@ void PairOxdnaStk::compute(int eflag, int vflag) // radial force finc = -df1 * f4t4 * f4t5 * f4t6 * f5c1 * f5c2; - fpair += finc; delf[0] += delr_st[0] * finc; delf[1] += delr_st[1] * finc; @@ -456,7 +448,6 @@ void PairOxdnaStk::compute(int eflag, int vflag) if (theta5p) { finc = -f1 * f4t4 * df4t5 * f4t6 * f5c1 * f5c2 * rinv_st; - fpair += finc; delf[0] += (delr_st_norm[0]*cost5p - bz[0]) * finc; delf[1] += (delr_st_norm[1]*cost5p - bz[1]) * finc; @@ -468,7 +459,6 @@ void PairOxdnaStk::compute(int eflag, int vflag) if (theta6p) { finc = -f1 * f4t4 * f4t5 * df4t6 * f5c1 * f5c2 * rinv_st; - fpair += finc; delf[0] += (delr_st_norm[0]*cost6p - az[0]) * finc; delf[1] += (delr_st_norm[1]*cost6p - az[1]) * finc; @@ -520,8 +510,6 @@ void PairOxdnaStk::compute(int eflag, int vflag) // force, torque and virial contribution for forces between backbone sites - fpair = 0.0; - delf[0] = 0.0; delf[1] = 0.0; delf[2] = 0.0; @@ -538,7 +526,6 @@ void PairOxdnaStk::compute(int eflag, int vflag) if (cosphi1) { finc = -f1 * f4t4 * f4t5 * f4t6 * df5c1 * f5c2 * rinv_ss; - fpair += finc; delf[0] += (delr_ss_norm[0]*cosphi1 - by[0]) * finc; delf[1] += (delr_ss_norm[1]*cosphi1 - by[1]) * finc; @@ -550,7 +537,6 @@ void PairOxdnaStk::compute(int eflag, int vflag) if (cosphi2) { finc = -f1 * f4t4 * f4t5 * f4t6 * f5c1 * df5c2 * rinv_ss; - fpair += finc; delf[0] += (delr_ss_norm[0]*cosphi2 - ay[0]) * finc; delf[1] += (delr_ss_norm[1]*cosphi2 - ay[1]) * finc; diff --git a/src/CG-DNA/pair_oxdna_xstk.cpp b/src/CG-DNA/pair_oxdna_xstk.cpp index ffaeacc137..f50d5219f9 100644 --- a/src/CG-DNA/pair_oxdna_xstk.cpp +++ b/src/CG-DNA/pair_oxdna_xstk.cpp @@ -18,7 +18,6 @@ #include "pair_oxdna_xstk.h" #include "atom.h" -#include "atom_vec_ellipsoid.h" #include "comm.h" #include "error.h" #include "force.h" @@ -112,7 +111,7 @@ PairOxdnaXstk::~PairOxdnaXstk() void PairOxdnaXstk::compute(int eflag, int vflag) { double delf[3],delta[3],deltb[3]; // force, torque increment; - double evdwl,fpair,finc,tpair,factor_lj; + double evdwl,finc,tpair,factor_lj; double delr_hb[3],delr_hb_norm[3],rsq_hb,r_hb,rinv_hb; double theta1,t1dir[3],cost1; double theta2,t2dir[3],cost2; @@ -139,10 +138,6 @@ void PairOxdnaXstk::compute(int eflag, int vflag) int *alist,*blist,*numneigh,**firstneigh; double *special_lj = force->special_lj; - AtomVecEllipsoid *avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); - AtomVecEllipsoid::Bonus *bonus = avec->bonus; - int *ellipsoid = atom->ellipsoid; - int a,b,ia,ib,anum,bnum,atype,btype; double f2,f4t1,f4t4,f4t2,f4t3,f4t7,f4t8; @@ -337,8 +332,6 @@ void PairOxdnaXstk::compute(int eflag, int vflag) // force, torque and virial contribution for forces between h-bonding sites - fpair = 0.0; - delf[0] = 0.0; delf[1] = 0.0; delf[2] = 0.0; @@ -353,7 +346,6 @@ void PairOxdnaXstk::compute(int eflag, int vflag) // radial force finc = -df2 * f4t1 * f4t2 * f4t3 * f4t4 * f4t7 * f4t8 * rinv_hb *factor_lj; - fpair += finc; delf[0] += delr_hb[0] * finc; delf[1] += delr_hb[1] * finc; @@ -363,7 +355,6 @@ void PairOxdnaXstk::compute(int eflag, int vflag) if (theta2) { finc = -f2 * f4t1 * df4t2 * f4t3 * f4t4 * f4t7 * f4t8 * rinv_hb * factor_lj; - fpair += finc; delf[0] += (delr_hb_norm[0]*cost2 + ax[0]) * finc; delf[1] += (delr_hb_norm[1]*cost2 + ax[1]) * finc; @@ -375,7 +366,6 @@ void PairOxdnaXstk::compute(int eflag, int vflag) if (theta3) { finc = -f2 * f4t1 * f4t2 * df4t3 * f4t4 * f4t7 * f4t8 * rinv_hb * factor_lj; - fpair += finc; delf[0] += (delr_hb_norm[0]*cost3 - bx[0]) * finc; delf[1] += (delr_hb_norm[1]*cost3 - bx[1]) * finc; @@ -387,7 +377,6 @@ void PairOxdnaXstk::compute(int eflag, int vflag) if (theta7) { finc = -f2 * f4t1 * f4t2 * f4t3 * f4t4 * df4t7 * f4t8 * rinv_hb * factor_lj; - fpair += finc; delf[0] += (delr_hb_norm[0]*cost7 + az[0]) * finc; delf[1] += (delr_hb_norm[1]*cost7 + az[1]) * finc; @@ -399,7 +388,6 @@ void PairOxdnaXstk::compute(int eflag, int vflag) if (theta8) { finc = -f2 * f4t1 * f4t2 * f4t3 * f4t4 * f4t7 * df4t8 * rinv_hb * factor_lj; - fpair += finc; delf[0] += (delr_hb_norm[0]*cost8 - bz[0]) * finc; delf[1] += (delr_hb_norm[1]*cost8 - bz[1]) * finc; diff --git a/src/CG-DNA/pair_oxrna2_stk.cpp b/src/CG-DNA/pair_oxrna2_stk.cpp index c5fa47e25e..a14f78e715 100644 --- a/src/CG-DNA/pair_oxrna2_stk.cpp +++ b/src/CG-DNA/pair_oxrna2_stk.cpp @@ -18,7 +18,6 @@ #include "pair_oxrna2_stk.h" #include "atom.h" -#include "atom_vec_ellipsoid.h" #include "comm.h" #include "error.h" #include "force.h" @@ -222,7 +221,7 @@ void PairOxrna2Stk::compute(int eflag, int vflag) { double delf[3],delta[3],deltb[3]; // force, torque increment; - double evdwl,fpair,finc,tpair; + double evdwl,finc,tpair; double delr_ss[3],delr_ss_norm[3],rsq_ss,r_ss,rinv_ss; double delr_st[3],delr_st_norm[3],rsq_st,r_st,rinv_st; double theta5p,t5pdir[3],cost5p; @@ -262,10 +261,6 @@ void PairOxrna2Stk::compute(int eflag, int vflag) tagint *id5p = atom->id5p; - AtomVecEllipsoid *avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); - AtomVecEllipsoid::Bonus *bonus = avec->bonus; - int *ellipsoid = atom->ellipsoid; - int a,b,btemp,in,atype,btype; double f1,f4t5,f4t6,f4t9,f4t10,f5c1,f5c2; @@ -462,8 +457,6 @@ void PairOxrna2Stk::compute(int eflag, int vflag) // force, torque and virial contribution for forces between stacking sites - fpair = 0.0; - delf[0] = 0.0; delf[1] = 0.0; delf[2] = 0.0; @@ -478,7 +471,6 @@ void PairOxrna2Stk::compute(int eflag, int vflag) // radial force finc = -df1 * f4t5 * f4t6 * f4t9 * f4t10 * f5c1 * f5c2; - fpair += finc; delf[0] += delr_st[0] * finc; delf[1] += delr_st[1] * finc; @@ -488,7 +480,6 @@ void PairOxrna2Stk::compute(int eflag, int vflag) if (theta5p) { finc = -f1 * df4t5 * f4t6 * f4t9 * f4t10 * f5c1 * f5c2 * rinv_st; - fpair += finc; delf[0] += (delr_st_norm[0]*cost5p - bz[0]) * finc; delf[1] += (delr_st_norm[1]*cost5p - bz[1]) * finc; @@ -500,7 +491,6 @@ void PairOxrna2Stk::compute(int eflag, int vflag) if (theta6p) { finc = -f1 * f4t5 * df4t6 * f4t9 * f4t10 * f5c1 * f5c2 * rinv_st; - fpair += finc; delf[0] += (delr_st_norm[0]*cost6p - az[0]) * finc; delf[1] += (delr_st_norm[1]*cost6p - az[1]) * finc; @@ -552,8 +542,6 @@ void PairOxrna2Stk::compute(int eflag, int vflag) // force, torque and virial contribution for forces between backbone sites - fpair = 0.0; - delf[0] = 0.0; delf[1] = 0.0; delf[2] = 0.0; @@ -570,7 +558,6 @@ void PairOxrna2Stk::compute(int eflag, int vflag) if (theta9) { finc = -f1 * f4t5 * f4t6 * df4t9 * f4t10 * f5c1 * f5c2 * rinv_ss; - fpair += finc; delf[0] += (delr_ss_norm[0]*cost9 - aux3p[0]) * finc; delf[1] += (delr_ss_norm[1]*cost9 - aux3p[1]) * finc; @@ -582,7 +569,6 @@ void PairOxrna2Stk::compute(int eflag, int vflag) if (theta10) { finc = -f1 * f4t5 * f4t6 * f4t9 * df4t10 * f5c1 * f5c2 * rinv_ss; - fpair += finc; delf[0] += (delr_ss_norm[0]*cost10 - aux5p[0]) * finc; delf[1] += (delr_ss_norm[1]*cost10 - aux5p[1]) * finc; @@ -594,7 +580,6 @@ void PairOxrna2Stk::compute(int eflag, int vflag) if (cosphi1) { finc = -f1 * f4t5 * f4t6 * f4t9 * f4t10 * df5c1 * f5c2 * rinv_ss; - fpair += finc; delf[0] += (delr_ss_norm[0]*cosphi1 - by[0]) * finc; delf[1] += (delr_ss_norm[1]*cosphi1 - by[1]) * finc; @@ -606,7 +591,6 @@ void PairOxrna2Stk::compute(int eflag, int vflag) if (cosphi2) { finc = -f1 * f4t5 * f4t6 * f4t9 * f4t10 * f5c1 * df5c2 * rinv_ss; - fpair += finc; delf[0] += (delr_ss_norm[0]*cosphi2 - ay[0]) * finc; delf[1] += (delr_ss_norm[1]*cosphi2 - ay[1]) * finc; diff --git a/src/CG-DNA/pair_oxrna2_xstk.cpp b/src/CG-DNA/pair_oxrna2_xstk.cpp index ee14103dca..09f8e68943 100644 --- a/src/CG-DNA/pair_oxrna2_xstk.cpp +++ b/src/CG-DNA/pair_oxrna2_xstk.cpp @@ -18,7 +18,6 @@ #include "pair_oxrna2_xstk.h" #include "atom.h" -#include "atom_vec_ellipsoid.h" #include "comm.h" #include "error.h" #include "force.h" @@ -107,7 +106,7 @@ void PairOxrna2Xstk::compute(int eflag, int vflag) { double delf[3],delta[3],deltb[3]; // force, torque increment; - double evdwl,fpair,finc,tpair,factor_lj; + double evdwl,finc,tpair,factor_lj; double delr_hb[3],delr_hb_norm[3],rsq_hb,r_hb,rinv_hb; double theta1,t1dir[3],cost1; double theta2,t2dir[3],cost2; @@ -134,10 +133,6 @@ void PairOxrna2Xstk::compute(int eflag, int vflag) int *alist,*blist,*numneigh,**firstneigh; double *special_lj = force->special_lj; - AtomVecEllipsoid *avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); - AtomVecEllipsoid::Bonus *bonus = avec->bonus; - int *ellipsoid = atom->ellipsoid; - int a,b,ia,ib,anum,bnum,atype,btype; double f2,f4t1,f4t2,f4t3,f4t7,f4t8; @@ -310,8 +305,6 @@ void PairOxrna2Xstk::compute(int eflag, int vflag) // force, torque and virial contribution for forces between h-bonding sites - fpair = 0.0; - delf[0] = 0.0; delf[1] = 0.0; delf[2] = 0.0; @@ -326,7 +319,6 @@ void PairOxrna2Xstk::compute(int eflag, int vflag) // radial force finc = -df2 * f4t1 * f4t2 * f4t3 * f4t7 * f4t8 * rinv_hb *factor_lj; - fpair += finc; delf[0] += delr_hb[0] * finc; delf[1] += delr_hb[1] * finc; @@ -336,7 +328,6 @@ void PairOxrna2Xstk::compute(int eflag, int vflag) if (theta2) { finc = -f2 * f4t1 * df4t2 * f4t3 * f4t7 * f4t8 * rinv_hb * factor_lj; - fpair += finc; delf[0] += (delr_hb_norm[0]*cost2 + ax[0]) * finc; delf[1] += (delr_hb_norm[1]*cost2 + ax[1]) * finc; @@ -348,7 +339,6 @@ void PairOxrna2Xstk::compute(int eflag, int vflag) if (theta3) { finc = -f2 * f4t1 * f4t2 * df4t3 * f4t7 * f4t8 * rinv_hb * factor_lj; - fpair += finc; delf[0] += (delr_hb_norm[0]*cost3 - bx[0]) * finc; delf[1] += (delr_hb_norm[1]*cost3 - bx[1]) * finc; @@ -360,7 +350,6 @@ void PairOxrna2Xstk::compute(int eflag, int vflag) if (theta7) { finc = -f2 * f4t1 * f4t2 * f4t3 * df4t7 * f4t8 * rinv_hb * factor_lj; - fpair += finc; delf[0] += (delr_hb_norm[0]*cost7 + az[0]) * finc; delf[1] += (delr_hb_norm[1]*cost7 + az[1]) * finc; @@ -372,7 +361,6 @@ void PairOxrna2Xstk::compute(int eflag, int vflag) if (theta8) { finc = -f2 * f4t1 * f4t2 * f4t3 * f4t7 * df4t8 * rinv_hb * factor_lj; - fpair += finc; delf[0] += (delr_hb_norm[0]*cost8 - bz[0]) * finc; delf[1] += (delr_hb_norm[1]*cost8 - bz[1]) * finc; diff --git a/src/DPD-REACT/fix_rx.cpp b/src/DPD-REACT/fix_rx.cpp index 165a3a6dbf..f55cb4d943 100644 --- a/src/DPD-REACT/fix_rx.cpp +++ b/src/DPD-REACT/fix_rx.cpp @@ -689,20 +689,14 @@ void FixRX::pre_force(int /*vflag*/) // Zero the counters for the ODE solvers. int nSteps = 0; - int nIters = 0; int nFuncs = 0; int nFails = 0; - if (odeIntegrationFlag == ODE_LAMMPS_RKF45 && diagnosticFrequency == 1) - { + if (odeIntegrationFlag == ODE_LAMMPS_RKF45 && diagnosticFrequency == 1) { memory->create( diagnosticCounterPerODE[StepSum], nlocal, "FixRX::diagnosticCounterPerODE"); memory->create( diagnosticCounterPerODE[FuncSum], nlocal, "FixRX::diagnosticCounterPerODE"); } -#if 0 - #pragma omp parallel \ - reduction(+: nSteps, nIters, nFuncs, nFails ) -#endif { double *rwork = new double[8*nspecies]; @@ -712,11 +706,8 @@ void FixRX::pre_force(int /*vflag*/) int ode_counter[4] = { 0 }; - //#pragma omp for schedule(runtime) - for (int i = 0; i < nlocal; i++) - { - if (mask[i] & groupbit) - { + for (int i = 0; i < nlocal; i++) { + if (mask[i] & groupbit) { double theta; if (localTempFlag) theta = dpdThetaLocal[i]; @@ -735,7 +726,6 @@ void FixRX::pre_force(int /*vflag*/) } nSteps += ode_counter[0]; - nIters += ode_counter[1]; nFuncs += ode_counter[2]; nFails += ode_counter[3]; diff --git a/src/EXTRA-PAIR/pair_harmonic_cut.cpp b/src/EXTRA-PAIR/pair_harmonic_cut.cpp index f2e1c422fe..89c3e0bf6b 100644 --- a/src/EXTRA-PAIR/pair_harmonic_cut.cpp +++ b/src/EXTRA-PAIR/pair_harmonic_cut.cpp @@ -146,7 +146,7 @@ void PairHarmonicCut::allocate() global settings ------------------------------------------------------------------------- */ -void PairHarmonicCut::settings(int narg, char **arg) +void PairHarmonicCut::settings(int narg, char ** /*arg*/) { if (narg > 0) error->all(FLERR, "Illegal pair_style command"); } diff --git a/src/GRANULAR/pair_gran_hertz_history.cpp b/src/GRANULAR/pair_gran_hertz_history.cpp index 2fa0f5acb8..19cf09cd02 100644 --- a/src/GRANULAR/pair_gran_hertz_history.cpp +++ b/src/GRANULAR/pair_gran_hertz_history.cpp @@ -204,11 +204,12 @@ void PairGranHertzHistory::compute(int eflag, int vflag) shrmag = sqrt(shear[0]*shear[0] + shear[1]*shear[1] + shear[2]*shear[2]); - // rotate shear displacements - - rsht = shear[0]*delx + shear[1]*dely + shear[2]*delz; - rsht *= rsqinv; if (shearupdate) { + + // rotate shear displacements + + rsht = shear[0]*delx + shear[1]*dely + shear[2]*delz; + rsht *= rsqinv; shear[0] -= rsht*delx; shear[1] -= rsht*dely; shear[2] -= rsht*delz; @@ -320,7 +321,7 @@ double PairGranHertzHistory::single(int i, int j, int /*itype*/, int /*jtype*/, double r,rinv,rsqinv,delx,dely,delz; double vr1,vr2,vr3,vnnr,vn1,vn2,vn3,vt1,vt2,vt3,wr1,wr2,wr3; double mi,mj,meff,damp,ccel,polyhertz; - double vtr1,vtr2,vtr3,vrel,shrmag,rsht; + double vtr1,vtr2,vtr3,vrel,shrmag; double fs1,fs2,fs3,fs,fn; double *radius = atom->radius; @@ -426,11 +427,6 @@ double PairGranHertzHistory::single(int i, int j, int /*itype*/, int /*jtype*/, shrmag = sqrt(shear[0]*shear[0] + shear[1]*shear[1] + shear[2]*shear[2]); - // rotate shear displacements - - rsht = shear[0]*delx + shear[1]*dely + shear[2]*delz; - rsht *= rsqinv; - // tangential forces = shear + tangential velocity damping fs1 = -polyhertz * (kt*shear[0] + meff*gammat*vtr1); diff --git a/src/GRANULAR/pair_gran_hooke_history.cpp b/src/GRANULAR/pair_gran_hooke_history.cpp index c9cdba1e35..74bfb4bcee 100644 --- a/src/GRANULAR/pair_gran_hooke_history.cpp +++ b/src/GRANULAR/pair_gran_hooke_history.cpp @@ -264,11 +264,12 @@ void PairGranHookeHistory::compute(int eflag, int vflag) } shrmag = sqrt(shear[0] * shear[0] + shear[1] * shear[1] + shear[2] * shear[2]); - // rotate shear displacements - - rsht = shear[0] * delx + shear[1] * dely + shear[2] * delz; - rsht *= rsqinv; if (shearupdate) { + + // rotate shear displacements + + rsht = shear[0] * delx + shear[1] * dely + shear[2] * delz; + rsht *= rsqinv; shear[0] -= rsht * delx; shear[1] -= rsht * dely; shear[2] -= rsht * delz; @@ -616,7 +617,7 @@ double PairGranHookeHistory::single(int i, int j, int /*itype*/, int /*jtype*/, double r, rinv, rsqinv, delx, dely, delz; double vr1, vr2, vr3, vnnr, vn1, vn2, vn3, vt1, vt2, vt3, wr1, wr2, wr3; double mi, mj, meff, damp, ccel; - double vtr1, vtr2, vtr3, vrel, shrmag, rsht; + double vtr1, vtr2, vtr3, vrel, shrmag; double fs1, fs2, fs3, fs, fn; double *radius = atom->radius; @@ -718,11 +719,6 @@ double PairGranHookeHistory::single(int i, int j, int /*itype*/, int /*jtype*/, double *shear = &allshear[3 * neighprev]; shrmag = sqrt(shear[0] * shear[0] + shear[1] * shear[1] + shear[2] * shear[2]); - // rotate shear displacements - - rsht = shear[0] * delx + shear[1] * dely + shear[2] * delz; - rsht *= rsqinv; - // tangential forces = shear + tangential velocity damping fs1 = -(kt * shear[0] + meff * gammat * vtr1); diff --git a/src/OPENMP/pair_reaxff_omp.cpp b/src/OPENMP/pair_reaxff_omp.cpp index 454f56c55f..4fd862a0c8 100644 --- a/src/OPENMP/pair_reaxff_omp.cpp +++ b/src/OPENMP/pair_reaxff_omp.cpp @@ -226,7 +226,6 @@ void PairReaxFFOMP::setup() void PairReaxFFOMP::compute(int eflag, int vflag) { - double evdwl,ecoul; // communicate num_bonds once every reneighboring // 2 num arrays stored by fix, grab ptr to them @@ -235,7 +234,6 @@ void PairReaxFFOMP::compute(int eflag, int vflag) int *num_bonds = fix_reaxff->num_bonds; int *num_hbonds = fix_reaxff->num_hbonds; - evdwl = ecoul = 0.0; ev_init(eflag,vflag); api->system->n = atom->nlocal; // my atoms @@ -304,20 +302,6 @@ void PairReaxFFOMP::compute(int eflag, int vflag) // energies and pressure if (eflag_global) { - evdwl += api->data->my_en.e_bond; - evdwl += api->data->my_en.e_ov; - evdwl += api->data->my_en.e_un; - evdwl += api->data->my_en.e_lp; - evdwl += api->data->my_en.e_ang; - evdwl += api->data->my_en.e_pen; - evdwl += api->data->my_en.e_coa; - evdwl += api->data->my_en.e_hb; - evdwl += api->data->my_en.e_tor; - evdwl += api->data->my_en.e_con; - evdwl += api->data->my_en.e_vdW; - - ecoul += api->data->my_en.e_ele; - ecoul += api->data->my_en.e_pol; // Store the different parts of the energy // in a list for output by compute pair command diff --git a/src/REAXFF/pair_reaxff.cpp b/src/REAXFF/pair_reaxff.cpp index 9a3bdf2f79..cad24ddef4 100644 --- a/src/REAXFF/pair_reaxff.cpp +++ b/src/REAXFF/pair_reaxff.cpp @@ -455,8 +455,6 @@ double PairReaxFF::init_one(int i, int j) void PairReaxFF::compute(int eflag, int vflag) { - double evdwl,ecoul; - // communicate num_bonds once every reneighboring // 2 num arrays stored by fix, grab ptr to them @@ -464,7 +462,6 @@ void PairReaxFF::compute(int eflag, int vflag) int *num_bonds = fix_reaxff->num_bonds; int *num_hbonds = fix_reaxff->num_hbonds; - evdwl = ecoul = 0.0; ev_init(eflag,vflag); api->system->n = atom->nlocal; // my atoms @@ -496,20 +493,6 @@ void PairReaxFF::compute(int eflag, int vflag) // energies and pressure if (eflag_global) { - evdwl += api->data->my_en.e_bond; - evdwl += api->data->my_en.e_ov; - evdwl += api->data->my_en.e_un; - evdwl += api->data->my_en.e_lp; - evdwl += api->data->my_en.e_ang; - evdwl += api->data->my_en.e_pen; - evdwl += api->data->my_en.e_coa; - evdwl += api->data->my_en.e_hb; - evdwl += api->data->my_en.e_tor; - evdwl += api->data->my_en.e_con; - evdwl += api->data->my_en.e_vdW; - - ecoul += api->data->my_en.e_ele; - ecoul += api->data->my_en.e_pol; // Store the different parts of the energy // in a list for output by compute pair command diff --git a/src/RIGID/fix_rigid_small.cpp b/src/RIGID/fix_rigid_small.cpp index a8b4a5f519..e09d4eb569 100644 --- a/src/RIGID/fix_rigid_small.cpp +++ b/src/RIGID/fix_rigid_small.cpp @@ -1351,8 +1351,8 @@ void FixRigidSmall::set_xv() vr[4] = 0.5*x0*fc2; vr[5] = 0.5*x1*fc2; - double rlist[][3] = {{x0, x1, x2}}; - double flist[][3] = {{0.5*fc0, 0.5*fc1, 0.5*fc2}}; + double rlist[1][3] = {{x0, x1, x2}}; + double flist[1][3] = {{0.5*fc0, 0.5*fc1, 0.5*fc2}}; v_tally(1,&i,1.0,vr,rlist,flist,b->xgc); } } @@ -1513,8 +1513,8 @@ void FixRigidSmall::set_v() vr[4] = 0.5*x0*fc2; vr[5] = 0.5*x1*fc2; - double rlist[][3] = {{x0, x1, x2}}; - double flist[][3] = {{0.5*fc0, 0.5*fc1, 0.5*fc2}}; + double rlist[1][3] = {{x0, x1, x2}}; + double flist[1][3] = {{0.5*fc0, 0.5*fc1, 0.5*fc2}}; v_tally(1,&i,1.0,vr,rlist,flist,b->xgc); } }