From 52d8f2f485b5af6919e2ed4c4bdca34038a95eef Mon Sep 17 00:00:00 2001 From: Jose Pizarro Date: Mon, 13 Nov 2023 10:46:57 +0100 Subject: [PATCH] Fix Wannier90 method.tb --- electronicparsers/wannier90/parser.py | 4 ++-- tests/test_wannier90parser.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/electronicparsers/wannier90/parser.py b/electronicparsers/wannier90/parser.py index 86f4e1e4..b9821df3 100644 --- a/electronicparsers/wannier90/parser.py +++ b/electronicparsers/wannier90/parser.py @@ -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] diff --git a/tests/test_wannier90parser.py b/tests/test_wannier90parser.py index 3f748927..80464ce4 100644 --- a/tests/test_wannier90parser.py +++ b/tests/test_wannier90parser.py @@ -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