diff --git a/src/compute_chunk_atom.cpp b/src/compute_chunk_atom.cpp index 2eeb0467bb..5b3b4526af 100644 --- a/src/compute_chunk_atom.cpp +++ b/src/compute_chunk_atom.cpp @@ -475,12 +475,13 @@ void ComputeChunkAtom::init() error->all(FLERR,"Compute chunk/atom ids once but nchunk is not once"); // create/destroy fix STORE for persistent chunk IDs as needed + // need to do this if idsflag = ONCE or locks will be used by other commands // need to wait until init() so that fix ave/chunk command(s) are in place - // they increment lockcount if they lock this compute + // they increment lockcount if they lock this compute // fixstore ID = compute-ID + COMPUTE_STORE, fix group = compute group // fixstore initializes all values to 0.0 - if (lockcount && !fixstore) { + if ((idsflag == ONCE || lockcount) && !fixstore) { int n = strlen(id) + strlen("_COMPUTE_STORE") + 1; id_fix = new char[n]; strcpy(id_fix,id); @@ -497,7 +498,7 @@ void ComputeChunkAtom::init() delete [] newarg; } - if (!lockcount && fixstore) { + if ((idsflag != ONCE && !lockcount) && fixstore) { delete fixstore; fixstore = NULL; } diff --git a/src/compute_gyration_chunk.cpp b/src/compute_gyration_chunk.cpp index 9d09206b2e..a14fb6f205 100644 --- a/src/compute_gyration_chunk.cpp +++ b/src/compute_gyration_chunk.cpp @@ -42,7 +42,7 @@ ComputeGyrationChunk::ComputeGyrationChunk(LAMMPS *lmp, int narg, char **arg) : // optional args tensor = 0; - int iarg = 3; + int iarg = 4; while (iarg < narg) { if (strcmp(arg[iarg],"tensor") == 0) { tensor = 1; diff --git a/src/fix_ave_chunk.cpp b/src/fix_ave_chunk.cpp index 5d6f854d83..e1ed6b1738 100644 --- a/src/fix_ave_chunk.cpp +++ b/src/fix_ave_chunk.cpp @@ -730,6 +730,7 @@ void FixAveChunk::end_of_step() // check last so other options can take precedence double mvv2e = force->mvv2e; + double boltz = force->boltz; if (normflag == ALL) { for (m = 0; m < nchunk; m++) { @@ -744,7 +745,7 @@ void FixAveChunk::end_of_step() for (j = 0; j < nvalues; j++) { if (which[j] == TEMPERATURE) values_many[m][j] += mvv2e*values_one[m][j] / - (cdof + adof*count_many[m]); + ((cdof + adof*count_many[m]) * boltz); else if (which[j] == DENSITY_NUMBER || which[j] == DENSITY_MASS || scaleflag == NOSCALE) values_many[m][j] += values_one[m][j]; @@ -793,7 +794,7 @@ void FixAveChunk::end_of_step() if (count_sum[m] > 0.0) for (j = 0; j < nvalues; j++) { if (which[j] == TEMPERATURE) - values_sum[m][j] *= mvv2e / (cdof + adof*count_sum[m]); + values_sum[m][j] *= mvv2e / ((cdof + adof*count_sum[m]) * boltz); else if (which[j] == DENSITY_MASS) values_sum[m][j] *= mv2d/repeat; else if (which[j] == DENSITY_NUMBER || scaleflag == NOSCALE)