diff --git a/src/deprecated.cpp b/src/deprecated.cpp index 3558935cb3..8675e1854e 100644 --- a/src/deprecated.cpp +++ b/src/deprecated.cpp @@ -34,14 +34,25 @@ void Deprecated::command(int narg, char **arg) return; } else if (cmd == "reset_ids") { if (lmp->comm->me == 0) - utils::logmesg(lmp, "\n'reset_ids' has been renamed to 'reset_atom_ids'\n\n"); + utils::logmesg(lmp, "\n'reset_ids' has been renamed to 'reset atom_ids'\n\n"); } else if (utils::strmatch(cmd, "^kim_")) { - if (lmp->comm->me == 0) - utils::logmesg(lmp, - "\nWARNING: 'kim_' has been renamed to 'kim '. " - "Please update your input.\n\n"); std::string newcmd("kim"); newcmd += " " + cmd.substr(4); + if (lmp->comm->me == 0) + utils::logmesg(lmp, "\nWARNING: '{}' has been renamed to '{}'. Please update your input.\n\n", + cmd, newcmd); + for (int i = 0; i < narg; ++i) { + newcmd.append(1, ' '); + newcmd.append(arg[i]); + } + input->one(newcmd); + return; + } else if (utils::strmatch(cmd, "^reset_")) { + std::string newcmd("reset"); + newcmd += " " + cmd.substr(6); + if (lmp->comm->me == 0) + utils::logmesg(lmp, "\nWARNING: '{}' has been renamed to '{}'. Please update your input.\n\n", + cmd, newcmd); for (int i = 0; i < narg; ++i) { newcmd.append(1, ' '); newcmd.append(arg[i]); diff --git a/src/deprecated.h b/src/deprecated.h index e2e7e396e9..86e3ad210e 100644 --- a/src/deprecated.h +++ b/src/deprecated.h @@ -20,6 +20,9 @@ CommandStyle(kim_interactions,Deprecated); CommandStyle(kim_param,Deprecated); CommandStyle(kim_property,Deprecated); CommandStyle(kim_query,Deprecated); +CommandStyle(reset_atom_ids,Deprecated); +CommandStyle(reset_image_flags,Deprecated); +CommandStyle(reset_mol_ids,Deprecated); CommandStyle(message,Deprecated); CommandStyle(server,Deprecated); // clang-format on diff --git a/src/input.cpp b/src/input.cpp index 4a3b470532..a347ab0216 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -2003,7 +2003,7 @@ void Input::units() int Input::meta(const std::string &prefix) { - auto mycmd = fmt::format("{}_{}", prefix, arg[0]); + auto mycmd = fmt::format("{}_{}", utils::uppercase(prefix), utils::uppercase(arg[0])); if (command_map->find(mycmd) != command_map->end()) { CommandCreator &command_creator = (*command_map)[mycmd]; Command *cmd = command_creator(lmp); diff --git a/src/reset_atom_ids.h b/src/reset_atom_ids.h index 0da02a0ffc..26160ad976 100644 --- a/src/reset_atom_ids.h +++ b/src/reset_atom_ids.h @@ -13,7 +13,7 @@ #ifdef COMMAND_CLASS // clang-format off -CommandStyle(reset_atom_ids,ResetIDs); +CommandStyle(RESET_ATOM_IDS,ResetIDs); // clang-format on #else diff --git a/src/reset_image_flags.h b/src/reset_image_flags.h index 2b8c73602c..3c8d65d14f 100644 --- a/src/reset_image_flags.h +++ b/src/reset_image_flags.h @@ -13,7 +13,7 @@ #ifdef COMMAND_CLASS // clang-format off -CommandStyle(reset_image_flags,ResetImageFlags); +CommandStyle(RESET_IMAGE_FLAGS,ResetImageFlags); // clang-format on #else diff --git a/src/reset_mol_ids.h b/src/reset_mol_ids.h index c25cb96726..ec986c7972 100644 --- a/src/reset_mol_ids.h +++ b/src/reset_mol_ids.h @@ -13,7 +13,7 @@ #ifdef COMMAND_CLASS // clang-format off -CommandStyle(reset_mol_ids,ResetMolIDs); +CommandStyle(RESET_MOL_IDS,ResetMolIDs); // clang-format on #else