From af61224f4d621465dd4298c0f38521a9319c5dcd Mon Sep 17 00:00:00 2001 From: Erjie Wu <110683255+ErjieWu@users.noreply.github.com> Date: Sat, 4 Jan 2025 19:56:34 +0800 Subject: [PATCH] Update cal_gdmx.cpp --- source/module_hamilt_lcao/module_deepks/cal_gdmx.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/module_hamilt_lcao/module_deepks/cal_gdmx.cpp b/source/module_hamilt_lcao/module_deepks/cal_gdmx.cpp index 9f40c7d3c3..4dc151af64 100644 --- a/source/module_hamilt_lcao/module_deepks/cal_gdmx.cpp +++ b/source/module_hamilt_lcao/module_deepks/cal_gdmx.cpp @@ -172,9 +172,9 @@ void LCAO_Deepks::cal_gdmx(const std::vector>& dm, * overlap_1->get_value(row_indexes[iw1], ib + m1) * *dm_current; //() - accessor[i][iat][inl][m1][m2] - += grad_overlap_2[i]->get_value(col_indexes[iw2], ib + m1) - * overlap_1->get_value(row_indexes[iw1], ib + m2) * *dm_current; + accessor[i][iat][inl][m2][m1] + += grad_overlap_2[i]->get_value(col_indexes[iw2], ib + m2) + * overlap_1->get_value(row_indexes[iw1], ib + m1) * *dm_current; // () = -() @@ -184,9 +184,9 @@ void LCAO_Deepks::cal_gdmx(const std::vector>& dm, //() = -() - accessor[i][ibt2][inl][m1][m2] - -= grad_overlap_2[i]->get_value(col_indexes[iw2], ib + m1) - * overlap_1->get_value(row_indexes[iw1], ib + m2) * *dm_current; + accessor[i][ibt2][inl][m2][m1] + -= grad_overlap_2[i]->get_value(col_indexes[iw2], ib + m2) + * overlap_1->get_value(row_indexes[iw1], ib + m1) * *dm_current; } } }