@@ -3889,31 +3889,31 @@ def __init__(self, filename: PathLike) -> None:
3889
3889
self .data = data
3890
3890
self .phase_factors = phase_factors
3891
3891
3892
- def get_projection_on_elements (self , structure : Structure ) -> dict [Spin , list ]:
3892
+ def get_projection_on_elements (self , structure : Structure ) -> dict [Spin , list [ list [ dict [ str , float ]]] ]:
3893
3893
"""Get a dict of projections on elements.
3894
3894
3895
3895
Args:
3896
3896
structure (Structure): Input structure.
3897
3897
3898
3898
Returns:
3899
- A dict as {Spin.up : [k index][b index][{Element: values}]].
3899
+ A dict as {Spin: [band index][kpoint index][{Element: values}]].
3900
3900
"""
3901
3901
assert self .data is not None , "Data cannot be None."
3902
3902
assert self .nkpoints is not None
3903
3903
assert self .nbands is not None
3904
3904
assert self .nions is not None
3905
3905
3906
- dico : dict [Spin , list ] = {}
3906
+ elem_proj : dict [Spin , list ] = {}
3907
3907
for spin in self .data :
3908
- dico [spin ] = [[defaultdict (float ) for _ in range (self .nkpoints )] for _ in range (self .nbands )]
3908
+ elem_proj [spin ] = [[defaultdict (float ) for _ in range (self .nkpoints )] for _ in range (self .nbands )]
3909
3909
3910
3910
for iat in range (self .nions ):
3911
3911
name = structure .species [iat ].symbol
3912
3912
for spin , data in self .data .items ():
3913
3913
for kpoint , band in itertools .product (range (self .nkpoints ), range (self .nbands )):
3914
- dico [spin ][band ][kpoint ][name ] += np .sum (data [kpoint , band , iat , :])
3914
+ elem_proj [spin ][band ][kpoint ][name ] += np .sum (data [kpoint , band , iat , :])
3915
3915
3916
- return dico
3916
+ return elem_proj
3917
3917
3918
3918
def get_occupation (self , atom_index : int , orbital : str ) -> dict :
3919
3919
"""Get the occupation for a particular orbital of a particular atom.
0 commit comments