From 73b948dcfc97ffc211b91ebb63f4bbbc94c64517 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer <akohlmey@gmail.com> Date: Fri, 23 Jun 2017 10:01:45 -0400 Subject: [PATCH] pppm must be fully reinitialized after switching to triclinic box to avoid memory corruption --- src/KSPACE/pppm.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/KSPACE/pppm.cpp b/src/KSPACE/pppm.cpp index 232cabe4ea..05169fca1c 100644 --- a/src/KSPACE/pppm.cpp +++ b/src/KSPACE/pppm.cpp @@ -186,6 +186,10 @@ void PPPM::init() // error check triclinic_check(); + + if (triclinic != domain->triclinic) + error->all(FLERR,"Must redefine kspace_style after changing to triclinic box"); + if (domain->triclinic && differentiation_flag == 1) error->all(FLERR,"Cannot (yet) use PPPM with triclinic box " "and kspace_modify diff ad"); -- GitLab