@@ -300,7 +300,7 @@ def _parse_initial_charges_and_moments(self) -> None:
300
300
magmoms = None
301
301
else :
302
302
charges [ll ] = float (inp [3 ])
303
- magmoms [ll ] = float (inp [2 ])
303
+ magmoms [ll ] = float (inp [2 ]) # type:ignore[index]
304
304
305
305
self ._cache ["initial_charges" ] = charges
306
306
self ._cache ["initial_magnetic_moments" ] = magmoms
@@ -476,7 +476,7 @@ def _parse_structure(self) -> Structure | Molecule:
476
476
477
477
site_properties : dict [str , Sequence [Any ]] = {}
478
478
if len (velocities ) > 0 :
479
- site_properties ["velocity" ] = np .array (velocities )
479
+ site_properties ["velocity" ] = np .array (velocities ) # type:ignore [assignment]
480
480
481
481
results = self .results
482
482
site_prop_keys = {
@@ -641,14 +641,14 @@ def stresses(self) -> np.ndarray | None:
641
641
stresses = []
642
642
for line in self .lines [line_start : line_start + self .n_atoms ]:
643
643
xx , yy , zz , xy , xz , yz = (float (d ) for d in line .split ()[2 :8 ])
644
- stresses .append (Tensor .from_voigt ([xx , yy , zz , yz , xz , xy ]))
644
+ stresses .append (Tensor .from_voigt ([xx , yy , zz , yz , xz , xy ])) # type:ignore [arg-type]
645
645
646
646
return np .array (stresses ) * EV_PER_A3_TO_KBAR
647
647
648
648
@property
649
649
def stress (
650
650
self ,
651
- ) -> Sequence [ Sequence [ float , float , float ], Sequence [ float , float , float ], Sequence [ float , float , float ]] | None :
651
+ ) -> np . ndarray | None :
652
652
"""The stress from the aims.out file and convert to kBar."""
653
653
line_start = self .reverse_search_for (
654
654
["Analytical stress tensor - Symmetrized" , "Numerical stress tensor" ]
@@ -680,7 +680,7 @@ def energy(self) -> float:
680
680
return float (self .lines [line_ind ].split ()[5 ])
681
681
682
682
@property
683
- def dipole (self ) -> tuple [ float , float , float ] | None :
683
+ def dipole (self ) -> np . ndarray | None :
684
684
"""The electric dipole moment from the aims.out file."""
685
685
line_start = self .reverse_search_for (["Total dipole moment [eAng]" ])
686
686
if line_start == LINE_NOT_FOUND :
@@ -692,7 +692,7 @@ def dipole(self) -> tuple[float, float, float] | None:
692
692
@property
693
693
def dielectric_tensor (
694
694
self ,
695
- ) -> Sequence [ Sequence [ float , float , float ], Sequence [ float , float , float ], Sequence [ float , float , float ]] | None :
695
+ ) -> np . ndarray | None :
696
696
"""The dielectric tensor from the aims.out file."""
697
697
line_start = self .reverse_search_for (["PARSE DFPT_dielectric_tensor" ])
698
698
if line_start == LINE_NOT_FOUND :
@@ -705,7 +705,7 @@ def dielectric_tensor(
705
705
return np .array ([np .fromstring (line , sep = " " ) for line in lines ])
706
706
707
707
@property
708
- def polarization (self ) -> tuple [ float , float , float ] | None :
708
+ def polarization (self ) -> np . ndarray | None :
709
709
"""The polarization vector from the aims.out file."""
710
710
line_start = self .reverse_search_for (["| Cartesian Polarization" ])
711
711
if line_start == LINE_NOT_FOUND :
0 commit comments