From 1cdaba9662f5629f90374bfdc47e776624bea1de Mon Sep 17 00:00:00 2001 From: sjplimp Date: Thu, 7 Mar 2013 22:06:44 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9619 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/KSPACE/ewald_disp.cpp | 4 +++- src/KSPACE/pair_lj_cut_tip4p_long.cpp | 2 +- src/KSPACE/pair_lj_long_coul_long.cpp | 8 ++++---- src/KSPACE/pair_lj_long_tip4p_long.cpp | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/KSPACE/ewald_disp.cpp b/src/KSPACE/ewald_disp.cpp index 8fbc2da6f7..77448e30a0 100644 --- a/src/KSPACE/ewald_disp.cpp +++ b/src/KSPACE/ewald_disp.cpp @@ -38,7 +38,6 @@ using namespace MathSpecial; #define SMALL 0.00001 - enum{GEOMETRIC,ARITHMETIC,SIXTHPOWER}; // same as in pair.h //#define DEBUG @@ -48,7 +47,10 @@ enum{GEOMETRIC,ARITHMETIC,SIXTHPOWER}; // same as in pair.h EwaldDisp::EwaldDisp(LAMMPS *lmp, int narg, char **arg) : KSpace(lmp, narg, arg) { if (narg!=1) error->all(FLERR,"Illegal kspace_style ewald/n command"); + + ewaldflag = dispersionflag = 1; accuracy_relative = fabs(atof(arg[0])); + memset(function, 0, EWALD_NORDER*sizeof(int)); kenergy = kvirial = NULL; cek_local = cek_global = NULL; diff --git a/src/KSPACE/pair_lj_cut_tip4p_long.cpp b/src/KSPACE/pair_lj_cut_tip4p_long.cpp index d5d85a6bc4..14164c812c 100644 --- a/src/KSPACE/pair_lj_cut_tip4p_long.cpp +++ b/src/KSPACE/pair_lj_cut_tip4p_long.cpp @@ -51,9 +51,9 @@ using namespace LAMMPS_NS; PairLJCutTIP4PLong::PairLJCutTIP4PLong(LAMMPS *lmp) : PairLJCutCoulLong(lmp) { + tip4pflag = 1; single_enable = 0; respa_enable = 0; - tip4pflag = 1; nmax = 0; hneigh = NULL; diff --git a/src/KSPACE/pair_lj_long_coul_long.cpp b/src/KSPACE/pair_lj_long_coul_long.cpp index 25782382fd..cdf1ff9838 100644 --- a/src/KSPACE/pair_lj_long_coul_long.cpp +++ b/src/KSPACE/pair_lj_long_coul_long.cpp @@ -87,14 +87,14 @@ void PairLJLongCoulLong::settings(int narg, char **arg) if (!comm->me && ewald_order & (1<<6)) error->warning(FLERR,"Mixing forced for lj coefficients"); if (!comm->me && ewald_order == ((1<<1) | (1<<6))) - error->warning(FLERR,"Using largest cut-off for lj/coul long long"); + error->warning(FLERR,"Using largest cutoff for lj/long/coul/long"); if (!*(++arg)) - error->all(FLERR,"Cut-offs missing in pair_style lj/coul"); + error->all(FLERR,"Cutoffs missing in pair_style lj/long/coul/long"); if (!((ewald_order^ewald_off) & (1<<1))) - error->all(FLERR,"Coulombic cut not supported in pair_style lj/coul"); + error->all(FLERR,"Coulomb cut not supported in pair_style lj/long/coul/long"); cut_lj_global = force->numeric(*(arg++)); if (narg == 4 && ((ewald_order & 0x42) == 0x42)) - error->all(FLERR,"Only one cut-off allowed when requesting all long"); + error->all(FLERR,"Only one cutoff allowed when requesting all long"); if (narg == 4) cut_coul = force->numeric(*arg); else cut_coul = cut_lj_global; diff --git a/src/KSPACE/pair_lj_long_tip4p_long.cpp b/src/KSPACE/pair_lj_long_tip4p_long.cpp index 23d415cefc..f308853d46 100755 --- a/src/KSPACE/pair_lj_long_tip4p_long.cpp +++ b/src/KSPACE/pair_lj_long_tip4p_long.cpp @@ -51,7 +51,7 @@ using namespace LAMMPS_NS; PairLJLongTIP4PLong::PairLJLongTIP4PLong(LAMMPS *lmp) : PairLJLongCoulLong(lmp) { - tip4pflag = 1; + dispersionflag = tip4pflag = 1; single_enable = 0; respa_enable = 0;