diff --git a/src/FEP/compute_fep.cpp b/src/FEP/compute_fep.cpp index 70779d1cb2..8b062d2c4a 100644 --- a/src/FEP/compute_fep.cpp +++ b/src/FEP/compute_fep.cpp @@ -238,8 +238,7 @@ void ComputeFEP::init() // detect if package gpu is present - int ifixgpu = modify->find_fix("package_gpu"); - if (ifixgpu >= 0) fixgpu = modify->fix[ifixgpu]; + fixgpu = modify->get_fix_by_id("package_gpu"); if (comm->me == 0) { auto mesg = fmt::format("FEP settings ...\n temperature = {:f}\n", temp_fep); diff --git a/src/FEP/compute_fep_ta.cpp b/src/FEP/compute_fep_ta.cpp index 817576a829..9ab848f6db 100644 --- a/src/FEP/compute_fep_ta.cpp +++ b/src/FEP/compute_fep_ta.cpp @@ -133,15 +133,15 @@ void ComputeFEPTA::init() // detect if package gpu is present - int ifixgpu = modify->find_fix("package_gpu"); - if (ifixgpu >= 0) fixgpu = modify->fix[ifixgpu]; + fixgpu = modify->get_fix_by_id("package_gpu"); - if (comm->me == 0) { - auto mesg = fmt::format("FEP/TA settings ...\n temperature = {:f}\n", temp_fep); - mesg += fmt::format(" scale factor = {:f}\n", scale_factor); - mesg += fmt::format(" tail {}\n", (tailflag ? "yes" : "no")); - utils::logmesg(lmp, mesg); - } + if (comm->me == 0) + utils::logmesg(lmp, + "FEP/TA settings ...\n" + " temperature = {:f}\n" + " scale factor = {:f}\n" + " tail {}\n", + temp_fep, scale_factor, tailflag ? "yes" : "no"); } /* ---------------------------------------------------------------------- */