Skip to content

Commit

Permalink
remove aimd wf
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhuoying committed Mar 6, 2024
1 parent 2b73337 commit b8d0246
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 390 deletions.
38 changes: 0 additions & 38 deletions atomate/common/powerups.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<<<<<<< HEAD
"""
This module defines general powerups that can be used for all workflows
"""
Expand Down Expand Up @@ -319,40 +318,3 @@ def powerup_by_kwargs(
if not found:
raise RuntimeError(f"Could not find powerup {name}.")
return original_wf
=======
from typing import Dict, Any, Optional

from fireworks import Workflow
from atomate.utils.utils import get_fws_and_tasks


def update_firetask(
original_wf: Workflow,
update_params: Dict[str, Any],
task_name_constraint: str,
fw_name_constraint: Optional[str] = None,
) -> Workflow:
"""
General powerup for arbitrary updates to a Firetask.
Args:
original_wf: The original workflow.
update_params: A dictionary of the keyword arguments to update.
task_name_constraint: Only apply changes to the Firetasks where the
Firetask class name contains this string.
fw_name_constraint: Only apply changes to Fireworks where the Firework
name contains this substring.
Returns:
Workflow
"""
idx_list = get_fws_and_tasks(
original_wf,
fw_name_constraint=fw_name_constraint,
task_name_constraint=task_name_constraint,
)
for idx_fw, idx_t in idx_list:
original_wf.fws[idx_fw].tasks[idx_t].update(update_params)

return original_wf
>>>>>>> bd235a73 (Add powerup for updating any firetask)
82 changes: 0 additions & 82 deletions atomate/vasp/fireworks/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ def __init__(
db_file=DB_FILE,
force_gamma=True,
job_type="double_relaxation_run",
<<<<<<< HEAD
=======
# max_force_threshold=RELAX_MAX_FORCE,
>>>>>>> c012f5fb (ARC AIMD)
auto_npar=">>auto_npar<<",
half_kpts_first_relax=HALF_KPOINTS_FIRST_RELAX,
parents=None,
Expand Down Expand Up @@ -103,24 +99,15 @@ def __init__(
and job_type == "double_relaxation"
):
warnings.warn(
<<<<<<< HEAD
f"A double relaxation run might not be appropriate with ISIF {vasp_input_set.incar['ISIF']}"
)
=======
"A double relaxation run might not be appropriate with ISIF {}".format(
vasp_input_set.incar["ISIF"]))
>>>>>>> 23b88a18 (Tidy docstrings)

t = []
t.append(WriteVaspFromIOSet(structure=structure, vasp_input_set=vasp_input_set))
t.append(
RunVaspCustodian(
vasp_cmd=vasp_cmd,
job_type=job_type,
<<<<<<< HEAD
=======
# max_force_threshold=max_force_threshold,
>>>>>>> c012f5fb (ARC AIMD)
ediffg=ediffg,
auto_npar=auto_npar,
half_kpts_first_relax=half_kpts_first_relax,
Expand Down Expand Up @@ -153,26 +140,11 @@ def __init__(
**kwargs,
):
"""
<<<<<<< HEAD
Structure optimization using the SCAN metaGGA functional. If this Firework is
initialized with no parents, it will perform a GGA optimization of the provided
structure using the PBESol functional. This GGA-relaxed structure is intended
to be passed to a second instance of this Firework for optimization with SCAN.
(see workflow definition in metagga_optimization.yaml)
=======
Structure optimization using the SCAN metaGGA functional.
This workflow performs a 3-step optmization. The first step ('relax1')
is a conventional GGA run relaxation that initializes the geometry and
calculates the bandgap of the structure. The bandgap is used to update
the KSPACING parameter, which sets the appropriate number of k-points
for the structure. The second step ('.relax2') is a static GGA
calculation that computes wavefunctions using the updated number of
k-points. The third step ('relax3') is a SCAN relaxation.
By default, .relax1 and .relax2 are force converged with
EDIFFG = -0.05, and .relax3 is force converged with EDIFFG=-0.02.
>>>>>>> 23b88a18 (Tidy docstrings)
Args:
structure (Structure): Input structure. Note that for prev_calc_loc jobs, the structure
Expand Down Expand Up @@ -216,7 +188,6 @@ def __init__(
is not supported by this InputSet."
)

<<<<<<< HEAD
if prev_calc_dir:
has_previous_calc = True
# Copy the CHGCAR from previous calc directory (usually PBE)
Expand Down Expand Up @@ -247,59 +218,6 @@ def __init__(
raise UserWarning(
"You specified prev_calc_loc but did not provide a parent Firework. Set "
"parents and try again."
=======
t = []
# write the VASP input files based on MPScanRelaxSet
t.append(WriteVaspFromIOSet(structure=structure,
vasp_input_set=orig_input_set
)
)

# pass the CalcLoc so that CopyFilesFromCalcLoc can find the directory
t.append(PassCalcLocs(name=name))

# Copy the pre-compiled VdW kernel for VASP, if required
if orig_input_set.vdw is not None:
t.append(CopyFiles(from_dir=vdw_kernel_dir))

# Copy original inputs with the ".orig" suffix
t.append(
CopyFilesFromCalcLoc(
calc_loc=True,
name_append=".orig",
exclude_files=["vdw_kernel.bindat", "FW.json", "FW--*"],
)
)

# Update the INCAR for the GGA preconditioning step
# Disable writing the WAVECAR because the no. of k-points will likely
# change before the next step in the calculation
pre_opt_settings = {"_set": {"METAGGA": None,
"EDIFFG": -0.05,
"LWAVE": False}}

# Disable vdW for the precondition step
if orig_input_set.incar.get("LUSE_VDW", None):
pre_opt_settings.update({"_unset": {"LUSE_VDW": True,
"BPARAM": 15.7}})

t.append(ModifyIncar(incar_dictmod=pre_opt_settings))

# Run the GGA .relax1 step
t.append(RunVaspCustodian(vasp_cmd=vasp_cmd,
job_type="normal_no_backup",
gzip_output=False
)
)

# Copy GGA outputs with '.relax1' suffix
# by the subsequent UpdateScanRelaxBandgap Firetask
t.append(
CopyFilesFromCalcLoc(
calc_loc=True,
name_append=".relax1",
exclude_files=["vdw_kernel.bindat", "FW.json", "FW--*", "*.orig"],
>>>>>>> 23b88a18 (Tidy docstrings)
)

if has_previous_calc:
Expand Down
162 changes: 0 additions & 162 deletions atomate/vasp/workflows/base/aimd.py

This file was deleted.

Loading

0 comments on commit b8d0246

Please sign in to comment.