diff --git a/src/neigh_full.cpp b/src/neigh_full.cpp index 913760ee014a8940ea2d942b3a929baae7501b4e..cdbae1d250b6ba5ab4f7326dbd2c10cb568fe5db 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 2fe5fd5f70cd3dd749bcfa99396e5e88849c7adf..9607b9d08124b9f966c4331c178dc272be6b52e4 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 628b37c369e14392c86f64ca7e0ebf1d72498e21..1de7c6a4710a7d0d4508261772156882941b20ab 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 d955b2e1fd758307a558567bb5e9259be43543b5..8b5b98bb5a2a5e38c83fa3cb5cff20bd4a8dd1d6 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 bffc77dfcff809059492ade9ad35eac99bc396e5..9ca02e16cc81d98ffa8d409fa5f847552f799539 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 50221dcf47750c4d1b4a649d9890fc36ab6963d9..d82bed447aa5c12ba06b4bccee39102f16e4d8e2 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 4b75e1ea10808952058d41adf5a1f28ad17c2022..576c26609991d1464a128b3c810557522eb70f90 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 a30f174959356e556091dcfcdb7222a3b68a769c..e20cec041fd080c5c97a9f1167757843598cfecc 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