diff --git a/src/neigh_list.cpp b/src/neigh_list.cpp index edc8634373..e8fd4130fc 100644 --- a/src/neigh_list.cpp +++ b/src/neigh_list.cpp @@ -79,6 +79,7 @@ NeighList::NeighList(LAMMPS *lmp) : Pointers(lmp) // USER-DPD package ndxAIR_ssa = NULL; + np = NULL; } /* ---------------------------------------------------------------------- */ diff --git a/src/neigh_list.h b/src/neigh_list.h index 7649245e99..ea88e9b28b 100644 --- a/src/neigh_list.h +++ b/src/neigh_list.h @@ -82,6 +82,7 @@ class NeighList : protected Pointers { int AIRct_ssa[8]; // count of how many atoms in each AIR uint16_t (*ndxAIR_ssa)[8]; // for each atom, last neighbor index of each AIR + class NPair *np; // ptr to NPair instance I depend on // methods diff --git a/src/neighbor.cpp b/src/neighbor.cpp index e0b84cc410..148dcbd7e9 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -785,7 +785,7 @@ int Neighbor::init_pair() } PairCreator pair_creator = pairclass[flag-1]; - neigh_pair[i] = pair_creator(lmp); + lists[i]->np = neigh_pair[i] = pair_creator(lmp); neigh_pair[i]->post_constructor(requests[i]); neigh_pair[i]->istyle = flag;