Skip to content

Commit

Permalink
Fix Wannier90 method.tb
Browse files Browse the repository at this point in the history
  • Loading branch information
JosePizarro3 committed Nov 13, 2023
1 parent 1bc2f1c commit 712e206
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions electronicparsers/wannier90/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,10 @@ def parse_hoppings(self):
return
self.hr_parser.mainfile = hr_files[0]

# Assuming method.projection is parsed before
# Assuming method.tb is parsed before
sec_scc = self.archive.run[-1].calculation[-1]
sec_hopping_matrix = sec_scc.m_create(HoppingMatrix)
sec_hopping_matrix.n_orbitals = self.archive.run[-1].method[-1].projection.wannier.n_projected_orbitals
sec_hopping_matrix.n_orbitals = self.archive.run[-1].method[-1].tb.wannier.n_projected_orbitals
deg_factors = self.hr_parser.get('degeneracy_factors', [])
if deg_factors is not None:
sec_hopping_matrix.n_wigner_seitz_points = deg_factors[1]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_wannier90parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_lco(parser):
assert sec_method.k_mesh.n_points == 343
assert (sec_method.k_mesh.points[303] == np.array([0.85714, 0.14286, 0.28571])).all()
assert (sec_method.k_mesh.grid == np.array([7, 7, 7])).all()
sec_wannier = sec_method.projection.wannier
sec_wannier = sec_method.tb.wannier
assert sec_wannier.n_projected_orbitals == 1
assert sec_wannier.n_bands == 5
assert sec_wannier.is_maximally_localized is True
Expand Down

0 comments on commit 712e206

Please sign in to comment.