From dc0f496c4105b9d84e8485221ba1f5389fa13124 Mon Sep 17 00:00:00 2001 From: Duo <50307526+iProzd@users.noreply.github.com> Date: Thu, 7 Nov 2024 18:02:36 +0800 Subject: [PATCH] add #4269 --- source/api_cc/src/DeepSpinTF.cc | 2 ++ source/lmp/pair_deepmd.cpp | 1 + source/lmp/pair_deepspin.cpp | 1 + 3 files changed, 4 insertions(+) diff --git a/source/api_cc/src/DeepSpinTF.cc b/source/api_cc/src/DeepSpinTF.cc index 416fc226ff..924eb7aea5 100644 --- a/source/api_cc/src/DeepSpinTF.cc +++ b/source/api_cc/src/DeepSpinTF.cc @@ -8,6 +8,7 @@ #include "AtomMap.h" #include "common.h" #include "device.h" +#include "neigh_list.h" using namespace tensorflow; using namespace deepmd; @@ -742,6 +743,7 @@ void DeepSpinTF::compute(ENERGYVTYPE& dener, ntypes, ntypes_spin); InputNlist extend_lmp_list(extend_inum, &extend_ilist[0], &extend_numneigh[0], &extend_firstneigh[0]); + extend_lmp_list.set_mask(NEIGHMASK); std::vector fparam; std::vector aparam_; validate_fparam_aparam(nframes, (aparam_nall ? nall : nloc), fparam_, diff --git a/source/lmp/pair_deepmd.cpp b/source/lmp/pair_deepmd.cpp index 3351da2aca..9d0402ae4f 100644 --- a/source/lmp/pair_deepmd.cpp +++ b/source/lmp/pair_deepmd.cpp @@ -200,6 +200,7 @@ void PairDeepMD::compute(int eflag, int vflag) { commdata_->nswap, commdata_->sendnum, commdata_->recvnum, commdata_->firstrecv, commdata_->sendlist, commdata_->sendproc, commdata_->recvproc, &world); + lmp_list.set_mask(NEIGHMASK); deepmd_compat::InputNlist extend_lmp_list; if (single_model || multi_models_no_mod_devi) { // cvflag_atom is the right flag for the cvatom matrix diff --git a/source/lmp/pair_deepspin.cpp b/source/lmp/pair_deepspin.cpp index 8c289dcb97..aea410b284 100644 --- a/source/lmp/pair_deepspin.cpp +++ b/source/lmp/pair_deepspin.cpp @@ -209,6 +209,7 @@ void PairDeepSpin::compute(int eflag, int vflag) { commdata_->nswap, commdata_->sendnum, commdata_->recvnum, commdata_->firstrecv, commdata_->sendlist, commdata_->sendproc, commdata_->recvproc, &world); + lmp_list.set_mask(NEIGHMASK); if (single_model || multi_models_no_mod_devi) { // cvflag_atom is the right flag for the cvatom matrix if (!(eflag_atom || cvflag_atom)) {