From 18fa9f45a5d544b324edebef1dcffa6fa91308e9 Mon Sep 17 00:00:00 2001
From: sjplimp <sjplimp@f3b2605a-c512-4ea7-a41b-209d697bcdaa>
Date: Wed, 22 Oct 2008 15:51:31 +0000
Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@2188
 f3b2605a-c512-4ea7-a41b-209d697bcdaa

---
 src/neigh_full.cpp       | 10 +++++-----
 src/neigh_gran.cpp       | 18 +++++++++---------
 src/neigh_half_bin.cpp   |  6 +++---
 src/neigh_half_multi.cpp |  6 +++---
 src/neigh_half_nsq.cpp   | 12 ++++++------
 src/neigh_respa.cpp      | 18 +++++++++---------
 src/neighbor.cpp         | 14 +++++++-------
 src/neighbor.h           |  3 +--
 8 files changed, 43 insertions(+), 44 deletions(-)

diff --git a/src/neigh_full.cpp b/src/neigh_full.cpp
index 913760ee01..cdbae1d250 100644
--- a/src/neigh_full.cpp
+++ b/src/neigh_full.cpp
@@ -37,9 +37,9 @@ void Neighbor::full_nsq(NeighList *list)
   int nlocal = atom->nlocal;
   int nall = nlocal + atom->nghost;
   int molecular = atom->molecular;
