def test_get_corrections_dict(self): compat = MaterialsProjectCompatibility() ggacompat = MaterialsProjectCompatibility("GGA") #Correct parameters entry = ComputedEntry( 'Fe2O3', -1, 0.0, parameters={ 'is_hubbard': True, 'hubbards': { 'Fe': 5.3, 'O': 0 }, 'run_type': 'GGA+U', 'potcar_symbols': ['PAW_PBE Fe_pv 06Sep2000', 'PAW_PBE O 08Apr2002'] }) c = compat.get_corrections_dict(entry) self.assertAlmostEqual(c["MP Gas Correction"], -2.10687) self.assertAlmostEqual(c["MP Advanced Correction"], -5.466) entry.parameters["is_hubbard"] = False del entry.parameters["hubbards"] c = ggacompat.get_corrections_dict(entry) self.assertNotIn("MP Advanced Correction", c)
def test_get_corrections_dict(self): compat = MaterialsProjectCompatibility() ggacompat = MaterialsProjectCompatibility("GGA") #Correct parameters entry = ComputedEntry( 'Fe2O3', -1, 0.0, parameters={'is_hubbard': True, 'hubbards': {'Fe': 5.3, 'O': 0}, 'run_type': 'GGA+U', 'potcar_symbols': ['PAW_PBE Fe_pv 06Sep2000', 'PAW_PBE O 08Apr2002']}) c = compat.get_corrections_dict(entry) self.assertAlmostEqual(c["MP Gas Correction"], -2.10687) self.assertAlmostEqual(c["MP Advanced Correction"], -5.466) entry.parameters["is_hubbard"] = False del entry.parameters["hubbards"] c = ggacompat.get_corrections_dict(entry) self.assertNotIn("MP Advanced Correction", c)
def test_get_corrections_dict(self): compat = MaterialsProjectCompatibility(check_potcar_hash=False) ggacompat = MaterialsProjectCompatibility("GGA", check_potcar_hash=False) #Correct parameters entry = ComputedEntry( 'Fe2O3', -1, 0.0, parameters={'is_hubbard': True, 'hubbards': {'Fe': 5.3, 'O': 0}, 'run_type': 'GGA+U', 'potcar_spec': [{'titel':'PAW_PBE Fe_pv 06Sep2000', 'hash': '994537de5c4122b7f1b77fb604476db4'}, {'titel': 'PAW_PBE O 08Apr2002', 'hash': "7a25bc5b9a5393f46600a4939d357982"}]}) c = compat.get_corrections_dict(entry) self.assertAlmostEqual(c["MP Anion Correction"], -2.10687) self.assertAlmostEqual(c["MP Advanced Correction"], -5.466) entry.parameters["is_hubbard"] = False del entry.parameters["hubbards"] c = ggacompat.get_corrections_dict(entry) self.assertNotIn("MP Advanced Correction", c)