From 952bfcafaa1459b3b1c8eca7f6cbb172f2a630ab Mon Sep 17 00:00:00 2001
From: sjplimp <sjplimp@f3b2605a-c512-4ea7-a41b-209d697bcdaa>
Date: Tue, 21 Dec 2010 20:18:17 +0000
Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5425
 f3b2605a-c512-4ea7-a41b-209d697bcdaa

---
 src/neighbor.cpp | 6 +++++-
 src/neighbor.h   | 1 +
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/neighbor.cpp b/src/neighbor.cpp
index bc45df5592..98b1dc402e 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 6a21950af6..543a5e3bf6 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
-- 
GitLab