@@ -454,7 +454,7 @@ def ground_state_term_symbol(self):
454
454
return J_sorted_terms [- 1 ][0 ]
455
455
456
456
def __eq__ (self , other : object ) -> bool :
457
- return isinstance (other , Element ) and self .Z == other .Z
457
+ return isinstance (self , Element ) and isinstance ( other , Element ) and self .Z == other .Z
458
458
459
459
def __hash__ (self ) -> int :
460
460
return self .Z
@@ -895,7 +895,12 @@ class Species(MSONable, Stringify):
895
895
896
896
STRING_MODE = "SUPERSCRIPT"
897
897
898
- def __init__ (self , symbol : SpeciesLike , oxidation_state : float | None = None , spin : float | None = None ) -> None :
898
+ def __init__ (
899
+ self ,
900
+ symbol : SpeciesLike ,
901
+ oxidation_state : float | None = None ,
902
+ spin : float | None = None ,
903
+ ) -> None :
899
904
"""
900
905
Args:
901
906
symbol (str): Element symbol optionally incl. oxidation state. E.g. Fe, Fe2+, O2-.
@@ -1138,7 +1143,9 @@ def get_shannon_radius(
1138
1143
return data [f"{ radius_type } _radius" ]
1139
1144
1140
1145
def get_crystal_field_spin (
1141
- self , coordination : Literal ["oct" , "tet" ] = "oct" , spin_config : Literal ["low" , "high" ] = "high"
1146
+ self ,
1147
+ coordination : Literal ["oct" , "tet" ] = "oct" ,
1148
+ spin_config : Literal ["low" , "high" ] = "high" ,
1142
1149
) -> float :
1143
1150
"""Calculate the crystal field spin based on coordination and spin
1144
1151
configuration. Only works for transition metal species.
0 commit comments