diff --git a/src/neighbor.cpp b/src/neighbor.cpp index bc45df5592b81b70b96fe7ceba4c8516f9fba137..98b1dc402e4240da8627ff3eb75f1439f9d33f7a 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -118,6 +118,7 @@ Neighbor::Neighbor(LAMMPS *lmp) : Pointers(lmp) requests = NULL; old_style = BIN; + old_triclinic = 0; old_nrequest = 0; old_requests = NULL; @@ -382,10 +383,12 @@ void Neighbor::init() // test if pairwise lists need to be re-created // no need to re-create if: - // neigh style has not changed and current requests = old requests + // neigh style and triclinic has not changed and + // current requests = old requests int same = 1; if (style != old_style) same = 0; + if (triclinic != old_triclinic) same = 0; if (nrequest != old_nrequest) same = 0; else for (i = 0; i < nrequest; i++) @@ -629,6 +632,7 @@ void Neighbor::init() nrequest = maxrequest = 0; requests = NULL; old_style = style; + old_triclinic = triclinic; // ------------------------------------------------------------------ // topology lists diff --git a/src/neighbor.h b/src/neighbor.h index 6a21950af68948688580e10483097fc8a4c2189c..543a5e3bf6d6a78b701b947eb907d2fae1700d58 100644 --- a/src/neighbor.h +++ b/src/neighbor.h @@ -43,6 +43,7 @@ class Neighbor : protected Pointers { int old_style; // previous run info to avoid int old_nrequest; // re-creation of pairwise neighbor lists + int old_triclinic; class NeighRequest **old_requests; int nlist; // pairwise neighbor lists