From 33a6f3c60edc4e862274deae9b5be8a4ee6519fb Mon Sep 17 00:00:00 2001 From: sjplimp Date: Wed, 19 Sep 2012 14:31:22 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8801 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/KSPACE/pair_lj_cut_coul_long_tip4p.cpp | 2 +- src/pair.cpp | 17 ++++++++++------- src/pair.h | 2 +- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/KSPACE/pair_lj_cut_coul_long_tip4p.cpp b/src/KSPACE/pair_lj_cut_coul_long_tip4p.cpp index 76ae162f65..9f7ee72de8 100644 --- a/src/KSPACE/pair_lj_cut_coul_long_tip4p.cpp +++ b/src/KSPACE/pair_lj_cut_coul_long_tip4p.cpp @@ -406,7 +406,7 @@ void PairLJCutCoulLongTIP4P::compute(int eflag, int vflag) if (factor_coul < 1.0) ecoul -= (1.0-factor_coul)*prefactor; } else ecoul = 0.0; - if (evflag) ev_tally_list(ecoul,vlist,v,alpha,key); + if (evflag) ev_tally_tip4p(key,vlist,v,ecoul,alpha); } } } diff --git a/src/pair.cpp b/src/pair.cpp index 90732b010a..3a81147f87 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -755,11 +755,9 @@ void Pair::ev_tally4(int i, int j, int k, int m, double evdwl, } /* ---------------------------------------------------------------------- - NOTE: this is older version of ev tally for TIP4P - NOTE: delete this when all pair TIP4P derivatives have been updated tally ecoul and virial into each of n atoms in list - called by TIP4P potential, newton_pair is always on - changes v values by dividing by n + used to be called by TIP4P potential, newton_pair is always on + per-atom case changes v values by dividing them by n ------------------------------------------------------------------------- */ void Pair::ev_tally_list(int n, int *list, double ecoul, double *v) @@ -805,12 +803,17 @@ void Pair::ev_tally_list(int n, int *list, double ecoul, double *v) } /* ---------------------------------------------------------------------- - tally ecoul and virial into each of atoms in list, list length set by key + tally ecoul and virial into each of atoms in list called by TIP4P potential, newton_pair is always on + weight assignments by alpha, so contribution is all to O atom as alpha -> 0.0 + key = 0 if neither atom = water O + key = 1 if first atom = water O + key = 2 if second atom = water O + key = 3 if both atoms = water O ------------------------------------------------------------------------- */ -void Pair::ev_tally_list(double ecoul, int *list, double *v, - double alpha, int key) +void Pair::ev_tally_tip4p(int key, int *list, double *v, + double ecoul, double alpha) { int i,j; diff --git a/src/pair.h b/src/pair.h index ac8db364d5..b48b94e0e5 100644 --- a/src/pair.h +++ b/src/pair.h @@ -173,7 +173,7 @@ class Pair : protected Pointers { void ev_tally4(int, int, int, int, double, double *, double *, double *, double *, double *, double *); void ev_tally_list(int, int *, double, double *); - void ev_tally_list(double, int *, double *, double, int); + void ev_tally_tip4p(int, int *, double *, double, double); void v_tally2(int, int, double, double *); void v_tally_tensor(int, int, int, int, double, double, double, double, double, double);