From 175f3ee648bf805e233c327eff93a402495e1b80 Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Fri, 5 Apr 2019 10:14:45 -0500 Subject: [PATCH] Fix pointer assignment in pair_kim Bug only affects cases where neighbor list needs to be stripped. Thanks to Mingjian Wen (@mjwen) for finding and reporting this. --- src/KIM/pair_kim.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/KIM/pair_kim.cpp b/src/KIM/pair_kim.cpp index 84842f87cc..ea5f24a67e 100644 --- a/src/KIM/pair_kim.cpp +++ b/src/KIM/pair_kim.cpp @@ -481,7 +481,7 @@ void PairKIM::init_style() for (int i = 0; i < kim_number_of_neighbor_lists; ++i) { lmps_stripped_neigh_ptr[i] - = &(lmps_stripped_neigh_list[(i-1)*(neighbor->oneatom)]); + = &(lmps_stripped_neigh_list[i*(neighbor->oneatom)]); } }