当前位置: 首页>>代码示例>>Python>>正文


Python MPRester.get_materials_id_from_task_id方法代码示例

本文整理汇总了Python中pymatgen.MPRester.get_materials_id_from_task_id方法的典型用法代码示例。如果您正苦于以下问题:Python MPRester.get_materials_id_from_task_id方法的具体用法?Python MPRester.get_materials_id_from_task_id怎么用?Python MPRester.get_materials_id_from_task_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pymatgen.MPRester的用法示例。


在下文中一共展示了MPRester.get_materials_id_from_task_id方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: submit_tests

# 需要导入模块: from pymatgen import MPRester [as 别名]
# 或者: from pymatgen.MPRester import get_materials_id_from_task_id [as 别名]
def submit_tests(names=None, params=None):
    sma = SubmissionMongoAdapter.auto_load()

    # note: TiO2 is duplicated twice purposely, duplicate check should catch this
    compounds = {"Si": 149, "Al": 134, "ZnO": 2133, "FeO": 18905,
                 "LiCoO2": 601860, "LiFePO4": 585433, "GaAs": 2534, "Ge": 32, "PbTe": 19717,
                 "YbO": 1216, "SiC": 567551, "Fe3C": 510623, "SiO2": 547211, "Na2O": 2352,
                 "InSb (unstable)": 10148, "Sb2O5": 1705, "N2O5": 554368, "BaTiO3": 5020,
                 "Rb2O": 1394, "TiO2": 554278, "TiO2 (2)": 554278, 'BaNbTePO8': 560794,
                 "AgCl": 22922, "AgCl (2)": 570858, "SiO2 (2)": 555211, "Mg2SiO4": 2895, "CO2": 20066,
                 "PbSO4": 22298, "SrTiO3": 5532, "FeAl": 2658, "AlFeCo2": 10884, "NaCoO2": 554427,
                 "ReO3": 547271, "LaH2": 24153, "SiH3I": 28538, "LiBH4": 30209, "H8S5N2": 28143,
                 "LiOH": 23856, "SrO2": 2697, "Mn": 35, "Hg4Pt": 2312,
                 "PdF4": 13868, "Gd2WO6": 651333, 'MnO2': 19395, 'VO2': 504800}

    mpr = MPRester()

    for name, sid in compounds.iteritems():
        if not names or name in names:
            sid = mpr.get_materials_id_from_task_id("mp-{}".format(sid))
            s = mpr.get_structure_by_material_id(sid, final=False)

            snl = StructureNL(s, 'Anubhav Jain <[email protected]>')

            parameters = {'priority': 10} if name == 'Si' else None
            if params:
                parameters.update(params)
            sma.submit_snl(snl, '[email protected]', parameters=parameters)
开发者ID:image-tester,项目名称:MPWorks,代码行数:30,代码来源:submit_canonical.py


注:本文中的pymatgen.MPRester.get_materials_id_from_task_id方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。