Skip to content

Commit

Permalink
fix_dplr.cpp set atom->image when pre_force (#3345)
Browse files Browse the repository at this point in the history
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李一帆 <[email protected]>
  • Loading branch information
shiruosong and Yi-FanLi authored Feb 27, 2024
1 parent 854d998 commit b1de9e6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions source/lmp/fix_dplr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b1de9e6

Please sign in to comment.