本文整理汇总了Python中pymatgen.entries.computed_entries.ComputedEntry.parameters["is_hubbard"]方法的典型用法代码示例。如果您正苦于以下问题:Python ComputedEntry.parameters["is_hubbard"]方法的具体用法?Python ComputedEntry.parameters["is_hubbard"]怎么用?Python ComputedEntry.parameters["is_hubbard"]使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pymatgen.entries.computed_entries.ComputedEntry
的用法示例。
在下文中一共展示了ComputedEntry.parameters["is_hubbard"]方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_get_corrections_dict
# 需要导入模块: from pymatgen.entries.computed_entries import ComputedEntry [as 别名]
# 或者: from pymatgen.entries.computed_entries.ComputedEntry import parameters["is_hubbard"] [as 别名]
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)
示例2: test_get_corrections_dict
# 需要导入模块: from pymatgen.entries.computed_entries import ComputedEntry [as 别名]
# 或者: from pymatgen.entries.computed_entries.ComputedEntry import parameters["is_hubbard"] [as 别名]
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)