From 136e247cd8b685889d45c35f43d58af3290df877 Mon Sep 17 00:00:00 2001 From: PabloPiaggi <ppiaggi@gmail.com> Date: Wed, 30 Jan 2019 14:59:23 +0100 Subject: [PATCH] compute entropy/atom - Use NL with ghost atoms only with avg yes --- src/USER-MISC/compute_entropy_atom.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/USER-MISC/compute_entropy_atom.cpp b/src/USER-MISC/compute_entropy_atom.cpp index 4946bc437e..0367d7fe6d 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; + } } -- GitLab