Пример #1
0
def wf_bandstructure_plus_boltztrap(structure, c=None):
    c = c or {}
    vasp_cmd = c.get("VASP_CMD", VASP_CMD)
    db_file = c.get("DB_FILE", DB_FILE)

    params = []
    for x in range(4):
        params.append({"vasp_cmd": vasp_cmd, "db_file": db_file})
    params.append({"db_file": db_file})

    wf = get_wf(structure,
                "bandstructure_boltztrap.yaml",
                vis=MPRelaxSet(structure, force_gamma=True),
                params=params)

    wf = add_common_powerups(wf, c)

    if c.get("SMALLGAP_KPOINT_MULTIPLY", SMALLGAP_KPOINT_MULTIPLY):
        wf = add_small_gap_multiply(wf, 0.5, 5, "static")
        wf = add_small_gap_multiply(wf, 0.5, 5, "nscf")

    if c.get("STABILITY_CHECK", STABILITY_CHECK):
        wf = add_stability_check(wf,
                                 fw_name_constraint="structure optimization")

    if c.get("ADD_WF_METADATA", ADD_WF_METADATA):
        wf = add_wf_metadata(wf, structure)

    return wf
Пример #2
0
def wf_raman_spectra(structure, c=None):
    """
    Raman spectra workflow from the given structure and config dict

    Args:
        structure (Structure): input structure
        c (dict): workflow config dict

    Returns:
        Workflow
    """

    c = c or {}
    wf = get_wf_raman_spectra(structure,
                              modes=c.get("modes", None),
                              step_size=c.get("step_size", 0.005),
                              vasp_cmd=c.get("vasp_cmd", "vasp"),
                              db_file=c.get("db_file", None))

    wf = add_modify_incar(
        wf,
        modify_incar_params={"incar_update": {
            "ENCUT": 600,
            "EDIFF": 1e-6
        }},
        fw_name_constraint="static dielectric")

    if c.get("ADD_WF_METADATA", ADD_WF_METADATA):
        wf = add_wf_metadata(wf, structure)

    return wf
Пример #3
0
def wf_elastic_constant(structure, c=None):

    c = c or {}
    vasp_cmd = c.get("VASP_CMD", VASP_CMD)
    db_file = c.get("DB_FILE", DB_FILE)
    user_kpoints_settings = c.get("user_kpoints_settings",
                                  {"grid_density": 7000})

    wf = get_wf_elastic_constant(
        structure,
        vasp_cmd=vasp_cmd,
        norm_deformations=[-0.01, -0.005, 0.005, 0.01],
        shear_deformations=[-0.06, -0.03, 0.03, 0.06],
        db_file=db_file,
        user_kpoints_settings=user_kpoints_settings)

    wf = add_modify_incar(
        wf,
        modify_incar_params={"incar_update": {
            "ENCUT": 700,
            "EDIFF": 1e-6
        }})

    wf = add_common_powerups(wf, c)

    if c.get("ADD_WF_METADATA", ADD_WF_METADATA):
        wf = add_wf_metadata(wf, structure)

    return wf
Пример #4
0
def wf_gibbs_free_energy(structure, c=None):
    """
    Gibbs free energy workflow from the given structure and config dict.

    Args:
        structure (Structure): input structure
        c (dict): workflow config dict

    Returns:
        Workflow
    """
    c = c or {}
    eos = c.get("eos", "vinet")
    qha_type = c.get("qha_type", "debye_model")
    vasp_cmd = c.get("vasp_cmd", VASP_CMD)
    db_file = c.get("db_file", DB_FILE)
    user_kpoints_settings = c.get("user_kpoints_settings",
                                  {"grid_density": 7000})
    deformations = c.get("deformations", [(np.identity(3) * (1 + x)).tolist()
                                          for x in np.linspace(-0.1, 0.1, 10)])
    pressure = c.get("pressure", 0.0)

    wf = get_wf_gibbs_free_energy(structure,
                                  user_kpoints_settings=user_kpoints_settings,
                                  deformations=deformations,
                                  vasp_cmd=vasp_cmd,
                                  db_file=db_file,
                                  eos=eos,
                                  qha_type=qha_type,
                                  pressure=pressure)

    wf = add_modify_incar(
        wf,
        modify_incar_params={"incar_update": {
            "ENCUT": 600,
            "EDIFF": 1e-6
        }})

    wf = add_common_powerups(wf, c)

    if c.get("ADD_WF_METADATA", ADD_WF_METADATA):
        wf = add_wf_metadata(wf, structure)

    return wf
Пример #5
0
def wf_static(structure, c=None):
    c = c or {}
    vasp_cmd = c.get("VASP_CMD", VASP_CMD)
    db_file = c.get("DB_FILE", DB_FILE)

    wf = get_wf(structure,
                "static_only.yaml",
                vis=MPStaticSet(structure),
                common_params={
                    "vasp_cmd": vasp_cmd,
                    "db_file": db_file
                })

    wf = add_common_powerups(wf, c)

    if c.get("ADD_WF_METADATA", ADD_WF_METADATA):
        wf = add_wf_metadata(wf, structure)

    return wf
Пример #6
0
def wf_dielectric_constant(structure, c=None):

    c = c or {}
    vasp_cmd = c.get("VASP_CMD", VASP_CMD)
    db_file = c.get("DB_FILE", DB_FILE)

    wf = get_wf(structure,
                "dielectric_constant.yaml",
                vis=MPRelaxSet(structure, force_gamma=True),
                common_params={
                    "vasp_cmd": vasp_cmd,
                    "db_file": db_file
                })

    wf = add_common_powerups(wf, c)

    if c.get("ADD_WF_METADATA", ADD_WF_METADATA):
        wf = add_wf_metadata(wf, structure)

    return wf
Пример #7
0
def wf_piezoelectric_constant(structure, c=None):

    c = c or {}
    wf = wf_dielectric_constant(structure, c)

    wf = add_modify_incar(wf,
                          modify_incar_params={
                              "incar_update": {
                                  "ENCUT": 1000,
                                  "ADDGRID": True,
                                  "LREAL": False,
                                  "EDIFF": 1e-7
                              }
                          },
                          fw_name_constraint="static dielectric")
    for fw in wf.fws:
        fw.name = fw.name.replace("dielectric", "piezoelectric")

    if c.get("ADD_WF_METADATA", ADD_WF_METADATA):
        wf = add_wf_metadata(wf, structure)

    return wf
Пример #8
0
def wf_structure_optimization(structure, c=None):

    c = c or {}
    vasp_cmd = c.get("VASP_CMD", VASP_CMD)
    db_file = c.get("DB_FILE", DB_FILE)
    user_incar_settings = c.get("USER_INCAR_SETTINGS")

    wf = get_wf(structure,
                "optimize_only.yaml",
                vis=MPRelaxSet(structure,
                               force_gamma=True,
                               user_incar_settings=user_incar_settings),
                common_params={
                    "vasp_cmd": vasp_cmd,
                    "db_file": db_file
                })

    wf = add_common_powerups(wf, c)

    if c.get("ADD_WF_METADATA", ADD_WF_METADATA):
        wf = add_wf_metadata(wf, structure)

    return wf