diff --git a/source/lmp/compute_deeptensor_atom.cpp b/source/lmp/compute_deeptensor_atom.cpp index e29897266a..6030dee3fb 100644 --- a/source/lmp/compute_deeptensor_atom.cpp +++ b/source/lmp/compute_deeptensor_atom.cpp @@ -66,12 +66,16 @@ void ComputeDeeptensorAtom::init() { // need an occasional full neighbor list +#if LAMMPS_VERSION_NUMBER>=20220324 + neighbor->add_request(this, NeighConst::REQ_FULL | NeighConst::REQ_OCCASIONAL); +#else int irequest = neighbor->request(this,instance_me); neighbor->requests[irequest]->half = 0; neighbor->requests[irequest]->pair = 0; neighbor->requests[irequest]->compute = 1; neighbor->requests[irequest]->full = 1; neighbor->requests[irequest]->occasional = 1; +#endif } void ComputeDeeptensorAtom::init_list(int /*id*/, NeighList *ptr) diff --git a/source/lmp/fix_dplr.cpp b/source/lmp/fix_dplr.cpp index 1d2323a027..21f0179625 100644 --- a/source/lmp/fix_dplr.cpp +++ b/source/lmp/fix_dplr.cpp @@ -442,7 +442,11 @@ void FixDPLR::post_force(int vflag) // backward communication of fcorr dfcorr_buff.resize(dfcorr.size()); copy(dfcorr.begin(), dfcorr.end(), dfcorr_buff.begin()); +#if LAMMPS_VERSION_NUMBER>=20220324 + comm->reverse_comm(this,3); +#else comm->reverse_comm_fix(this,3); +#endif copy(dfcorr_buff.begin(), dfcorr_buff.end(), dfcorr.begin()); // // check and print // cout << "-------------------- fix/dplr: post force " << endl; diff --git a/source/lmp/pair_deepmd.cpp b/source/lmp/pair_deepmd.cpp index 17ea766ae2..096f379ca0 100644 --- a/source/lmp/pair_deepmd.cpp +++ b/source/lmp/pair_deepmd.cpp @@ -558,7 +558,11 @@ void PairDeepMD::compute(int eflag, int vflag) int rank = comm->me; // std force if (newton_pair) { - comm->reverse_comm_pair(this); +#if LAMMPS_VERSION_NUMBER>=20220324 + comm->reverse_comm(this); +#else + comm->reverse_comm_pair(this); +#endif } vector std_f; #ifdef HIGH_PREC @@ -1035,10 +1039,14 @@ void PairDeepMD::coeff(int narg, char **arg) void PairDeepMD::init_style() { +#if LAMMPS_VERSION_NUMBER>=20220324 + neighbor->add_request(this, NeighConst::REQ_FULL); +#else int irequest = neighbor->request(this,instance_me); neighbor->requests[irequest]->half = 0; neighbor->requests[irequest]->full = 1; // neighbor->requests[irequest]->newton = 2; +#endif if (out_each == 1){ int ntotal = atom->natoms; int nprocs = comm->nprocs;