예제 #1
0
def wf_scan_opt(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", {})
    half_kpts = c.get("HALF_KPOINTS_FIRST_RELAX", HALF_KPOINTS_FIRST_RELAX)
    ediffg = user_incar_settings.get("EDIFFG", -0.05)

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

    wf = use_custodian(wf,
                       custodian_params={
                           "ediffg": ediffg,
                           "max_force_threshold": 0,
                           "half_kpts_first_relax": half_kpts,
                           "job_type": "metagga_opt_run",
                           "vasp_cmd": vasp_cmd
                       })
    wf = add_common_powerups(wf, c)

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

    if c.get("REMOVE_WAVECAR", REMOVE_WAVECAR):
        wf = clean_up_files(wf)

    return wf
예제 #2
0
 def test_add_clean_up(self):
     my_wf = clean_up_files(self.bs_wf)
     for fw in my_wf.fws:
         fw_names = [t._fw_name for t in fw.tasks]
         # Raises an error if not in list
         clean_idx = fw_names.index("{{atomate.common.firetasks.glue_tasks.DeleteFiles}}")
         self.assertEqual(list(fw.tasks[clean_idx].get("files")), ["WAVECAR*"])
예제 #3
0
파일: scan.py 프로젝트: montoyjh/MatMethods
def wf_scan_opt(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", {})
    half_kpts = c.get("HALF_KPOINTS_FIRST_RELAX", HALF_KPOINTS_FIRST_RELAX)
    ediffg = user_incar_settings.get("EDIFFG", -0.05)

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

    wf = use_custodian(
        wf,
        custodian_params={
            "ediffg": ediffg,
            "max_force_threshold": 0,
            "half_kpts_first_relax": half_kpts,
            "job_type": "metagga_opt_run",
            "db_file": db_file,
            "vasp_cmd": vasp_cmd
        })
    wf = add_common_powerups(wf, c)

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

    if c.get("REMOVE_WAVECAR", REMOVE_WAVECAR):
        wf = clean_up_files(wf)

    return wf