diff --git a/src/USER-MISC/compute_entropy_atom.cpp b/src/USER-MISC/compute_entropy_atom.cpp index 4946bc437e7960bba7e9f054d298d191c69f2711..0367d7fe6d9e7605186e79fe0cdac4c05352f2c6 100644 --- a/src/USER-MISC/compute_entropy_atom.cpp +++ b/src/USER-MISC/compute_entropy_atom.cpp @@ -65,6 +65,7 @@ ComputeEntropyAtom(LAMMPS *lmp, int narg, char **arg) : if (cutoff <= 0.0) error->all(FLERR,"Illegal compute entropy/atom" " command; cutoff must be positive"); + cutoff2 = 0.; avg_flag = 0; local_flag = 0; @@ -137,15 +138,20 @@ void ComputeEntropyAtom::init() if (count > 1 && comm->me == 0) error->warning(FLERR,"More than one compute entropy/atom"); - // need a full neighbor list with neighbors of the ghost atoms - + // Request neighbor list int irequest = neighbor->request(this,instance_me); neighbor->requests[irequest]->pair = 0; neighbor->requests[irequest]->compute = 1; neighbor->requests[irequest]->half = 0; neighbor->requests[irequest]->full = 1; neighbor->requests[irequest]->occasional = 0; - neighbor->requests[irequest]->ghost = 1; + if (avg_flag) { + // need a full neighbor list with neighbors of the ghost atoms + neighbor->requests[irequest]->ghost = 1; + } else { + // need a full neighbor list + neighbor->requests[irequest]->ghost = 0; + } }