Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pymatgen/analysis/defects/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -706,9 +706,9 @@ def name(self) -> str:
def defect_structure(self) -> Structure:
"""Returns the defect structure."""
struct: Structure = self.structure.copy()
# use the highest value oxidation state among the two most popular ones
# use the highest value oxidation state among the most popular ones
# found in the ICSD
inter_states = self.site.specie.icsd_oxidation_states[:2]
inter_states = self.site.specie.common_oxidation_states
if len(inter_states) == 0:
_logger.warning(
"No oxidation states found for %s. "
Expand Down
4 changes: 2 additions & 2 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ def test_interstitial(gan_struct) -> None:
inter_fpos = [0, 0, 0.75]
n_site = PeriodicSite(Specie("N"), inter_fpos, s.lattice)
inter = Interstitial(s, n_site)
assert inter.oxi_state == 3
assert inter.get_charge_states() == [-1, 0, 1, 2, 3, 4]
assert inter.oxi_state == 5
assert inter.get_charge_states() == [-1, 0, 1, 2, 3, 4, 5, 6]
assert np.allclose(inter.defect_structure[0].frac_coords, inter_fpos)
sc = inter.get_supercell_structure()
assert sc.formula == "Ga64 N65"
Expand Down
Loading