Skip to content

Commit

Permalink
update correction values
Browse files Browse the repository at this point in the history
  • Loading branch information
rkingsbury committed Apr 30, 2021
1 parent cb9854d commit c038804
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 27 deletions.
36 changes: 18 additions & 18 deletions pymatgen/entries/MP2020Compatibility.yaml
Expand Up @@ -12,7 +12,7 @@ Corrections:
Fe: -2.256
Co: -1.638
Ni: -2.541
W: -4.437
W: -4.438
Mo: -3.202
F:
V: -1.7
Expand All @@ -21,24 +21,24 @@ Corrections:
Fe: -2.256
Co: -1.638
Ni: -2.541
W: -4.437
W: -4.438
Mo: -3.202
CompositionCorrections:
# Composition-based corrections applied to any compound containing
# these species as anions
oxide: -0.688
peroxide: -0.466
oxide: -0.687
peroxide: -0.465
superoxide: -0.161
S: -0.504
S: -0.503
F: -0.462
Cl: -0.614
Br: -0.535
Br: -0.534
I: -0.379
N: -0.359
N: -0.361
Se: -0.472
Si: 0.072
Si: 0.071
Sb: -0.192
Te: -0.42
Te: -0.422
H: -0.179
ozonide: 0
Uncertainties:
Expand All @@ -51,30 +51,30 @@ Uncertainties:
Fe: 0.0101
Co: 0.006
Ni: 0.0107
W: 0.0254
Mo: 0.009
W: 0.0253
Mo: 0.0089
F:
V: 0.0064
Cr: 0.0108
Mn: 0.0053
Fe: 0.0101
Co: 0.006
Ni: 0.0107
W: 0.0254
Mo: 0.009
W: 0.0253
Mo: 0.0089
CompositionCorrections:
oxide: 0.002
peroxide: 0.0174
peroxide: 0.0172
superoxide: 0.0075
S: 0.0094
F: 0.0027
S: 0.0093
F: 0.0026
Cl: 0.0018
Br: 0.0026
I: 0.0055
N: 0.0094
N: 0.0093
Se: 0.0341
Si: 0.0165
Sb: 0.0089
Te: 0.0264
Te: 0.0262
H: 0.0013
ozonide: 0
Binary file modified pymatgen/entries/calc_compounds.json.gz
Binary file not shown.
Binary file modified pymatgen/entries/exp_compounds.json.gz
Binary file not shown.
18 changes: 9 additions & 9 deletions pymatgen/entries/tests/test_compatibility.py
Expand Up @@ -683,7 +683,7 @@ def test_process_entry(self):

def test_correction_values(self):
# test_corrections
self.assertAlmostEqual(self.compat.process_entry(self.entry1).correction, -2.256 * 2 - 0.688 * 3)
self.assertAlmostEqual(self.compat.process_entry(self.entry1).correction, -2.256 * 2 - 0.687 * 3)

entry = ComputedEntry(
"FeF3",
Expand All @@ -710,7 +710,7 @@ def test_correction_values(self):
# Check actual correction
self.assertAlmostEqual(self.compat.process_entry(entry).correction, -0.462 * 3 + -2.256)

self.assertAlmostEqual(self.compat.process_entry(self.entry_sulfide).correction, -0.504)
self.assertAlmostEqual(self.compat.process_entry(self.entry_sulfide).correction, -0.503)

def test_oxdiation_by_electronegativity(self):
# make sure anion corrections are only applied when the element has
Expand Down Expand Up @@ -768,10 +768,10 @@ def test_oxdiation_by_electronegativity(self):
)

# CaSi; only correction should be Si
self.assertAlmostEqual(self.compat.process_entry(entry1).correction, 0.072 * 2)
self.assertAlmostEqual(self.compat.process_entry(entry1).correction, 0.071 * 2)

# SiO2; only corrections should be oxide
self.assertAlmostEqual(self.compat.process_entry(entry2).correction, -0.688 * 4)
self.assertAlmostEqual(self.compat.process_entry(entry2).correction, -0.687 * 4)

def test_oxdiation(self):
# make sure anion corrections are only applied when the element has
Expand Down Expand Up @@ -835,10 +835,10 @@ def test_oxdiation(self):
)

# CaSi; only correction should be Si
self.assertAlmostEqual(self.compat.process_entry(entry1).correction, 0.072 * 2)
self.assertAlmostEqual(self.compat.process_entry(entry1).correction, 0.071 * 2)

# SiO2; only corrections should be oxide
self.assertAlmostEqual(self.compat.process_entry(entry2).correction, -0.688 * 4)
self.assertAlmostEqual(self.compat.process_entry(entry2).correction, -0.687 * 4)

def test_U_values(self):
# Wrong U value
Expand Down Expand Up @@ -1045,7 +1045,7 @@ def test_energy_adjustments(self):
self.assertAlmostEqual(ea.value, -1.638 * 2)
self.assertAlmostEqual(ea.uncertainty, 0.006 * 2)
elif ea.name == "MP2020 anion correction (oxide)":
self.assertAlmostEqual(ea.value, -0.688 * 8)
self.assertAlmostEqual(ea.value, -0.687 * 8)
self.assertAlmostEqual(ea.uncertainty, 0.002 * 8)

entry.parameters["is_hubbard"] = False
Expand Down Expand Up @@ -2237,12 +2237,12 @@ def test_errors(self):
)

entry_sulfide_corrected = self.compat.process_entry(self.entry_sulfide)
self.assertAlmostEqual(entry_sulfide_corrected.correction_uncertainty, 0.0094)
self.assertAlmostEqual(entry_sulfide_corrected.correction_uncertainty, 0.0093)

entry_fluoride_corrected = self.compat.process_entry(self.entry_fluoride)
self.assertAlmostEqual(
entry_fluoride_corrected.correction_uncertainty,
sqrt((3 * 0.0027) ** 2 + 0.0101 ** 2),
sqrt((3 * 0.0026) ** 2 + 0.0101 ** 2),
)

entry_hydride_corrected = self.compat.process_entry(self.entry_hydride)
Expand Down

0 comments on commit c038804

Please sign in to comment.