diff --git a/src/ASPHERE/compute_temp_asphere.cpp b/src/ASPHERE/compute_temp_asphere.cpp index 61431d54d4..34b7a4aac3 100755 --- a/src/ASPHERE/compute_temp_asphere.cpp +++ b/src/ASPHERE/compute_temp_asphere.cpp @@ -116,10 +116,14 @@ void ComputeTempAsphere::init() error->all(FLERR,"Bias compute does not calculate a velocity bias"); if (tbias->igroup != igroup) error->all(FLERR,"Bias compute group does not match compute group"); - tbias->init(); - tbias->setup(); if (strcmp(tbias->style,"temp/region") == 0) tempbias = 2; else tempbias = 1; + + // init and setup bias compute because + // this compute's setup()->dof_compute() may be called first + + tbias->init(); + tbias->setup(); } } diff --git a/src/comm.cpp b/src/comm.cpp index 6d69bb853f..bf20d61fd0 100644 --- a/src/comm.cpp +++ b/src/comm.cpp @@ -629,7 +629,7 @@ int Comm::binary(double value, int n, double *vec) if self=1 (default), then callback() is invoked on final iteration using original inbuf, which may have been updated for non-NULL outbuf, final updated inbuf is copied to it - outbuf = inbuf is OK + ok to specify outbuf = inbuf ------------------------------------------------------------------------- */ void Comm::ring(int n, int nper, void *inbuf, int messtag, diff --git a/src/compute_temp_sphere.cpp b/src/compute_temp_sphere.cpp index 5e5a9c88e7..b80836e27d 100644 --- a/src/compute_temp_sphere.cpp +++ b/src/compute_temp_sphere.cpp @@ -97,10 +97,14 @@ void ComputeTempSphere::init() error->all(FLERR,"Bias compute does not calculate a velocity bias"); if (tbias->igroup != igroup) error->all(FLERR,"Bias compute group does not match compute group"); - tbias->init(); - tbias->setup(); if (strcmp(tbias->style,"temp/region") == 0) tempbias = 2; else tempbias = 1; + + // init and setup bias compute because + // this compute's setup()->dof_compute() may be called first + + tbias->init(); + tbias->setup(); } } diff --git a/src/fix_store.cpp b/src/fix_store.cpp index 45eeaaa502..e0dd82773d 100644 --- a/src/fix_store.cpp +++ b/src/fix_store.cpp @@ -28,6 +28,8 @@ FixStore::FixStore(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) { if (narg != 5) error->all(FLERR,"Illegal fix store command"); + create_attribute = 1; + // syntax: id group style 0/1 nvalue // 0/1 flag = not-store or store values in restart file @@ -189,3 +191,17 @@ int FixStore::size_restart(int nlocal) { return nvalues+1; } + +/* ---------------------------------------------------------------------- + initialize one atom's vector/array values, called when atom is created + value of 0.0 may not be desired value, but will be unitialized otherwise + e.g. by compute msd on group all +------------------------------------------------------------------------- */ + +void FixStore::set_arrays(int i) +{ + if (vecflag) + vstore[i] = 0.0; + else + for (int m = 0; m < nvalues; m++) astore[i][m] = 0.0; +} diff --git a/src/fix_store.h b/src/fix_store.h index dab9899906..5b59ea900e 100644 --- a/src/fix_store.h +++ b/src/fix_store.h @@ -42,6 +42,7 @@ class FixStore : public Fix { void unpack_restart(int, int); int size_restart(int); int maxsize_restart(); + void set_arrays(int); private: int nvalues; // total # of values per atom diff --git a/src/lammps.cpp b/src/lammps.cpp index ea927ea0f4..702946d7ea 100644 --- a/src/lammps.cpp +++ b/src/lammps.cpp @@ -249,7 +249,8 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator) // sum of procs in all worlds must equal total # of procs if (!universe->consistent()) - error->universe_all(FLERR,"Processor partitions are inconsistent"); + error->universe_all(FLERR,"Processor partitions do not match " + "number of allocated processors"); // universe cannot use stdin for input file