From 6965307250bfdc57a37b410e37d2557f3fe2299a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 13 Mar 2018 22:58:39 -0400 Subject: [PATCH] print warning when "compress yes" is ignored with delete_atoms --- src/delete_atoms.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/delete_atoms.cpp b/src/delete_atoms.cpp index a5b15f5f52..4c7829662c 100644 --- a/src/delete_atoms.cpp +++ b/src/delete_atoms.cpp @@ -109,11 +109,14 @@ void DeleteAtoms::command(int narg, char **arg) // reset atom tags to be contiguous // set all atom IDs to 0, call tag_extend() - if (atom->molecular == 0 && compress_flag) { - tagint *tag = atom->tag; - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) tag[i] = 0; - atom->tag_extend(); + if (compress_flag) { + if (atom->molecular == 0) { + tagint *tag = atom->tag; + int nlocal = atom->nlocal; + for (int i = 0; i < nlocal; i++) tag[i] = 0; + atom->tag_extend(); + } else if (comm->me == 0) + error->warning(FLERR,"Ignoring 'compress yes' for molecular system"); } // reset atom->natoms and also topology counts