From cc3eb56c130b031ec2e0756b0f349be0a5c7f27f Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Fri, 5 Jan 2024 13:12:35 -0700 Subject: [PATCH] Fix FIXME --- src/KSPACE/pair_lj_charmmfsw_coul_long.cpp | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp b/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp index c80d17e081..260c26e8aa 100644 --- a/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp +++ b/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp @@ -76,28 +76,17 @@ PairLJCharmmfswCoulLong::PairLJCharmmfswCoulLong(LAMMPS *lmp) : Pair(lmp) PairLJCharmmfswCoulLong::~PairLJCharmmfswCoulLong() { + if (copymode) return; + // switch qqr2e back from CHARMM value to LAMMPS value if (update && strcmp(update->unit_style,"real") == 0) { if ((comm->me == 0) && (force->qqr2e == force->qqr2e_charmm_real)) error->message(FLERR,"Restoring original LAMMPS coulomb energy" " conversion constant"); - // FIXME: destructor from this class resets - // - // force->qqr2e = force->qqr2e_lammps_real - // - // at end of timestep 0 causing ~E-6 errors for steps 1,2,... - // everywhere in pair_lj_charmmfsw_coul_long_kokkos when - // running kokkos with openmp (and probably with GPUs also). - // - // WORKAROUND: for now until guidance from lammps devs is to - // comment out this line here (commit to be reversed later). - - //force->qqr2e = force->qqr2e_lammps_real; + force->qqr2e = force->qqr2e_lammps_real; } - if (copymode) return; - if (allocated) { memory->destroy(setflag); memory->destroy(cutsq);