diff --git a/src/ML-IAP/pair_mliap.cpp b/src/ML-IAP/pair_mliap.cpp index 5b569702d0..88d291a682 100644 --- a/src/ML-IAP/pair_mliap.cpp +++ b/src/ML-IAP/pair_mliap.cpp @@ -336,12 +336,17 @@ void PairMLIAP::v_tally(int i, int j, double *fij, double *rij) void PairMLIAP::init_style() { if (force->newton_pair == 0) - error->all(FLERR,"Pair style MLIAP requires newton pair on"); + error->all(FLERR, Error::NOLASTLINE, "Pair style mliap requires newton pair on"); // need a full neighbor list if (ghostneigh == 1) { - neighbor->add_request(this, NeighConst::REQ_FULL | NeighConst::REQ_GHOST); + // AK: 2025-04-07 nothing seems to be using this feature and it was leaking memory, too. + error->all(FLERR, Error::NOLASTLINE, + "Pair_style mliap does not support requesting neighbors of ghost atoms anymore.\n" + "If you have a model requiring this setting, please contact the LAMMPS developers" + + utils::errorurl(35)); + // neighbor->add_request(this, NeighConst::REQ_FULL | NeighConst::REQ_GHOST); } else { neighbor->add_request(this, NeighConst::REQ_FULL); } diff --git a/unittest/force-styles/test_mliappy_unified.cpp b/unittest/force-styles/test_mliappy_unified.cpp index a8309feb21..996d4d82d5 100644 --- a/unittest/force-styles/test_mliappy_unified.cpp +++ b/unittest/force-styles/test_mliappy_unified.cpp @@ -77,6 +77,11 @@ TEST(MliapUnified, VersusLJMelt) lammps_close(mliap); } +#if 0 + +// This setting was producing wrong results and leaking memory. +// Thus support for it was removed from LAMMPS. + TEST(MliapUnified, VersusLJMeltGhost) { const char *lmpargv[] = {"melt", "-log", "none", "-nocite"}; @@ -112,5 +117,5 @@ TEST(MliapUnified, VersusLJMeltGhost) lammps_close(ljmelt); lammps_close(mliap); } - +#endif } // namespace LAMMPS_NS