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


Python Potcar.from_dict方法代码示例

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


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

示例1: __init__

# 需要导入模块: from pymatgen.io.vasp.inputs import Potcar [as 别名]
# 或者: from pymatgen.io.vasp.inputs.Potcar import from_dict [as 别名]
 def __init__(self, name, incar, poscar, potcar, kpoints,
              qadapter=None, **kwargs ):
     """
     default INCAR from config_dict
     
     """
     self.name = name
     self.incar = Incar.from_dict(incar.as_dict())
     self.poscar = Poscar.from_dict(poscar.as_dict())
     self.potcar = Potcar.from_dict(potcar.as_dict())
     self.kpoints = Kpoints.from_dict(kpoints.as_dict())
     self.extra = kwargs
     if qadapter is not None:
         self.qadapter = qadapter.from_dict(qadapter.to_dict())
     else:
         self.qadapter = None        
     config_dict = {}
     config_dict['INCAR'] = self.incar.as_dict()
     config_dict['POSCAR'] = self.poscar.as_dict() 
     #caution the key and the value are not always the same        
     config_dict['POTCAR'] = self.potcar.as_dict() 
     #dict(zip(self.potcar.as_dict()['symbols'],
     #self.potcar.as_dict()['symbols']))
     config_dict['KPOINTS'] = self.kpoints.as_dict()
     #self.user_incar_settings = self.incar.as_dict()        
     DictVaspInputSet.__init__(self, name, config_dict,
                                ediff_per_atom=False, **kwargs)
开发者ID:mbkumar,项目名称:MPInterfaces,代码行数:29,代码来源:instrument.py

示例2: from_dict

# 需要导入模块: from pymatgen.io.vasp.inputs import Potcar [as 别名]
# 或者: from pymatgen.io.vasp.inputs.Potcar import from_dict [as 别名]
 def from_dict(cls, d):
     incar = Incar.from_dict(d["incar"])
     poscar = Poscar.from_dict(d["poscar"])
     potcar = Potcar.from_dict(d["potcar"])
     kpoints = Kpoints.from_dict(d["kpoints"])
     qadapter = None
     if d["qadapter"] is not None:
         qadapter = CommonAdapter.from_dict(d["qadapter"])
     return MPINTVaspInputSet(d["name"], incar, poscar, potcar,
                              kpoints, qadapter, **d["kwargs"])
开发者ID:mbkumar,项目名称:MPInterfaces,代码行数:12,代码来源:instrument.py

示例3: from_dict

# 需要导入模块: from pymatgen.io.vasp.inputs import Potcar [as 别名]
# 或者: from pymatgen.io.vasp.inputs.Potcar import from_dict [as 别名]
 def from_dict(cls, d):
     incar = Incar.from_dict(d["incar"])
     poscar = Poscar.from_dict(d["poscar"])
     potcar = Potcar.from_dict(d["potcar"])
     kpoints = Kpoints.from_dict(d["kpoints"])
     qadapter = None
     if d["qadapter"] is not None:
         qadapter = CommonAdapter.from_dict(d["qadapter"])
     script_name = d["script_name"]
     return MPINTVaspInputSet(d["name"], incar, poscar, potcar,
                              kpoints, qadapter,
                              script_name=script_name,
                              vis_logger=logging.getLogger(d["logger"]),
                              **d["kwargs"])
开发者ID:HanmeiTang,项目名称:MPInterfaces,代码行数:16,代码来源:instrument.py

示例4: from_dict

# 需要导入模块: from pymatgen.io.vasp.inputs import Potcar [as 别名]
# 或者: from pymatgen.io.vasp.inputs.Potcar import from_dict [as 别名]
 def from_dict(cls, d):
     incar = Incar.from_dict(d["incar"])
     poscar = Poscar.from_dict(d["poscar"])
     potcar = Potcar.from_dict(d["potcar"])
     kpoints = Kpoints.from_dict(d["kpoints"])
     cal =  Calibrate(incar, poscar, potcar, kpoints, 
                      system=d["system"], is_matrix = d["is_matrix"], 
                      Grid_type = d["Grid_type"], 
                      parent_job_dir=d["parent_job_dir"], 
                      job_dir=d["job_dir"], qadapter=d.get("qadapter"), 
                      job_cmd=d["job_cmd"], wait=d["wait"],
                      turn_knobs=d["turn_knobs"])
     cal.job_dir_list = d["job_dir_list"]
     cal.job_ids = d["job_ids"]
     return cal
开发者ID:zhuyizhou,项目名称:MPInterfaces,代码行数:17,代码来源:calibrate.py

示例5: __init__

# 需要导入模块: from pymatgen.io.vasp.inputs import Potcar [as 别名]
# 或者: from pymatgen.io.vasp.inputs.Potcar import from_dict [as 别名]
    def __init__(self, name, incar, poscar, kpoints, potcar=None,
                 qadapter=None, script_name='submit_script',
                 vis_logger=None, reuse_path=None, test=False,
                 **kwargs):
        """
        default INCAR from config_dict

        """
        self.name = name
        self.test = test
        self.incar_init = Incar.from_dict(incar.as_dict())
        self.poscar_init = Poscar.from_dict(poscar.as_dict())
        if not self.test:
            self.potcar_init = Potcar.from_dict(potcar.as_dict())
        if not isinstance(kpoints, str):
            self.kpoints_init = Kpoints.from_dict(kpoints.as_dict())
        else:
            self.kpoints_init = kpoints
        self.reuse_path = reuse_path  # complete reuse paths
        self.extra = kwargs
        if qadapter is not None:
            self.qadapter = qadapter.from_dict(qadapter.to_dict())
        else:
            self.qadapter = None
        self.script_name = script_name
        config_dict = {}
        config_dict['INCAR'] = self.incar_init.as_dict()
        config_dict['POSCAR'] = self.poscar_init.as_dict()
        # caution the key and the value are not always the same
        if not self.test:
            config_dict['POTCAR'] = self.potcar_init.as_dict()
        # dict(zip(self.potcar.as_dict()['symbols'],
        # self.potcar.as_dict()['symbols']))
        if not isinstance(kpoints, str):
            config_dict['KPOINTS'] = self.kpoints_init.as_dict()
        else:
            # need to find a way to dictify this kpoints string more
            # appropriately
            config_dict['KPOINTS'] = {'kpts_hse':self.kpoints_init}
        # self.user_incar_settings = self.incar.as_dict()
        DictSet.__init__(self, poscar.structure, config_dict)
                         #**kwargs)
        if vis_logger:
            self.logger = vis_logger
        else:
            self.logger = logger
开发者ID:henniggroup,项目名称:MPInterfaces,代码行数:48,代码来源:instrument.py

示例6: test_to_from_dict

# 需要导入模块: from pymatgen.io.vasp.inputs import Potcar [as 别名]
# 或者: from pymatgen.io.vasp.inputs.Potcar import from_dict [as 别名]
 def test_to_from_dict(self):
     d = self.potcar.as_dict()
     potcar = Potcar.from_dict(d)
     self.assertEqual(potcar.symbols, ["Fe", "P", "O"])
开发者ID:ExpHP,项目名称:pymatgen,代码行数:6,代码来源:test_inputs.py


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