diff --git a/src/reset_ids.cpp b/src/reset_ids.cpp index 8a33cd535b..fd898bd3ab 100644 --- a/src/reset_ids.cpp +++ b/src/reset_ids.cpp @@ -16,6 +16,7 @@ #include "atom_vec.h" #include "domain.h" #include "comm.h" +#include "special.h" #include "memory.h" #include "error.h" @@ -44,7 +45,7 @@ void ResetIDs::command(int narg, char **arg) } // create an atom map if one doesn't exist already - + int mapflag = 0; if (atom->map_style == 0) { mapflag = 1; @@ -93,7 +94,7 @@ void ResetIDs::command(int narg, char **arg) // forward_comm_array acquires new IDs for ghost atoms double **newIDs; - memory->create(newIDs,nall,1,"reset_ids:newIDs"); + memory->create(newIDs,nall,1,"reset_ids:newIDs"); for (int i = 0; i < nlocal; i++) { newIDs[i][0] = tag[i]; @@ -105,7 +106,7 @@ void ResetIDs::command(int narg, char **arg) // loop over bonds, angles, etc and reset IDs in stored topology arrays // only necessary for molecular = 1, not molecular = 2 // badcount = atom IDs that could not be found - + int badcount = 0; if (atom->molecular == 1) { @@ -232,8 +233,15 @@ void ResetIDs::command(int narg, char **arg) atom->map_init(); atom->map_set(); + // need to update exclusions with new atom IDs + + if (atom->molecular == 1) { + Special special(lmp); + special.build(); + } + // delete temporary atom map - + if (mapflag) { atom->map_delete(); atom->map_style = 0;