From 3481d011d31bd000d1f52a5714a24f8c6dcf79a5 Mon Sep 17 00:00:00 2001
From: "Kurt A. O'Hearn" <ohearnk@msu.edu>
Date: Sun, 21 Oct 2018 22:31:17 -0400
Subject: [PATCH] sPuReMD: revert change on evolving atoms (Verlet method) for
 NVE ensemble.

---
 sPuReMD/src/grid.c      | 7 +++++--
 sPuReMD/src/integrate.c | 4 ++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/sPuReMD/src/grid.c b/sPuReMD/src/grid.c
index 1b61ccfa..9ac8eed8 100644
--- a/sPuReMD/src/grid.c
+++ b/sPuReMD/src/grid.c
@@ -71,7 +71,7 @@ static void Allocate_Space_for_Grid( reax_system *system )
     int i, j, k, l;
     grid *g;
 
-    g = &(system->g);
+    g = &system->g;
     g->max_nbrs = (2 * g->spread[0] + 1)
         * (2 * g->spread[1] + 1) * (2 * g->spread[2] + 1) + 3;
 
@@ -491,9 +491,12 @@ void Bin_Atoms( reax_system* system, static_storage *workspace )
 {
     int i, j, k, l;
     int max_atoms;
-    grid *g = &( system->g );
+    grid *g;
+
+    g = &system->g;
 
     Reset_Grid( g );
+
     for ( l = 0; l < system->N; l++ )
     {
         i = (int)(system->atoms[l].x[0] * g->inv_len[0]);
diff --git a/sPuReMD/src/integrate.c b/sPuReMD/src/integrate.c
index 62d4fc64..fa47995e 100644
--- a/sPuReMD/src/integrate.c
+++ b/sPuReMD/src/integrate.c
@@ -58,8 +58,8 @@ void Velocity_Verlet_NVE(reax_system *system, control_params *control,
 
         rvec_ScaledSum( dx, dt, system->atoms[i].v,
                 0.5 * dt_sqr * -F_CONV * inv_m, system->atoms[i].f );
-//        Inc_on_T3( system->atoms[i].x, dx, &system->box );
-        rvec_Add( system->atoms[i].x, dx );
+        Inc_on_T3( system->atoms[i].x, dx, &system->box );
+//        rvec_Add( system->atoms[i].x, dx );
         rvec_ScaledAdd( system->atoms[i].v,
                 0.5 * dt * -F_CONV * inv_m, system->atoms[i].f );
     }
-- 
GitLab