From b4eae9c34499a860e8e8f6f5a11261d10af1f62f Mon Sep 17 00:00:00 2001 From: ErjieWu Date: Sat, 4 Jan 2025 16:58:47 +0800 Subject: [PATCH] Update cal_gdmx and cal_gdmepsl. --- .../module_deepks/cal_gdmepsl.cpp | 11 -------- .../module_deepks/cal_gdmx.cpp | 28 ++----------------- 2 files changed, 2 insertions(+), 37 deletions(-) diff --git a/source/module_hamilt_lcao/module_deepks/cal_gdmepsl.cpp b/source/module_hamilt_lcao/module_deepks/cal_gdmepsl.cpp index d63c7fcbb1..ecba99b1f3 100644 --- a/source/module_hamilt_lcao/module_deepks/cal_gdmepsl.cpp +++ b/source/module_hamilt_lcao/module_deepks/cal_gdmepsl.cpp @@ -188,17 +188,6 @@ void LCAO_Deepks::cal_gdmepsl(const std::vector>& dm, * grad_overlap_1[jpol]->get_value(row_indexes[iw1], ib + m2) * r1[ipol]); - // gdmepsl.index_put_({mm, inl, m2, m1}, - // ucell.lat0 * *dm_current - // * (grad_overlap_2[jpol]->get_value(col_indexes[iw2], ib + - // m2) - // * overlap_1->get_value(row_indexes[iw1], ib + m1) - // * r0[ipol])); - // gdmepsl.index_put_({mm, inl, m2, m1}, - // ucell.lat0 * *dm_current - // * (overlap_2->get_value(col_indexes[iw2], ib + m1) - // * grad_overlap_1[jpol]->get_value(row_indexes[iw1], ib + m2) - // * r1[ipol])); mm++; } } diff --git a/source/module_hamilt_lcao/module_deepks/cal_gdmx.cpp b/source/module_hamilt_lcao/module_deepks/cal_gdmx.cpp index 07a682b53d..9f40c7d3c3 100644 --- a/source/module_hamilt_lcao/module_deepks/cal_gdmx.cpp +++ b/source/module_hamilt_lcao/module_deepks/cal_gdmx.cpp @@ -167,47 +167,23 @@ void LCAO_Deepks::cal_gdmx(const std::vector>& dm, for (int i = 0; i < 3; i++) { //() - // gdmx.index_put_({i, iat, inl, m1, m2}, - // grad_overlap_2[i]->get_value(col_indexes[iw2], ib + m2) - // * 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 + m2) * overlap_1->get_value(row_indexes[iw1], ib + m1) * *dm_current; //() - // gdmx.index_put_({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); - // gdmx[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; 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; // () = -() gdmx.index_put_({i, ibt2, inl, m1, - // m2}, - // -grad_overlap_2[i]->get_value(col_indexes[iw2], ib + m2) - // * overlap_1->get_value(row_indexes[iw1], ib + m1) * - // *dm_current); + // chi_mu|alpha_m>) accessor[i][ibt2][inl][m1][m2] -= grad_overlap_2[i]->get_value(col_indexes[iw2], ib + m2) * overlap_1->get_value(row_indexes[iw1], ib + m1) * *dm_current; //() = -() - // gdmx.index_put_({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); - // gdmx[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; + //chi_nu|alpha_m'>) 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;