Пример #1
0
def gen_surf(task_type, jdata, mdata):
    conf_dir = jdata['conf_dir']
    max_miller = jdata['max_miller']
    relax_box = jdata['relax_box']
    static_opt = jdata['static-opt']
    cwd = os.getcwd()
    #vasp
    if task_type == "vasp":
        gen_05_surf.make_vasp(jdata,
                              conf_dir,
                              max_miller,
                              static=static_opt,
                              relax_box=relax_box)
    #deepmd
    elif task_type == "deepmd":
        gen_05_surf.make_deepmd_lammps(jdata,
                                       conf_dir,
                                       max_miller,
                                       static=static_opt,
                                       relax_box=relax_box,
                                       task_name='deepmd')
    #meam
    elif task_type == "meam":
        gen_05_surf.make_meam_lammps(jdata,
                                     conf_dir,
                                     max_miller,
                                     static=static_opt,
                                     relax_box=relax_box,
                                     task_name='meam')
    else:
        raise RuntimeError("unknow task ", task_type)
    os.chdir(cwd)
Пример #2
0
def gen_surf(task_type,jdata,mdata):
    conf_dir=jdata['conf_dir']
    max_miller=jdata['max_miller']
    relax_box=jdata['relax_box']
    static=jdata['static-opt']
    cwd=os.getcwd()
    #vasp
    if task_type == "vasp":
        gen_05_surf.make_vasp(jdata, conf_dir, max_miller, static = static, relax_box = relax_box)
    #lammps
    elif task_type in lammps_task_type :
        gen_05_surf.make_lammps(jdata, conf_dir, max_miller, static = static, relax_box = relax_box, task_type = task_type)
    else :
        raise RuntimeError("unknow task ", task_type)
    os.chdir(cwd)