diff --git a/src/MANYBODY/pair_tersoff_zbl.h b/src/MANYBODY/pair_tersoff_zbl.h index c34f94a08d..34bec05195 100755 --- a/src/MANYBODY/pair_tersoff_zbl.h +++ b/src/MANYBODY/pair_tersoff_zbl.h @@ -29,7 +29,7 @@ class PairTersoffZBL : public PairTersoff { PairTersoffZBL(class LAMMPS *); ~PairTersoffZBL() {} - private: + protected: double global_a_0; // Bohr radius for Coulomb repulsion double global_epsilon_0; // permittivity of vacuum for Coulomb repulsion double global_e; // proton charge (negative of electron charge) diff --git a/src/MC/fix_gcmc.cpp b/src/MC/fix_gcmc.cpp index 2fb0015f7b..3d025e12fd 100644 --- a/src/MC/fix_gcmc.cpp +++ b/src/MC/fix_gcmc.cpp @@ -368,7 +368,7 @@ FixGCMC::~FixGCMC() delete [] grouptypestrings[igroup]; memory->sfree(grouptypestrings); } - if (full_flag) { + if (full_flag && group) { int igroupall = group->find("all"); neighbor->exclusion_group_group_delete(exclusion_group,igroupall); } diff --git a/src/compute_chunk_atom.cpp b/src/compute_chunk_atom.cpp index 5412817d59..e7ca24d29c 100644 --- a/src/compute_chunk_atom.cpp +++ b/src/compute_chunk_atom.cpp @@ -441,7 +441,7 @@ ComputeChunkAtom::ComputeChunkAtom(LAMMPS *lmp, int narg, char **arg) : nmax = 0; chunk = NULL; - nmaxint = 0; + nmaxint = -1; ichunk = NULL; exclude = NULL; @@ -1989,7 +1989,7 @@ void ComputeChunkAtom::set_arrays(int i) double ComputeChunkAtom::memory_usage() { - double bytes = 2*nmaxint * sizeof(int); // ichunk,exclude + double bytes = 2*MAX(nmaxint,0) * sizeof(int); // ichunk,exclude bytes += nmax * sizeof(double); // chunk bytes += ncoord*nchunk * sizeof(double); // coord if (compress) bytes += nchunk * sizeof(int); // chunkID