-  if (include_group) {
+  if (includegroup) {
     nlocal = atom->nfirst;
-    bitmask = group->bitmask[include_group];
+    bitmask = group->bitmask[includegroup];
   }
 
   int *ilist = list->ilist;
@@ -71,7 +71,7 @@ void Neighbor::full_nsq(NeighList *list)
     // skip i = j
 
     for (j = 0; j < nall; j++) {
-      if (include_group && !(mask[j] & bitmask)) continue;
+      if (includegroup && !(mask[j] & bitmask)) continue;
       if (i == j) continue;
       jtype = type[j];
       if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
@@ -123,7 +123,7 @@ void Neighbor::full_bin(NeighList *list)
   int nlocal = atom->nlocal;
   int nall = nlocal + atom->nghost;
   int molecular = atom->molecular;
-  if (include_group) nlocal = atom->nfirst;
+  if (includegroup) nlocal = atom->nfirst;
 
   int *ilist = list->ilist;
   int *numneigh = list->numneigh;
@@ -215,7 +215,7 @@ void Neighbor::full_multi(NeighList *list)
   int nlocal = atom->nlocal;
   int nall = nlocal + atom->nghost;
   int molecular = atom->molecular;
-  if (include_group) nlocal = atom->nfirst;
+  if (includegroup) nlocal = atom->nfirst;
 
   int *ilist = list->ilist;
   int *numneigh = list->numneigh;
diff --git a/src/neigh_gran.cpp b/src/neigh_gran.cpp
index 2fe5fd5f70..9607b9d081 100644
--- a/src/neigh_gran.cpp
+++ b/src/neigh_gran.cpp
@@ -52,9 +52,9 @@ void Neighbor::granular_nsq_no_newton(NeighList *list)
   int *molecule = atom->molecule;
   int nlocal = atom->nlocal;
   int nall = nlocal + atom->nghost;
-  if (include_group) {
+  if (includegroup) {
     nlocal = atom->nfirst;
-    bitmask = group->bitmask[include_group];
+    bitmask = group->bitmask[includegroup];
   }
 
   int *ilist = list->ilist;
@@ -108,7 +108,7 @@ void Neighbor::granular_nsq_no_newton(NeighList *list)
     // loop over remaining atoms, owned and ghost
 
     for (j = i+1; j < nall; j++) {
-      if (include_group && !(mask[j] & bitmask)) continue;
+      if (includegroup && !(mask[j] & bitmask)) continue;
       if (exclude && exclusion(i,j,type[i],type[j],mask,molecule)) continue;
 
       delx = xtmp - x[j][0];
@@ -187,9 +187,9 @@ void Neighbor::granular_nsq_newton(NeighList *list)
   int *molecule = atom->molecule;
   int nlocal = atom->nlocal;
   int nall = nlocal + atom->nghost;
-  if (include_group) {
+  if (includegroup) {
     nlocal = atom->nfirst;
-    bitmask = group->bitmask[include_group];
+    bitmask = group->bitmask[includegroup];
   }
 
   int *ilist = list->ilist;
@@ -221,7 +221,7 @@ void Neighbor::granular_nsq_newton(NeighList *list)
     // loop over remaining atoms, owned and ghost
 
     for (j = i+1; j < nall; j++) {
-      if (include_group && !(mask[j] & bitmask)) continue;
+      if (includegroup && !(mask[j] & bitmask)) continue;
 
       if (j >= nlocal) {
 	jtag = tag[j];
@@ -298,7 +298,7 @@ void Neighbor::granular_bin_no_newton(NeighList *list)
   int *mask = atom->mask;
   int *molecule = atom->molecule;
   int nlocal = atom->nlocal;
-  if (include_group) nlocal = atom->nfirst;
+  if (includegroup) nlocal = atom->nfirst;
 
   int *ilist = list->ilist;
   int *numneigh = list->numneigh;
@@ -441,7 +441,7 @@ void Neighbor::granular_bin_newton(NeighList *list)
   int *mask = atom->mask;
   int *molecule = atom->molecule;
   int nlocal = atom->nlocal;
-  if (include_group) nlocal = atom->nfirst;
+  if (includegroup) nlocal = atom->nfirst;
 
   int *ilist = list->ilist;
   int *numneigh = list->numneigh;
@@ -548,7 +548,7 @@ void Neighbor::granular_bin_newton_tri(NeighList *list)
   int *mask = atom->mask;
   int *molecule = atom->molecule;
   int nlocal = atom->nlocal;
-  if (include_group) nlocal = atom->nfirst;
+  if (includegroup) nlocal = atom->nfirst;
 
   int *ilist = list->ilist;
   int *numneigh = list->numneigh;
diff --git a/src/neigh_half_bin.cpp b/src/neigh_half_bin.cpp
index 628b37c369..1de7c6a471 100644
--- a/src/neigh_half_bin.cpp
+++ b/src/neigh_half_bin.cpp
@@ -43,7 +43,7 @@ void Neighbor::half_bin_no_newton(NeighList *list)
   int *molecule = atom->molecule;
   int nlocal = atom->nlocal;
   int nall = nlocal + atom->nghost;
-  if (include_group) nlocal = atom->nfirst;
+  if (includegroup) nlocal = atom->nfirst;
   int molecular = atom->molecular;
 
   int *ilist = list->ilist;
@@ -137,7 +137,7 @@ void Neighbor::half_bin_newton(NeighList *list)
   int nlocal = atom->nlocal;
   int nall = nlocal + atom->nghost;
   int molecular = atom->molecular;
-  if (include_group) nlocal = atom->nfirst;
+  if (includegroup) nlocal = atom->nfirst;
 
   int *ilist = list->ilist;
   int *numneigh = list->numneigh;
@@ -251,7 +251,7 @@ void Neighbor::half_bin_newton_tri(NeighList *list)
   int nlocal = atom->nlocal;
   int nall = nlocal + atom->nghost;
   int molecular = atom->molecular;
-  if (include_group) nlocal = atom->nfirst;
+  if (includegroup) nlocal = atom->nfirst;
 
   int *ilist = list->ilist;
   int *numneigh = list->numneigh;
diff --git a/src/neigh_half_multi.cpp b/src/neigh_half_multi.cpp
index d955b2e1fd..8b5b98bb5a 100644
--- a/src/neigh_half_multi.cpp
+++ b/src/neigh_half_multi.cpp
@@ -46,7 +46,7 @@ void Neighbor::half_multi_no_newton(NeighList *list)
   int nlocal = atom->nlocal;
   int nall = nlocal + atom->nghost;
   int molecular = atom->molecular;
-  if (include_group) nlocal = atom->nfirst;
+  if (includegroup) nlocal = atom->nfirst;
 
   int *ilist = list->ilist;
   int *numneigh = list->numneigh;
@@ -147,7 +147,7 @@ void Neighbor::half_multi_newton(NeighList *list)
   int nlocal = atom->nlocal;
   int nall = nlocal + atom->nghost;
   int molecular = atom->molecular;
-  if (include_group) nlocal = atom->nfirst;
+  if (includegroup) nlocal = atom->nfirst;
 
   int *ilist = list->ilist;
   int *numneigh = list->numneigh;
@@ -271,7 +271,7 @@ void Neighbor::half_multi_newton_tri(NeighList *list)
   int nlocal = atom->nlocal;
   int nall = nlocal + atom->nghost;
   int molecular = atom->molecular;
-  if (include_group) nlocal = atom->nfirst;
+  if (includegroup) nlocal = atom->nfirst;
 
   int *ilist = list->ilist;
   int *numneigh = list->numneigh;
diff --git a/src/neigh_half_nsq.cpp b/src/neigh_half_nsq.cpp
index bffc77dfcf..9ca02e16cc 100644
--- a/src/neigh_half_nsq.cpp
+++ b/src/neigh_half_nsq.cpp
@@ -38,9 +38,9 @@ void Neighbor::half_nsq_no_newton(NeighList *list)
   int nlocal = atom->nlocal;
   int nall = nlocal + atom->nghost;
   int molecular = atom->molecular;
-  if (include_group) {
+  if (includegroup) {
     nlocal = atom->nfirst;
-    bitmask = group->bitmask[include_group];
+    bitmask = group->bitmask[includegroup];
   }
 
   int *ilist = list->ilist;
@@ -71,7 +71,7 @@ void Neighbor::half_nsq_no_newton(NeighList *list)
     // loop over remaining atoms, owned and ghost
 
     for (j = i+1; j < nall; j++) {
-      if (include_group && !(mask[j] & bitmask)) continue;
+      if (includegroup && !(mask[j] & bitmask)) continue;
       jtype = type[j];
       if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
 
@@ -119,9 +119,9 @@ void Neighbor::half_nsq_newton(NeighList *list)
   int nlocal = atom->nlocal;
   int nall = nlocal + atom->nghost;
   int molecular = atom->molecular;
-  if (include_group) {
+  if (includegroup) {
     nlocal = atom->nfirst;
-    bitmask = group->bitmask[include_group];
+    bitmask = group->bitmask[includegroup];
   }
 
   int *ilist = list->ilist;
@@ -154,7 +154,7 @@ void Neighbor::half_nsq_newton(NeighList *list)
     // itag = jtag is possible for long cutoffs that include images of self
 
     for (j = i+1; j < nall; j++) {
-      if (include_group && !(mask[j] & bitmask)) continue;
+      if (includegroup && !(mask[j] & bitmask)) continue;
 
       if (j >= nlocal) {
 	jtag = tag[j];
diff --git a/src/neigh_respa.cpp b/src/neigh_respa.cpp
index 50221dcf47..d82bed447a 100644
--- a/src/neigh_respa.cpp
+++ b/src/neigh_respa.cpp
@@ -39,9 +39,9 @@ void Neighbor::respa_nsq_no_newton(NeighList *list)
   int nlocal = atom->nlocal;
   int nall = nlocal + atom->nghost;
   int molecular = atom->molecular;
-  if (include_group) {
+  if (includegroup) {
     nlocal = atom->nfirst;
-    bitmask = group->bitmask[include_group];
+    bitmask = group->bitmask[includegroup];
   }
 
   int *ilist = list->ilist;
@@ -110,7 +110,7 @@ void Neighbor::respa_nsq_no_newton(NeighList *list)
     // loop over remaining atoms, owned and ghost
 
     for (j = i+1; j < nall; j++) {
-      if (include_group && !(mask[j] & bitmask)) continue;
+      if (includegroup && !(mask[j] & bitmask)) continue;
       jtype = type[j];
       if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
 
@@ -184,9 +184,9 @@ void Neighbor::respa_nsq_newton(NeighList *list)
   int nlocal = atom->nlocal;
   int nall = nlocal + atom->nghost;
   int molecular = atom->molecular;
-  if (include_group) {
+  if (includegroup) {
     nlocal = atom->nfirst;
-    bitmask = group->bitmask[include_group];
+    bitmask = group->bitmask[includegroup];
   }
 
   int *ilist = list->ilist;
@@ -256,7 +256,7 @@ void Neighbor::respa_nsq_newton(NeighList *list)
     // loop over remaining atoms, owned and ghost
 
     for (j = i+1; j < nall; j++) {
-      if (include_group && !(mask[j] & bitmask)) continue;
+      if (includegroup && !(mask[j] & bitmask)) continue;
 
       if (j >= nlocal) {
 	jtag = tag[j];
@@ -351,7 +351,7 @@ void Neighbor::respa_bin_no_newton(NeighList *list)
   int nlocal = atom->nlocal;
   int nall = nlocal + atom->nghost;
   int molecular = atom->molecular;
-  if (include_group) nlocal = atom->nfirst;
+  if (includegroup) nlocal = atom->nfirst;
 
   int *ilist = list->ilist;
   int *numneigh = list->numneigh;
@@ -507,7 +507,7 @@ void Neighbor::respa_bin_newton(NeighList *list)
   int nlocal = atom->nlocal;
   int nall = nlocal + atom->nghost;
   int molecular = atom->molecular;
-  if (include_group) nlocal = atom->nfirst;
+  if (includegroup) nlocal = atom->nfirst;
 
   int *ilist = list->ilist;
   int *numneigh = list->numneigh;
@@ -696,7 +696,7 @@ void Neighbor::respa_bin_newton_tri(NeighList *list)
   int nlocal = atom->nlocal;
   int nall = nlocal + atom->nghost;
   int molecular = atom->molecular;
-  if (include_group) nlocal = atom->nfirst;
+  if (includegroup) nlocal = atom->nfirst;
 
   int *ilist = list->ilist;
   int *numneigh = list->numneigh;
diff --git a/src/neighbor.cpp b/src/neighbor.cpp
index 4b75e1ea10..576c266099 100644
--- a/src/neighbor.cpp
+++ b/src/neighbor.cpp
@@ -90,7 +90,7 @@ Neighbor::Neighbor(LAMMPS *lmp) : Pointers(lmp)
 
   // pair exclusion list info
 
-  include_group = 0;
+  includegroup = 0;
 
   nex_type = maxex_type = 0;
   ex1_type = ex2_type = NULL;
@@ -918,7 +918,7 @@ int Neighbor::check_distance()
 
   double **x = atom->x;
   int nlocal = atom->nlocal;
-  if (include_group) nlocal = atom->nfirst;
+  if (includegroup) nlocal = atom->nfirst;
 
   int flag = 0;
   for (int i = 0; i < nlocal; i++) {
@@ -1289,10 +1289,10 @@ void Neighbor::modify_params(int narg, char **arg)
       iarg += 2;
     } else if (strcmp(arg[iarg],"include") == 0) {
       if (iarg+2 > narg) error->all("Illegal neigh_modify command");
-      include_group = group->find(arg[iarg+1]);
-      if (include_group < 0)
+      includegroup = group->find(arg[iarg+1]);
+      if (includegroup < 0)
 	error->all("Invalid group ID in neigh_modify command");
-      if (include_group && (atom->firstgroupname == NULL ||
+      if (includegroup && (atom->firstgroupname == NULL ||
 			    strcmp(arg[iarg+1],atom->firstgroupname) != 0))
 	error->all("Neigh_modify include group != atom_modify first group");
       iarg += 2;
@@ -1414,8 +1414,8 @@ void Neighbor::bin_atoms()
   int nlocal = atom->nlocal;
   int nall = nlocal + atom->nghost;
 
-  if (include_group) {
-    int bitmask = group->bitmask[include_group];
+  if (includegroup) {
+    int bitmask = group->bitmask[includegroup];
     for (i = nall-1; i >= nlocal; i--) {
       if (mask[i] & bitmask) {
 	ibin = coord2bin(x[i]);
diff --git a/src/neighbor.h b/src/neighbor.h
index a30f174959..e20cec041f 100644
--- a/src/neighbor.h
+++ b/src/neighbor.h
@@ -27,6 +27,7 @@ class Neighbor : protected Pointers {
   int ago;                         // how many steps ago neighboring occurred
   int pgsize;                      // size of neighbor page
   int oneatom;                     // max # of neighbors for one atom
+  int includegroup;                // only build pairwise lists for this group
 
   double skin;                     // skin distance
   double cutneighmin;              // min neighbor cutoff for all type pairs
@@ -122,8 +123,6 @@ class Neighbor : protected Pointers {
 
   int special_flag[4];             // flags for 1-2, 1-3, 1-4 neighbors
 
-  int include_group;               // only build pairwise lists for this group
-
   int exclude;                     // 0 if no type/group exclusions, 1 if yes
 
   int nex_type;                    // # of entries in type exclusion list
-- 
GitLab