Skip to content

Commit

Permalink
Merge pull request #743 from hackingmaterials/revert-742-run-vasp-cus…
Browse files Browse the repository at this point in the history
…todian

Revert "RunVaspCustodian add optional_param jobs: list[VaspJob]"
  • Loading branch information
itsduowang authored Feb 1, 2022
2 parents ad1d102 + 5cd4732 commit 2685b8c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 19 deletions.
11 changes: 4 additions & 7 deletions atomate/vasp/firetasks/run_calc.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,30 +76,28 @@ class RunVaspCustodian(FiretaskBase):
vasp_cmd (str): the name of the full executable for running VASP. Supports env_chk.
Optional params:
jobs (list[VaspJob]): VaspJobs to run.
job_type (str): choose from "normal" (default), "double_relaxation_run" (two consecutive
job_type: (str) - choose from "normal" (default), "double_relaxation_run" (two consecutive
jobs), "full_opt_run" (multiple optimizations), and "neb"
handler_group: (str | list[ErrorHandler]) - group of handlers to use. See handler_groups dict in the code or
the groups and complete list of handlers in each group. Alternatively, you can
specify a list of ErrorHandler objects.
max_force_threshold: (float) - if >0, adds MaxForceErrorHandler. Not recommended for
nscf runs.
scratch_dir (str): if specified, uses this directory as the root scratch dir.
scratch_dir: (str) - if specified, uses this directory as the root scratch dir.
Supports env_chk.
gzip_output: (bool) - gzip output (default=T)
max_errors: (int) - maximum # of errors to fix before giving up (default=5)
ediffg: (float) shortcut for setting EDIFFG in special custodian jobs
auto_npar: (bool) - use auto_npar (default=F). Recommended set to T
for single-node jobs only. Supports env_chk.
gamma_vasp_cmd (str): cmd for Gamma-optimized VASP compilation.
gamma_vasp_cmd: (str) - cmd for Gamma-optimized VASP compilation.
Supports env_chk.
wall_time (int): Total wall time in seconds. Activates WalltimeHandler if set.
half_kpts_first_relax (bool): Use half the k-points for the first relaxation
"""

required_params = ["vasp_cmd"]
optional_params = [
"jobs",
"job_type",
"handler_group",
"max_force_threshold",
Expand Down Expand Up @@ -166,8 +164,7 @@ def run_task(self, fw_spec):
vasp_cmd = shlex.split(vasp_cmd)

# initialize variables
jobs = self.get("jobs", [])
job_type = self.get("job_type", "normal" if jobs == [] else None)
job_type = self.get("job_type", "normal")
scratch_dir = env_chk(self.get("scratch_dir"), fw_spec)
gzip_output = self.get("gzip_output", True)
max_errors = self.get("max_errors", CUSTODIAN_MAX_ERRORS)
Expand Down
23 changes: 11 additions & 12 deletions atomate/vasp/fireworks/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
sequences of VASP calculations.
"""
import warnings
from typing import Any, Dict, List, Union

from fireworks import Firework
from pymatgen.core import Structure
Expand Down Expand Up @@ -584,20 +583,20 @@ def __init__(
class DFPTFW(Firework):
def __init__(
self,
structure: Structure = None,
prev_calc_dir: str = None,
name: str = "static dielectric",
vasp_cmd: str = VASP_CMD,
copy_vasp_outputs: bool = True,
lepsilon: bool = True,
db_file: str = DB_FILE,
parents: Union[Firework, List[Firework]] = None,
user_incar_settings: Dict[str, Any] = None,
pass_nm_results: bool = False,
structure=None,
prev_calc_dir=None,
name="static dielectric",
vasp_cmd=VASP_CMD,
copy_vasp_outputs=True,
lepsilon=True,
db_file=DB_FILE,
parents=None,
user_incar_settings=None,
pass_nm_results=False,
**kwargs,
):
"""
Static DFPT calculation Firework
Static DFPT calculation Firework
Args:
structure (Structure): Input structure. If copy_vasp_outputs, used only to set the
Expand Down

0 comments on commit 2685b8c

Please sign in to comment.