From 11d2b488c1ae18d3d2aaf83ed49025c4b4a0f174 Mon Sep 17 00:00:00 2001 From: Stephen Sanderson Date: Tue, 16 Mar 2021 16:51:10 +1000 Subject: [PATCH 1/2] Fixed incorrect scaling of cdof for 'norm all' --- src/fix_ave_chunk.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fix_ave_chunk.cpp b/src/fix_ave_chunk.cpp index 3b612aeb73..359e3ba588 100644 --- a/src/fix_ave_chunk.cpp +++ b/src/fix_ave_chunk.cpp @@ -881,7 +881,7 @@ void FixAveChunk::end_of_step() if (count_sum[m] > 0.0) for (j = 0; j < nvalues; j++) { if (which[j] == ArgInfo::TEMPERATURE) { - values_sum[m][j] *= mvv2e / ((cdof + adof*count_sum[m]) * boltz); + values_sum[m][j] *= mvv2e/((repeat*cdof + adof*count_sum[m])*boltz); } else if (which[j] == ArgInfo::DENSITY_NUMBER) { if (volflag == SCALAR) values_sum[m][j] /= chunk_volume_scalar; else values_sum[m][j] /= chunk_volume_vec[m]; From 22fdfa27b57fbcdbc9d8e6045df7567491eb3d5e Mon Sep 17 00:00:00 2001 From: Stephen Sanderson Date: Wed, 17 Mar 2021 09:01:35 +1000 Subject: [PATCH 2/2] Updated documentation to clarify the treatment of temperature using norm all --- doc/src/fix_ave_chunk.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/src/fix_ave_chunk.rst b/doc/src/fix_ave_chunk.rst index d2dbaa320a..ce7fcd1fca 100644 --- a/doc/src/fix_ave_chunk.rst +++ b/doc/src/fix_ave_chunk.rst @@ -307,7 +307,9 @@ atoms in the chunk. The averaged output value for the chunk on the average over atoms across the entire *Nfreq* timescale. For the *density/number* and *density/mass* values, the volume (bin volume or system volume) used in the final normalization will be the volume at -the final *Nfreq* timestep. +the final *Nfreq* timestep. For the *temp* values, degrees of freedom and +kinetic energy are summed separately across the entire *Nfreq* timescale, and +the output value is calculated by dividing those two sums. If the *norm* setting is *sample*\ , the chunk value is summed over atoms for each sample, as is the count, and an "average sample value"