Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions source/lmp/compute_deeptensor_atom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions source/lmp/fix_dplr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 9 additions & 1 deletion source/lmp/pair_deepmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<double> std_f;
#ifdef HIGH_PREC
Expand Down Expand Up @@ -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;
Expand Down