@@ -767,11 +767,12 @@ def oxi_state_guesses(
767
767
element's common oxidation states, e.g. {"V": [2,3,4,5]}
768
768
target_charge (int): the desired total charge on the structure.
769
769
Default is 0 signifying charge balance.
770
- all_oxi_states (bool): if True, an element defaults to
771
- all oxidation states in pymatgen Element.icsd_oxidation_states.
772
- Otherwise, default is Element.common_oxidation_states. Note
773
- that the full oxidation state list is *very* inclusive and
774
- can produce nonsensical results.
770
+ all_oxi_states (bool): if True, all oxidation states of an element, even rare ones, are used in the search
771
+ for guesses. However, the full oxidation state list is *very* inclusive and can produce nonsensical
772
+ results. If False, the icsd_oxidation_states list is used when present, or the common_oxidation_states
773
+ is used when icsd_oxidation_states is not present. These oxidation states lists comprise more
774
+ commonly occurring oxidation states and results in more reliable guesses, albeit at the cost of
775
+ missing some uncommon situations. The default is False.
775
776
max_sites (int): if possible, will reduce Compositions to at most
776
777
this many sites to speed up oxidation state guesses. If the
777
778
composition cannot be reduced to this many sites a ValueError
@@ -859,11 +860,12 @@ def add_charges_from_oxi_state_guesses(
859
860
element's common oxidation states, e.g. {"V": [2, 3, 4, 5]}
860
861
target_charge (float): the desired total charge on the structure.
861
862
Default is 0 signifying charge balance.
862
- all_oxi_states (bool): If True, an element defaults to
863
- all oxidation states in pymatgen Element.icsd_oxidation_states.
864
- Otherwise, default is Element.common_oxidation_states. Note
865
- that the full oxidation state list is *very* inclusive and
866
- can produce nonsensical results.
863
+ all_oxi_states (bool): if True, all oxidation states of an element, even rare ones, are used in the search
864
+ for guesses. However, the full oxidation state list is *very* inclusive and can produce nonsensical
865
+ results. If False, the icsd_oxidation_states list is used when present, or the common_oxidation_states
866
+ is used when icsd_oxidation_states is not present. These oxidation states lists comprise more
867
+ commonly occurring oxidation states and results in more reliable guesses, albeit at the cost of
868
+ missing some uncommon situations. The default is False.
867
869
max_sites (int): If possible, will reduce Compositions to at most
868
870
this many sites to speed up oxidation state guesses. If the
869
871
composition cannot be reduced to this many sites a ValueError
@@ -916,15 +918,15 @@ def _get_oxi_state_guesses(
916
918
calculation of the most likely oxidation states
917
919
918
920
Args:
919
- oxi_states_override (dict): dict of str->list to override an
920
- element's common oxidation states, e.g. {"V": [2,3,4,5]}
921
- target_charge (float): the desired total charge on the structure.
922
- Default is 0 signifying charge balance.
923
- all_oxi_states (bool): if True, an element defaults to
924
- all oxidation states in pymatgen Element. icsd_oxidation_states.
925
- Otherwise, default is Element.common_oxidation_states. Note
926
- that the full oxidation state list is *very* inclusive and
927
- can produce nonsensical results .
921
+ oxi_states_override (dict): dict of str->list to override an element's common oxidation states, e.g.
922
+ {"V": [2,3,4,5]}.
923
+ target_charge (float): the desired total charge on the structure. Default is 0 signifying charge balance.
924
+ all_oxi_states (bool): if True, all oxidation states of an element, even rare ones, are used in the search
925
+ for guesses. However, the full oxidation state list is *very* inclusive and can produce nonsensical
926
+ results. If False, the icsd_oxidation_states list is used when present, or the common_oxidation_states
927
+ is used when icsd_oxidation_states is not present. These oxidation states lists comprise more
928
+ commonly occurring oxidation states and results in more reliable guesses, albeit at the cost of
929
+ missing some uncommon situations. The default is False .
928
930
max_sites (int): if possible, will reduce Compositions to at most
929
931
this many sites to speed up oxidation state guesses. If the
930
932
composition cannot be reduced to this many sites a ValueError
@@ -980,7 +982,7 @@ def _get_oxi_state_guesses(
980
982
elif all_oxi_states :
981
983
oxids = Element (el ).oxidation_states
982
984
else :
983
- oxids = Element (el ).icsd_oxidation_states or Element (el ).oxidation_states
985
+ oxids = Element (el ).icsd_oxidation_states or Element (el ).common_oxidation_states
984
986
985
987
# Get all possible combinations of oxidation states
986
988
# and sum each combination
0 commit comments