diff --git a/src/atom.cpp b/src/atom.cpp index b06934fda9..12a1f56049 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -471,6 +471,7 @@ void Atom::modify_params(int narg, char **arg) if (strcmp(arg[iarg+1],"array") == 0) map_user = 1; else if (strcmp(arg[iarg+1],"hash") == 0) map_user = 2; else error->all(FLERR,"Illegal atom_modify command"); + map_style = map_user; iarg += 2; } else if (strcmp(arg[iarg],"first") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal atom_modify command"); diff --git a/src/create_atoms.cpp b/src/create_atoms.cpp index 7a24c5eb09..351d3656b1 100644 --- a/src/create_atoms.cpp +++ b/src/create_atoms.cpp @@ -270,10 +270,10 @@ void CreateAtoms::command(int narg, char **arg) if (atom->tag_enable) atom->tag_extend(); atom->tag_check(); - // if molecular system or user-requested, create global mapping of atoms + // create global mapping of atoms // zero nghost in case are adding new atoms to existing atoms - if (atom->molecular || atom->map_user) { + if (atom->map_style) { atom->nghost = 0; atom->map_init(); atom->map_set(); diff --git a/src/read_data.cpp b/src/read_data.cpp index 583af07dbf..628f9f1e59 100644 --- a/src/read_data.cpp +++ b/src/read_data.cpp @@ -780,9 +780,9 @@ void ReadData::atoms() atom->tag_check(); - // if molecular system or user-requested, create global mapping of atoms + // create global mapping of atoms - if (atom->molecular || atom->map_user) { + if (atom->map_style) { atom->map_init(); atom->map_set(); } diff --git a/src/read_restart.cpp b/src/read_restart.cpp index 13795b0c43..c0a9bac92e 100644 --- a/src/read_restart.cpp +++ b/src/read_restart.cpp @@ -501,9 +501,9 @@ void ReadRestart::command(int narg, char **arg) atom->tag_check(); - // if molecular system or user-requested, create global mapping of atoms + // create global mapping of atoms - if (atom->molecular || atom->map_user) { + if (atom->map_style) { atom->map_init(); atom->map_set(); } diff --git a/src/replicate.cpp b/src/replicate.cpp index b50d676561..b759c47fa3 100644 --- a/src/replicate.cpp +++ b/src/replicate.cpp @@ -388,9 +388,9 @@ void Replicate::command(int narg, char **arg) atom->tag_check(); - // if molecular system or user-requested, create global mapping of atoms + // create global mapping of atoms - if (atom->molecular || atom->map_user) { + if (atom->map_style) { atom->map_init(); atom->map_set(); }