From 6ff87f5c39142d657c88d2b059a2a2f38623bde0 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 30 Nov 2023 05:41:05 -0500 Subject: [PATCH] remove reax/c aliases and related code checking for them --- src/KOKKOS/fix_reaxff_bonds_kokkos.h | 3 --- src/KOKKOS/fix_reaxff_species_kokkos.h | 3 --- src/KOKKOS/pair_reaxff_kokkos.h | 3 --- src/OPENMP/pair_reaxff_omp.h | 1 - src/REAXFF/fix_acks2_reaxff.cpp | 7 +++---- src/REAXFF/fix_qeq_reaxff.cpp | 5 ++--- src/REAXFF/fix_reaxff_bonds.h | 1 - src/REAXFF/fix_reaxff_species.h | 1 - src/REAXFF/pair_reaxff.h | 1 - src/fix_deprecated.cpp | 6 ++++++ src/fix_deprecated.h | 3 ++- src/pair_deprecated.cpp | 3 +++ src/pair_deprecated.h | 1 + 13 files changed, 17 insertions(+), 21 deletions(-) diff --git a/src/KOKKOS/fix_reaxff_bonds_kokkos.h b/src/KOKKOS/fix_reaxff_bonds_kokkos.h index 29c8d457fd..89eb539ca8 100644 --- a/src/KOKKOS/fix_reaxff_bonds_kokkos.h +++ b/src/KOKKOS/fix_reaxff_bonds_kokkos.h @@ -16,9 +16,6 @@ FixStyle(reaxff/bonds/kk,FixReaxFFBondsKokkos); FixStyle(reaxff/bonds/kk/device,FixReaxFFBondsKokkos); FixStyle(reaxff/bonds/kk/host,FixReaxFFBondsKokkos); -FixStyle(reax/c/bonds/kk,FixReaxFFBondsKokkos); -FixStyle(reax/c/bonds/kk/device,FixReaxFFBondsKokkos); -FixStyle(reax/c/bonds/kk/host,FixReaxFFBondsKokkos); // clang-format on #else diff --git a/src/KOKKOS/fix_reaxff_species_kokkos.h b/src/KOKKOS/fix_reaxff_species_kokkos.h index 1848825a19..0500c6febf 100644 --- a/src/KOKKOS/fix_reaxff_species_kokkos.h +++ b/src/KOKKOS/fix_reaxff_species_kokkos.h @@ -16,9 +16,6 @@ FixStyle(reaxff/species/kk,FixReaxFFSpeciesKokkos); FixStyle(reaxff/species/kk/device,FixReaxFFSpeciesKokkos); FixStyle(reaxff/species/kk/host,FixReaxFFSpeciesKokkos); -FixStyle(reax/c/species/kk,FixReaxFFSpeciesKokkos); -FixStyle(reax/c/species/kk/device,FixReaxFFSpeciesKokkos); -FixStyle(reax/c/species/kk/host,FixReaxFFSpeciesKokkos); // clang-format on #else diff --git a/src/KOKKOS/pair_reaxff_kokkos.h b/src/KOKKOS/pair_reaxff_kokkos.h index 1ad0955a1e..421d704d03 100644 --- a/src/KOKKOS/pair_reaxff_kokkos.h +++ b/src/KOKKOS/pair_reaxff_kokkos.h @@ -16,9 +16,6 @@ PairStyle(reaxff/kk,PairReaxFFKokkos); PairStyle(reaxff/kk/device,PairReaxFFKokkos); PairStyle(reaxff/kk/host,PairReaxFFKokkos); -PairStyle(reax/c/kk,PairReaxFFKokkos); -PairStyle(reax/c/kk/device,PairReaxFFKokkos); -PairStyle(reax/c/kk/host,PairReaxFFKokkos); // clang-format on #else diff --git a/src/OPENMP/pair_reaxff_omp.h b/src/OPENMP/pair_reaxff_omp.h index 9ae63a2e3b..3b49575594 100644 --- a/src/OPENMP/pair_reaxff_omp.h +++ b/src/OPENMP/pair_reaxff_omp.h @@ -14,7 +14,6 @@ #ifdef PAIR_CLASS // clang-format off PairStyle(reaxff/omp,PairReaxFFOMP); -PairStyle(reax/c/omp,PairReaxFFOMP); // clang-format on #else diff --git a/src/REAXFF/fix_acks2_reaxff.cpp b/src/REAXFF/fix_acks2_reaxff.cpp index 28733f0fe0..68de1c8ed1 100644 --- a/src/REAXFF/fix_acks2_reaxff.cpp +++ b/src/REAXFF/fix_acks2_reaxff.cpp @@ -124,11 +124,10 @@ void FixACKS2ReaxFF::post_constructor() void FixACKS2ReaxFF::pertype_parameters(char *arg) { - // match either new keyword "reaxff" or old keyword "reax/c" - if (utils::strmatch(arg,"^reax..$")) { + if (utils::strmatch(arg,"^reaxff")) { reaxflag = 1; - Pair *pair = force->pair_match("^reax..",0); - if (!pair) error->all(FLERR,"No reaxff pair style for fix qeq/reaxff"); + Pair *pair = force->pair_match("^reaxff",0); + if (!pair) error->all(FLERR,"No reaxff pair style for fix acks2/reaxff"); int tmp; chi = (double *) pair->extract("chi",tmp); diff --git a/src/REAXFF/fix_qeq_reaxff.cpp b/src/REAXFF/fix_qeq_reaxff.cpp index f0fc7fef99..ab561de0a7 100644 --- a/src/REAXFF/fix_qeq_reaxff.cpp +++ b/src/REAXFF/fix_qeq_reaxff.cpp @@ -205,10 +205,9 @@ int FixQEqReaxFF::setmask() void FixQEqReaxFF::pertype_parameters(char *arg) { - // match either new keyword "reaxff" or old keyword "reax/c" - if (utils::strmatch(arg,"^reax..$")) { + if (utils::strmatch(arg,"^reaxff")) { reaxflag = 1; - Pair *pair = force->pair_match("^reax..",0); + Pair *pair = force->pair_match("^reaxff",0); if (!pair) error->all(FLERR,"No reaxff pair style for fix qeq/reaxff"); int tmp; diff --git a/src/REAXFF/fix_reaxff_bonds.h b/src/REAXFF/fix_reaxff_bonds.h index 659001263f..2316bfe171 100644 --- a/src/REAXFF/fix_reaxff_bonds.h +++ b/src/REAXFF/fix_reaxff_bonds.h @@ -15,7 +15,6 @@ #ifdef FIX_CLASS // clang-format off FixStyle(reaxff/bonds,FixReaxFFBonds); -FixStyle(reax/c/bonds,FixReaxFFBonds); // clang-format on #else diff --git a/src/REAXFF/fix_reaxff_species.h b/src/REAXFF/fix_reaxff_species.h index f711cdeb11..8fcbb131a9 100644 --- a/src/REAXFF/fix_reaxff_species.h +++ b/src/REAXFF/fix_reaxff_species.h @@ -15,7 +15,6 @@ #ifdef FIX_CLASS // clang-format off FixStyle(reaxff/species,FixReaxFFSpecies); -FixStyle(reax/c/species,FixReaxFFSpecies); // clang-format on #else diff --git a/src/REAXFF/pair_reaxff.h b/src/REAXFF/pair_reaxff.h index 926e0060c9..594e7e502d 100644 --- a/src/REAXFF/pair_reaxff.h +++ b/src/REAXFF/pair_reaxff.h @@ -25,7 +25,6 @@ #ifdef PAIR_CLASS // clang-format off PairStyle(reaxff,PairReaxFF); -PairStyle(reax/c,PairReaxFF); // clang-format on #else diff --git a/src/fix_deprecated.cpp b/src/fix_deprecated.cpp index 89fed1e8cf..cf2d7a3f8b 100644 --- a/src/fix_deprecated.cpp +++ b/src/fix_deprecated.cpp @@ -54,6 +54,12 @@ FixDeprecated::FixDeprecated(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, } else if (my_style == "mscg") { if (lmp->comm->me == 0) utils::logmesg(lmp, "\nThe MSCG package has been removed from LAMMPS.\n\n"); + } else if (utils::strmatch(my_style, "^reax/c/bonds")) { + if (lmp->comm->me == 0) + utils::logmesg(lmp, "\nFix style 'reax/c/bonds' has been renamed to 'reaxff/bonds'.\n\n"); + } else if (utils::strmatch(my_style, "^reax/c/species")) { + if (lmp->comm->me == 0) + utils::logmesg(lmp, "\nFix style 'reax/c/species' has been renamed to 'reaxff/species'.\n\n"); } error->all(FLERR, "This fix style is no longer available"); } diff --git a/src/fix_deprecated.h b/src/fix_deprecated.h index 9e9d369d28..53b7d7a306 100644 --- a/src/fix_deprecated.h +++ b/src/fix_deprecated.h @@ -19,7 +19,8 @@ FixStyle(ave/spatial,FixDeprecated); FixStyle(ave/spatial/sphere,FixDeprecated); FixStyle(lb/pc,FixDeprecated); FixStyle(lb/rigid/pc/sphere,FixDeprecated); -FixStyle(client/md,FixDeprecated); +FixStyle(reax/c/bonds,FixDeprecated); +FixStyle(reax/c/species,FixDeprecated); // clang-format on #else diff --git a/src/pair_deprecated.cpp b/src/pair_deprecated.cpp index db05cd1e06..298fc26fd0 100644 --- a/src/pair_deprecated.cpp +++ b/src/pair_deprecated.cpp @@ -48,6 +48,9 @@ void PairDeprecated::settings(int, char **) utils::logmesg(lmp, "\nPair style 'reax' has been removed from LAMMPS " "after the 12 December 2018 version\n\n"); + } else if (utils::strmatch(my_style, "^reax/c")) { + if (lmp->comm->me == 0) + utils::logmesg(lmp, "\nPair style 'reax/c' has been renamed to 'reaxff'\n\n"); } else if (my_style == "mesont/tpm") { if (lmp->comm->me == 0) utils::logmesg(lmp, diff --git a/src/pair_deprecated.h b/src/pair_deprecated.h index c4753e7bbf..1a705c9051 100644 --- a/src/pair_deprecated.h +++ b/src/pair_deprecated.h @@ -15,6 +15,7 @@ // clang-format off PairStyle(DEPRECATED,PairDeprecated); PairStyle(reax,PairDeprecated); +PairStyle(reax/c,PairDeprecated); PairStyle(mesont/tpm,PairDeprecated); // clang-format on #else