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