diff --git a/src/ASPHERE/compute_temp_asphere.cpp b/src/ASPHERE/compute_temp_asphere.cpp index 35c08ec50c..ca40b40876 100755 --- a/src/ASPHERE/compute_temp_asphere.cpp +++ b/src/ASPHERE/compute_temp_asphere.cpp @@ -37,7 +37,7 @@ using namespace LAMMPS_NS; ComputeTempAsphere::ComputeTempAsphere(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, narg, arg) { - if (narg != 3 || narg != 4) + if (narg != 3 && narg != 4) error->all("Illegal compute temp/asphere command"); if (!atom->quat_flag || !atom->angmom_flag) @@ -88,6 +88,7 @@ void ComputeTempAsphere::init() error->all("Bias compute group does not match compute group"); tbias->init(); if (strcmp(tbias->style,"temp/region") == 0) tempbias = 2; + else tempbias = 1; } fix_dof = 0; diff --git a/src/compute_temp.cpp b/src/compute_temp.cpp index 263eb39fa0..c43b7e868a 100644 --- a/src/compute_temp.cpp +++ b/src/compute_temp.cpp @@ -12,6 +12,7 @@ ------------------------------------------------------------------------- */ #include "mpi.h" +#include "string.h" #include "compute_temp.h" #include "atom.h" #include "force.h" @@ -38,7 +39,6 @@ ComputeTemp::ComputeTemp(LAMMPS *lmp, int narg, char **arg) : extscalar = 0; extvector = 1; tempflag = 1; - tempbias = 0; vector = new double[6]; } diff --git a/src/compute_temp_partial.cpp b/src/compute_temp_partial.cpp index 2e06bfcd90..079b969b3c 100644 --- a/src/compute_temp_partial.cpp +++ b/src/compute_temp_partial.cpp @@ -86,7 +86,9 @@ void ComputeTempPartial::dof_compute() int ComputeTempPartial::dof_remove(int i) { - return 0; + int nper = xflag+yflag+zflag; + if (domain->dimension == 2) nper = xflag+yflag; + return (domain->dimension - nper); } /* ---------------------------------------------------------------------- */ diff --git a/src/compute_temp_sphere.cpp b/src/compute_temp_sphere.cpp index fcbca34fae..6ce412c18b 100644 --- a/src/compute_temp_sphere.cpp +++ b/src/compute_temp_sphere.cpp @@ -34,7 +34,7 @@ using namespace LAMMPS_NS; ComputeTempSphere::ComputeTempSphere(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, narg, arg) { - if (narg != 3 || narg != 4) + if (narg != 3 && narg != 4) error->all("Illegal compute temp/sphere command"); scalar_flag = vector_flag = 1;