From 62b9fa22b8ef940d2b8422908c9e59ad2c498f02 Mon Sep 17 00:00:00 2001
From: Axel Kohlmeyer <akohlmey@gmail.com>
Date: Fri, 7 Apr 2017 15:11:26 -0400
Subject: [PATCH] when computing only rotational temperature, we must not
 subtract the default n-dim extra DOFs

---
 src/ASPHERE/compute_temp_asphere.cpp | 5 +++++
 src/compute_temp_sphere.cpp          | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/src/ASPHERE/compute_temp_asphere.cpp b/src/ASPHERE/compute_temp_asphere.cpp
index 029b76cb27..e8d3fcb527 100644
--- a/src/ASPHERE/compute_temp_asphere.cpp
+++ b/src/ASPHERE/compute_temp_asphere.cpp
@@ -73,6 +73,11 @@ ComputeTempAsphere::ComputeTempAsphere(LAMMPS *lmp, int narg, char **arg) :
     } else error->all(FLERR,"Illegal compute temp/asphere command");
   }
 
+  // when computing only the rotational temperature,
+  // do not remove DOFs for translation as set by default
+
+  if (mode == ROTATE) extra_dof = 0;
+
   vector = new double[6];
 
 }
diff --git a/src/compute_temp_sphere.cpp b/src/compute_temp_sphere.cpp
index 50995dfa84..febb9339b4 100644
--- a/src/compute_temp_sphere.cpp
+++ b/src/compute_temp_sphere.cpp
@@ -67,6 +67,11 @@ ComputeTempSphere::ComputeTempSphere(LAMMPS *lmp, int narg, char **arg) :
     } else error->all(FLERR,"Illegal compute temp/sphere command");
   }
 
+  // when computing only the rotational temperature,
+  // do not remove DOFs for translation as set by default
+
+  if (mode == ROTATE) extra_dof = 0;
+
   vector = new double[6];
 
   // error checks
-- 
GitLab