diff --git a/src/nomad_parser_wannier90/parsers/win_parser.py b/src/nomad_parser_wannier90/parsers/win_parser.py index 386b81d..6960de8 100644 --- a/src/nomad_parser_wannier90/parsers/win_parser.py +++ b/src/nomad_parser_wannier90/parsers/win_parser.py @@ -161,7 +161,7 @@ def get_branch_label_and_atom_indices( atom: Union[str, int], atomic_cell: AtomicCell, units: str, - ) -> tuple[Optional[str], list[int]]: + ) -> tuple[str, list]: """ Gets the branch label and the atom indices for the child model system. @@ -179,8 +179,8 @@ def get_branch_label_and_atom_indices( return '', [atom] # 3 different cases to define in `win` - symbols = '' - indices = [] + symbols: list[str] = [] + indices: list[int] = [] # If the atom is not a chemical element, we use the `_convert_position` method resolution for it, joining the `symbols` into a long string if atom.startswith('f='): # fractional coordinates indices, symbols = self._get_f_information( @@ -226,7 +226,7 @@ def populate_orbitals_state( return '', [atom] # Initial check for the `atom` and their `indices` - indices = [] + indices: list[int] = [] if atom.startswith('f='): indices, _ = self._get_f_information( atom=atom, atomic_cell=atomic_cell, units=units diff --git a/tests/test_parser.py b/tests/test_parser.py index ba483bd..7892524 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -210,6 +210,7 @@ def test_minimal_Pt_Vikrant(parser): assert simulation.model_method[0].m_def.name == 'Wannier' wannier = simulation.model_method[0] assert wannier.is_maximally_localized + # 's', 'p', 'd' deg orbitals used for all 4 Pt -> 4 * 3 = 12 orbitals * 3 Pt atoms per unit cell = 36 assert wannier.n_orbitals == 36 assert wannier.n_bloch_bands == 240 assert np.isclose(wannier.energy_window_inner.magnitude, [8.80301, 11.80301]).all()