Skip to content

Commit

Permalink
use cached rotation matrices
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpintarelli committed Jul 8, 2024
1 parent 4c55550 commit 5fc440e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/density/density.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@ Density::generate(K_point_set const& ks__, bool symmetrize__, bool add_core__, b

if (occupation_matrix_) {
/* all symmetrization is done in the occupation_matrix class */
symmetrize_occupation_matrix(*occupation_matrix_);
symmetrize_occupation_matrix(*occupation_matrix_, ctx_.rotm());
}

/* compare with reference density matrix */
Expand Down
4 changes: 2 additions & 2 deletions src/symmetry/symmetrize_occupation_matrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
namespace sirius {

inline void
symmetrize_occupation_matrix(Occupation_matrix& om__)
symmetrize_occupation_matrix(Occupation_matrix& om__, std::vector<mdarray<double, 2>> const& rotm__)
{
PROFILE("sirius::symmetrize_occupation_matrix");
auto& ctx = om__.ctx();
Expand Down Expand Up @@ -61,7 +61,7 @@ symmetrize_occupation_matrix(Occupation_matrix& om__)
for (int isym = 0; isym < sym.size(); isym++) {
int pr = sym[isym].spg_op.proper;
auto eang = sym[isym].spg_op.euler_angles;
auto rotm = sht::rotation_matrix<double>(4, eang, pr);
auto& rotm = rotm__[isym];
auto spin_rot_su2 = rotation_matrix_su2(sym[isym].spin_rotation);

int iap = sym[isym].spg_op.inv_sym_atom[ia];
Expand Down

0 comments on commit 5fc440e

Please # to comment.