From 67fced37c826f32ea571dd5c5b24b16016c27953 Mon Sep 17 00:00:00 2001 From: Anders Hafreager Date: Wed, 26 Apr 2017 20:10:18 +0200 Subject: [PATCH] Setting molecule COM to 0 after moving atoms --- src/MC/fix_gcmc.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/MC/fix_gcmc.cpp b/src/MC/fix_gcmc.cpp index 73758e3628..a83a7aaf63 100644 --- a/src/MC/fix_gcmc.cpp +++ b/src/MC/fix_gcmc.cpp @@ -595,6 +595,9 @@ void FixGCMC::init() onemols[imol]->x[i][1] -= onemols[imol]->com[1]; onemols[imol]->x[i][2] -= onemols[imol]->com[2]; } + onemols[imol]->com[0] = 0; + onemols[imol]->com[1] = 0; + onemols[imol]->com[2] = 0; } else gas_mass = atom->mass[ngcmc_type];