Skip to content

Commit af9c4c2

Browse files
committed
Minor oxi state fix
1 parent 3819efc commit af9c4c2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

doped/core.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1421,7 +1421,9 @@ def _guess_and_set_struct_oxi_states(structure):
14211421
"""
14221422
if len(structure.composition.elements) == 1:
14231423
oxi_dec_structure = structure.copy() # don't modify original structure
1424-
oxi_dec_structure.add_oxidation_state_by_element({str(structure.composition.elements[0]): 0})
1424+
oxi_dec_structure.add_oxidation_state_by_element(
1425+
{next(iter(structure.composition.elements)).symbol: 0}
1426+
)
14251427
return oxi_dec_structure
14261428

14271429
for symm_tol in [0.1, 0]: # default, then with no symmetry

0 commit comments

Comments
 (0)