From b1de9e61a2ba9a309b130ac20fe2169bb0ce543a Mon Sep 17 00:00:00 2001 From: shiruosong <95087033+shiruosong@users.noreply.github.com> Date: Wed, 28 Feb 2024 05:33:43 +0800 Subject: [PATCH] fix_dplr.cpp set atom->image when pre_force (#3345) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The atom->image of the wannier centroid should be set to the same as its real counterpart when assigning the position. --------- Co-authored-by: Yifan Li李一帆 --- source/lmp/fix_dplr.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/lmp/fix_dplr.cpp b/source/lmp/fix_dplr.cpp index 14d966a044..57bbd5765a 100644 --- a/source/lmp/fix_dplr.cpp +++ b/source/lmp/fix_dplr.cpp @@ -522,6 +522,7 @@ void FixDPLR::pre_force(int vflag) { // int res_idx = sort_fwd_map[sel_fwd[idx0]]; int res_idx = sel_fwd[idx0]; // int ret_idx = dpl_bwd[res_idx]; + atom->image[idx1] = atom->image[idx0]; for (int dd = 0; dd < 3; ++dd) { x[idx1][dd] = x[idx0][dd] + tensor[res_idx * 3 + dd] * dist_unit_cvt_factor;