From 42408bc41dbde0d7ba5bb9bc5f97bfe41386b083 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Tue, 23 Jul 2013 15:18:51 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10290 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/KSPACE/pair_coul_long.cpp | 4 ++-- src/KSPACE/pair_coul_long.h | 4 ++-- src/KSPACE/pair_lj_cut_tip4p_long.cpp | 8 ++++---- src/KSPACE/pair_lj_cut_tip4p_long.h | 8 ++++---- src/MOLECULE/pair_lj_cut_tip4p_cut.cpp | 8 ++++---- src/MOLECULE/pair_lj_cut_tip4p_cut.h | 8 ++++---- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/KSPACE/pair_coul_long.cpp b/src/KSPACE/pair_coul_long.cpp index c38977ef6a..a0f7d3ee24 100644 --- a/src/KSPACE/pair_coul_long.cpp +++ b/src/KSPACE/pair_coul_long.cpp @@ -48,6 +48,7 @@ PairCoulLong::PairCoulLong(LAMMPS *lmp) : Pair(lmp) { ewaldflag = pppmflag = 1; ftable = NULL; + qdist = 0.0; } /* ---------------------------------------------------------------------- */ @@ -258,8 +259,7 @@ void PairCoulLong::init_style() double PairCoulLong::init_one(int i, int j) { scale[j][i] = scale[i][j]; - - return cut_coul; + return cut_coul+2.0*qdist; } /* ---------------------------------------------------------------------- diff --git a/src/KSPACE/pair_coul_long.h b/src/KSPACE/pair_coul_long.h index 6fb4788032..0629dfedaa 100644 --- a/src/KSPACE/pair_coul_long.h +++ b/src/KSPACE/pair_coul_long.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov @@ -41,7 +41,7 @@ class PairCoulLong : public Pair { virtual void *extract(const char *, int &); protected: - double cut_coul,cut_coulsq; + double cut_coul,cut_coulsq,qdist; double *cut_respa; double g_ewald; double **scale; diff --git a/src/KSPACE/pair_lj_cut_tip4p_long.cpp b/src/KSPACE/pair_lj_cut_tip4p_long.cpp index 930e8c0723..9211a5bea8 100644 --- a/src/KSPACE/pair_lj_cut_tip4p_long.cpp +++ b/src/KSPACE/pair_lj_cut_tip4p_long.cpp @@ -449,13 +449,13 @@ void PairLJCutTIP4PLong::settings(int narg, char **arg) void PairLJCutTIP4PLong::init_style() { if (atom->tag_enable == 0) - error->all(FLERR,"Pair style lj/cut/coul/long/tip4p requires atom IDs"); + error->all(FLERR,"Pair style lj/cut/tip4p/long requires atom IDs"); if (!force->newton_pair) error->all(FLERR, - "Pair style lj/cut/coul/long/tip4p requires newton pair on"); + "Pair style lj/cut/tip4p/long requires newton pair on"); if (!atom->q_flag) error->all(FLERR, - "Pair style lj/cut/coul/long/tip4p requires atom attribute q"); + "Pair style lj/cut/tip4p/long requires atom attribute q"); if (force->bond == NULL) error->all(FLERR,"Must use a bond style with TIP4P potential"); if (force->angle == NULL) @@ -485,7 +485,7 @@ double PairLJCutTIP4PLong::init_one(int i, int j) if ((i == typeH && epsilon[i][i] != 0.0) || (j == typeH && epsilon[j][j] != 0.0)) error->all(FLERR,"Water H epsilon must be 0.0 for " - "pair style lj/cut/coul/long/tip4p"); + "pair style lj/cut/tip4p/long"); if (i == typeH || j == typeH) cut_ljsq[j][i] = cut_ljsq[i][j] = 0.0; diff --git a/src/KSPACE/pair_lj_cut_tip4p_long.h b/src/KSPACE/pair_lj_cut_tip4p_long.h index 12e20f568b..7167d0590a 100644 --- a/src/KSPACE/pair_lj_cut_tip4p_long.h +++ b/src/KSPACE/pair_lj_cut_tip4p_long.h @@ -73,17 +73,17 @@ Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. -E: Pair style lj/cut/coul/long/tip4p requires atom IDs +E: Pair style lj/cut/tip4p/long requires atom IDs There are no atom IDs defined in the system and the TIP4P potential requires them to find O,H atoms with a water molecule. -E: Pair style lj/cut/coul/long/tip4p requires newton pair on +E: Pair style lj/cut/tip4p/long requires newton pair on This is because the computation of constraint forces within a water molecule adds forces to atoms owned by other processors. -E: Pair style lj/cut/coul/long/tip4p requires atom attribute q +E: Pair style lj/cut/tip4p/long requires atom attribute q The atom style defined does not have these attributes. @@ -97,7 +97,7 @@ E: Must use an angle style with TIP4P potential TIP4P potentials assume angles in water are constrained by a fix shake command. -E: Water H epsilon must be 0.0 for pair style lj/cut/coul/long/tip4p +E: Water H epsilon must be 0.0 for pair style lj/cut/tip4p/long This is because LAMMPS does not compute the Lennard-Jones interactions with these particles for efficiency reasons. diff --git a/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp b/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp index 595680b0c6..b8c444e231 100644 --- a/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp +++ b/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp @@ -474,13 +474,13 @@ void PairLJCutTIP4PCut::coeff(int narg, char **arg) void PairLJCutTIP4PCut::init_style() { if (atom->tag_enable == 0) - error->all(FLERR,"Pair style lj/cut/coul/cut/tip4p requires atom IDs"); + error->all(FLERR,"Pair style lj/cut/tip4p/cut requires atom IDs"); if (!force->newton_pair) error->all(FLERR, - "Pair style lj/cut/coul/cut/tip4p requires newton pair on"); + "Pair style lj/cut/tip4p/cut requires newton pair on"); if (!atom->q_flag) error->all(FLERR, - "Pair style lj/cut/coul/cut/tip4p requires atom attribute q"); + "Pair style lj/cut/tip4p/cut requires atom attribute q"); if (force->bond == NULL) error->all(FLERR,"Must use a bond style with TIP4P potential"); if (force->angle == NULL) @@ -563,7 +563,7 @@ double PairLJCutTIP4PCut::init_one(int i, int j) if ((i == typeH && epsilon[i][i] != 0.0) || (j == typeH && epsilon[j][j] != 0.0)) error->all(FLERR,"Water H epsilon must be 0.0 for " - "pair style lj/cut/coul/long/tip4p"); + "pair style lj/cut/tip4p/cut"); if (i == typeH || j == typeH) cut_ljsq[j][i] = cut_ljsq[i][j] = 0.0; diff --git a/src/MOLECULE/pair_lj_cut_tip4p_cut.h b/src/MOLECULE/pair_lj_cut_tip4p_cut.h index df4b5a90c9..96edf38d4f 100644 --- a/src/MOLECULE/pair_lj_cut_tip4p_cut.h +++ b/src/MOLECULE/pair_lj_cut_tip4p_cut.h @@ -83,15 +83,15 @@ E: Incorrect args for pair coefficients UNDOCUMENTED -E: Pair style lj/cut/coul/cut/tip4p requires atom IDs +E: Pair style lj/cut/tip4p/cut requires atom IDs UNDOCUMENTED -E: Pair style lj/cut/coul/cut/tip4p requires newton pair on +E: Pair style lj/cut/tip4p/cut requires newton pair on UNDOCUMENTED -E: Pair style lj/cut/coul/cut/tip4p requires atom attribute q +E: Pair style lj/cut/tip4p/cut requires atom attribute q UNDOCUMENTED @@ -103,7 +103,7 @@ E: Must use an angle style with TIP4P potential UNDOCUMENTED -E: Water H epsilon must be 0.0 for pair style lj/cut/coul/long/tip4p +E: Water H epsilon must be 0.0 for pair style lj/cut/tip4p/cut UNDOCUMENTED