diff --git a/src/DIPOLE/pair_lj_long_dipole_long.cpp b/src/DIPOLE/pair_lj_long_dipole_long.cpp index b833b250d4..c9b2b3f4af 100644 --- a/src/DIPOLE/pair_lj_long_dipole_long.cpp +++ b/src/DIPOLE/pair_lj_long_dipole_long.cpp @@ -263,22 +263,6 @@ void PairLJLongDipoleLong::init_style() if (force->kspace) g_ewald = force->kspace->g_ewald; } -/* ---------------------------------------------------------------------- - neighbor callback to inform pair style of neighbor list to use - regular or rRESPA -------------------------------------------------------------------------- */ - -void PairLJLongDipoleLong::init_list(int id, NeighList *ptr) -{ - if (id == 0) list = ptr; - else if (id == 1) listinner = ptr; - else if (id == 2) listmiddle = ptr; - else if (id == 3) listouter = ptr; - - if (id) - error->all(FLERR,"Pair style lj/long/dipole/long does not currently support respa"); -} - /* ---------------------------------------------------------------------- init for one type pair i,j and corresponding j,i ------------------------------------------------------------------------- */ diff --git a/src/DIPOLE/pair_lj_long_dipole_long.h b/src/DIPOLE/pair_lj_long_dipole_long.h index f9fa10af11..2ace9ca301 100644 --- a/src/DIPOLE/pair_lj_long_dipole_long.h +++ b/src/DIPOLE/pair_lj_long_dipole_long.h @@ -34,7 +34,6 @@ class PairLJLongDipoleLong : public Pair { virtual void settings(int, char **); void coeff(int, char **); void init_style(); - void init_list(int, class NeighList *); double init_one(int, int); void write_restart(FILE *); void read_restart(FILE *); diff --git a/src/OPT/pair_lj_long_coul_long_opt.cpp b/src/OPT/pair_lj_long_coul_long_opt.cpp index 9004e5c93c..678d2d8bc4 100644 --- a/src/OPT/pair_lj_long_coul_long_opt.cpp +++ b/src/OPT/pair_lj_long_coul_long_opt.cpp @@ -726,7 +726,7 @@ void PairLJLongCoulLongOpt::eval_outer() double cut_in_off_sq = cut_in_off*cut_in_off; double cut_in_on_sq = cut_in_on*cut_in_on; - ineighn = (ineigh = listouter->ilist)+listouter->inum; + ineighn = (ineigh = list->ilist)+list->inum; for (; ineighfirstneigh[i])+listouter->numneigh[i]; + jneighn = (jneigh = list->firstneigh[i])+list->numneigh[i]; for (; jneighkspace->g_ewald; } -/* ---------------------------------------------------------------------- - neighbor callback to inform pair style of neighbor list to use - regular or rRESPA -------------------------------------------------------------------------- */ - -void PairLJCutCoulLongSoft::init_list(int id, NeighList *ptr) -{ - if (id == 0) list = ptr; - else if (id == 1) listinner = ptr; - else if (id == 2) listmiddle = ptr; - else if (id == 3) listouter = ptr; -} - /* ---------------------------------------------------------------------- init for one type pair i,j and corresponding j,i ------------------------------------------------------------------------- */ diff --git a/src/USER-OMP/pair_buck_long_coul_long_omp.cpp b/src/USER-OMP/pair_buck_long_coul_long_omp.cpp index 87f9e2e321..f996372409 100644 --- a/src/USER-OMP/pair_buck_long_coul_long_omp.cpp +++ b/src/USER-OMP/pair_buck_long_coul_long_omp.cpp @@ -319,7 +319,7 @@ void PairBuckLongCoulLongOMP::compute_inner() const int nall = atom->nlocal + atom->nghost; const int nthreads = comm->nthreads; - const int inum = listinner->inum; + const int inum = list->inum_inner; #if defined(_OPENMP) #pragma omp parallel default(none) #endif @@ -343,7 +343,7 @@ void PairBuckLongCoulLongOMP::compute_middle() const int nall = atom->nlocal + atom->nghost; const int nthreads = comm->nthreads; - const int inum = listmiddle->inum; + const int inum = list->inum_middle; #if defined(_OPENMP) #pragma omp parallel default(none) @@ -373,7 +373,7 @@ void PairBuckLongCoulLongOMP::compute_outer(int eflag, int vflag) const int nall = atom->nlocal + atom->nghost; const int nthreads = comm->nthreads; - const int inum = listouter->inum; + const int inum = list->inum; #if defined(_OPENMP) #pragma omp parallel default(none) shared(eflag,vflag) @@ -811,7 +811,7 @@ void PairBuckLongCoulLongOMP::eval_inner(int iifrom, int iito, ThrData * const t const double *x0 = x[0]; double *f0 = f[0], *fi = 0; - int *ilist = listinner->ilist; + int *ilist = list->ilist_inner; const int newton_pair = force->newton_pair; @@ -835,7 +835,7 @@ void PairBuckLongCoulLongOMP::eval_inner(int iifrom, int iito, ThrData * const t memcpy(xi, x0+(i+(i<<1)), sizeof(vector)); cut_bucksqi = cut_bucksq[typei = type[i]]; buck1i = buck1[typei]; buck2i = buck2[typei]; rhoinvi = rhoinv[typei]; - jneighn = (jneigh = listinner->firstneigh[i])+listinner->numneigh[i]; + jneighn = (jneigh = list->firstneigh_inner[i])+list->numneigh_inner[i]; for (; jneighilist; + int *ilist = list->ilist_middle; const int newton_pair = force->newton_pair; @@ -932,7 +932,7 @@ void PairBuckLongCoulLongOMP::eval_middle(int iifrom, int iito, ThrData * const memcpy(xi, x0+(i+(i<<1)), sizeof(vector)); cut_bucksqi = cut_bucksq[typei = type[i]]; buck1i = buck1[typei]; buck2i = buck2[typei]; rhoinvi = rhoinv[typei]; - jneighn = (jneigh = listmiddle->firstneigh[i])+listmiddle->numneigh[i]; + jneighn = (jneigh = list->firstneigh_middle[i])+list->numneigh_middle[i]; for (; jneighilist; + int *ilist = list->ilist; int i, j, ii; int *jneigh, *jneighn, typei, typej, ni, respa_flag; @@ -1035,7 +1035,7 @@ void PairBuckLongCoulLongOMP::eval_outer(int iiform, int iito, ThrData * const t buckai = buck_a[typei]; buckci = buck_c[typei]; rhoinvi = rhoinv[typei]; cutsqi = cutsq[typei]; cut_bucksqi = cut_bucksq[typei]; memcpy(xi, x0+(i+(i<<1)), sizeof(vector)); - jneighn = (jneigh = listouter->firstneigh[i])+listouter->numneigh[i]; + jneighn = (jneigh = list->firstneigh[i])+list->numneigh[i]; for (; jneighnlocal + atom->nghost; const int nthreads = comm->nthreads; - const int inum = listinner->inum; + const int inum = list->inum_inner; #if defined(_OPENMP) #pragma omp parallel default(none) #endif @@ -341,7 +341,7 @@ void PairLJLongCoulLongOMP::compute_middle() const int nall = atom->nlocal + atom->nghost; const int nthreads = comm->nthreads; - const int inum = listmiddle->inum; + const int inum = list->inum_middle; #if defined(_OPENMP) #pragma omp parallel default(none) @@ -371,7 +371,7 @@ void PairLJLongCoulLongOMP::compute_outer(int eflag, int vflag) const int nall = atom->nlocal + atom->nghost; const int nthreads = comm->nthreads; - const int inum = listouter->inum; + const int inum = list->inum; #if defined(_OPENMP) #pragma omp parallel default(none) shared(eflag,vflag) @@ -805,7 +805,7 @@ void PairLJLongCoulLongOMP::eval_inner(int iifrom, int iito, ThrData * const thr const double *x0 = x[0]; double *f0 = f[0], *fi = 0; - int *ilist = listinner->ilist; + int *ilist = list->ilist_inner; const int newton_pair = force->newton_pair; @@ -828,7 +828,7 @@ void PairLJLongCoulLongOMP::eval_inner(int iifrom, int iito, ThrData * const thr memcpy(xi, x0+(i+(i<<1)), sizeof(vector)); cut_ljsqi = cut_ljsq[typei = type[i]]; lj1i = lj1[typei]; lj2i = lj2[typei]; - jneighn = (jneigh = listinner->firstneigh[i])+listinner->numneigh[i]; + jneighn = (jneigh = list->firstneigh_inner[i])+list->numneigh_inner[i]; for (; jneighilist; + int *ilist = list->ilist_middle; const int newton_pair = force->newton_pair; @@ -925,7 +925,7 @@ void PairLJLongCoulLongOMP::eval_middle(int iifrom, int iito, ThrData * const th memcpy(xi, x0+(i+(i<<1)), sizeof(vector)); cut_ljsqi = cut_ljsq[typei = type[i]]; lj1i = lj1[typei]; lj2i = lj2[typei]; - jneighn = (jneigh = listmiddle->firstneigh[i])+listmiddle->numneigh[i]; + jneighn = (jneigh = list->firstneigh_middle[i])+list->numneigh_middle[i]; for (; jneighilist; + int *ilist = list->ilist; int i, j, ii; int *jneigh, *jneighn, typei, typej, ni, respa_flag; @@ -1027,7 +1027,7 @@ void PairLJLongCoulLongOMP::eval_outer(int iiform, int iito, ThrData * const thr lj1i = lj1[typei]; lj2i = lj2[typei]; lj3i = lj3[typei]; lj4i = lj4[typei]; cutsqi = cutsq[typei]; cut_ljsqi = cut_ljsq[typei]; memcpy(xi, x0+(i+(i<<1)), sizeof(vector)); - jneighn = (jneigh = listouter->firstneigh[i])+listouter->numneigh[i]; + jneighn = (jneigh = list->firstneigh[i])+list->numneigh[i]; for (; jneighnthreads; - const int inum = listinner->inum; + const int inum = list->inum_inner; #if defined(_OPENMP) #pragma omp parallel default(none) #endif @@ -403,7 +403,7 @@ void PairLJLongTIP4PLongOMP::compute_middle() const int nall = atom->nlocal + atom->nghost; const int nthreads = comm->nthreads; - const int inum = listmiddle->inum; + const int inum = list->inum_middle; #if defined(_OPENMP) #pragma omp parallel default(none) @@ -457,7 +457,7 @@ void PairLJLongTIP4PLongOMP::compute_outer(int eflag, int vflag) } const int nthreads = comm->nthreads; - const int inum = listouter->inum; + const int inum = list->inum; #if defined(_OPENMP) #pragma omp parallel default(none) shared(eflag,vflag) @@ -1126,9 +1126,9 @@ void PairLJLongTIP4PLongOMP::eval_inner(int iifrom, int iito, ThrData * const th double *lj1i, *lj2i; - ilist = listinner->ilist; - numneigh = listinner->numneigh; - firstneigh = listinner->firstneigh; + ilist = list->ilist_inner; + numneigh = list->numneigh_inner; + firstneigh = list->firstneigh_inner; // loop over neighbors of my atoms @@ -1388,9 +1388,9 @@ void PairLJLongTIP4PLongOMP::eval_middle(int iifrom, int iito, ThrData * const t int ni; double *lj1i, *lj2i; - ilist = listmiddle->ilist; - numneigh = listmiddle->numneigh; - firstneigh = listmiddle->firstneigh; + ilist = list->ilist_middle; + numneigh = list->numneigh_middle; + firstneigh = list->firstneigh_middle; // loop over neighbors of my atoms @@ -1656,9 +1656,9 @@ void PairLJLongTIP4PLongOMP::eval_outer(int iifrom, int iito, ThrData * const th double fxtmp,fytmp,fztmp; - ilist = listouter->ilist; - numneigh = listouter->numneigh; - firstneigh = listouter->firstneigh; + ilist = list->ilist; + numneigh = list->numneigh; + firstneigh = list->firstneigh; // loop over neighbors of my atoms