From 37d905578cf752b1630f9f5e3e78c96d338782c2 Mon Sep 17 00:00:00 2001 From: pscrozi Date: Tue, 31 Jul 2012 17:55:48 +0000 Subject: [PATCH] Adding a domain remap after doing an MC particle move. This fixes a bug that shows up when an MC particle move moves a particle through the PBC. git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8515 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/MC/fix_gcmc.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/MC/fix_gcmc.cpp b/src/MC/fix_gcmc.cpp index dd314d772d..40b6ee7741 100644 --- a/src/MC/fix_gcmc.cpp +++ b/src/MC/fix_gcmc.cpp @@ -270,6 +270,7 @@ void FixGCMC::attempt_move() double rx,ry,rz; double coord[3]; double **x = atom->x; + tagint *image = atom->image; nmove_attempts += 1.0; @@ -296,6 +297,7 @@ void FixGCMC::attempt_move() x[i][0] = coord[0]; x[i][1] = coord[1]; x[i][2] = coord[2]; + domain->remap(x[i],image[i]); success = 1; } }