From b2ce582a4060e0188ec7e9e73fa2e688bd967dd1 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 24 May 2016 16:41:41 -0400 Subject: [PATCH] make compute com and gyration compatible with dynamic groups --- src/compute_com.cpp | 1 + src/compute_gyration.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/compute_com.cpp b/src/compute_com.cpp index e086210322..27606cbc6f 100644 --- a/src/compute_com.cpp +++ b/src/compute_com.cpp @@ -51,6 +51,7 @@ void ComputeCOM::init() void ComputeCOM::compute_vector() { invoked_vector = update->ntimestep; + if (group->dynamic[igroup]) masstotal = group->mass(igroup); group->xcm(igroup,masstotal,vector); } diff --git a/src/compute_gyration.cpp b/src/compute_gyration.cpp index fab413e670..0c1c58a4fd 100644 --- a/src/compute_gyration.cpp +++ b/src/compute_gyration.cpp @@ -57,6 +57,7 @@ double ComputeGyration::compute_scalar() invoked_scalar = update->ntimestep; double xcm[3]; + if (group->dynamic[igroup]) masstotal = group->mass(igroup); group->xcm(igroup,masstotal,xcm); scalar = group->gyration(igroup,masstotal,xcm); return scalar;