From 43d1d8c86bfd4f28a1a2fbaabd1d94cec4eac464 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 30 Aug 2023 23:51:25 -0400 Subject: [PATCH] make atom_modify map settings in restart file overridable --- src/read_restart.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/read_restart.cpp b/src/read_restart.cpp index 6925bd6096..d0db7ad912 100644 --- a/src/read_restart.cpp +++ b/src/read_restart.cpp @@ -796,9 +796,12 @@ void ReadRestart::header() } else if (flag == ATOM_ID) { atom->tag_enable = read_int(); } else if (flag == ATOM_MAP_STYLE) { - atom->map_style = read_int(); + // we should be able to enable an atom map, even + // if the simulation in the restart didn't use one + int itmp = read_int(); + if (atom->map_user == Atom::MAP_NONE) atom->map_style = itmp; } else if (flag == ATOM_MAP_USER) { - atom->map_user = read_int(); + int itmp = read_int(); // ignored } else if (flag == ATOM_SORTFREQ) { atom->sortfreq = read_int(); } else if (flag == ATOM_SORTBIN) {