Skip to content

Commit

Permalink
Update cal_gdmx.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
ErjieWu authored Jan 4, 2025
1 parent b4eae9c commit af61224
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions source/module_hamilt_lcao/module_deepks/cal_gdmx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ void LCAO_Deepks::cal_gdmx(const std::vector<std::vector<TK>>& dm,
* overlap_1->get_value(row_indexes[iw1], ib + m1) * *dm_current;

//(<d/dX chi_nu|alpha_m'>)<chi_mu|alpha_m>
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;

// (<chi_mu|d/dX alpha_m>)<chi_nu|alpha_m'> = -(<d/dX
// chi_mu|alpha_m>)<chi_nu|alpha_m'>
Expand All @@ -184,9 +184,9 @@ void LCAO_Deepks::cal_gdmx(const std::vector<std::vector<TK>>& dm,

//(<chi_nu|d/dX alpha_m'>)<chi_mu|alpha_m> = -(<d/dX
//chi_nu|alpha_m'>)<chi_mu|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;
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;
}
}
}
Expand Down

0 comments on commit af61224

Please sign in to comment.