Skip to content

Commit a0518c3

Browse files
committed
add optional_param jobs: list[VaspJob] to RunVaspCustodian
1 parent a5ff517 commit a0518c3

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

atomate/vasp/firetasks/run_calc.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,28 +79,30 @@ class RunVaspCustodian(FiretaskBase):
7979
vasp_cmd (str): the name of the full executable for running VASP. Supports env_chk.
8080
8181
Optional params:
82-
job_type: (str) - choose from "normal" (default), "double_relaxation_run" (two consecutive
82+
jobs (list[VaspJob]): VaspJobs to run.
83+
job_type (str): choose from "normal" (default), "double_relaxation_run" (two consecutive
8384
jobs), "full_opt_run" (multiple optimizations), and "neb"
8485
handler_group: (str | list[ErrorHandler]) - group of handlers to use. See handler_groups dict in the code or
8586
the groups and complete list of handlers in each group. Alternatively, you can
8687
specify a list of ErrorHandler objects.
8788
max_force_threshold: (float) - if >0, adds MaxForceErrorHandler. Not recommended for
8889
nscf runs.
89-
scratch_dir: (str) - if specified, uses this directory as the root scratch dir.
90+
scratch_dir (str): if specified, uses this directory as the root scratch dir.
9091
Supports env_chk.
9192
gzip_output: (bool) - gzip output (default=T)
9293
max_errors: (int) - maximum # of errors to fix before giving up (default=5)
9394
ediffg: (float) shortcut for setting EDIFFG in special custodian jobs
9495
auto_npar: (bool) - use auto_npar (default=F). Recommended set to T
9596
for single-node jobs only. Supports env_chk.
96-
gamma_vasp_cmd: (str) - cmd for Gamma-optimized VASP compilation.
97+
gamma_vasp_cmd (str): cmd for Gamma-optimized VASP compilation.
9798
Supports env_chk.
9899
wall_time (int): Total wall time in seconds. Activates WalltimeHandler if set.
99100
half_kpts_first_relax (bool): Use half the k-points for the first relaxation
100101
"""
101102

102103
required_params = ["vasp_cmd"]
103104
optional_params = [
105+
"jobs",
104106
"job_type",
105107
"handler_group",
106108
"max_force_threshold",
@@ -167,7 +169,8 @@ def run_task(self, fw_spec):
167169
vasp_cmd = shlex.split(vasp_cmd)
168170

169171
# initialize variables
170-
job_type = self.get("job_type", "normal")
172+
jobs = self.get("jobs", [])
173+
job_type = self.get("job_type", "normal" if jobs == [] else None)
171174
scratch_dir = env_chk(self.get("scratch_dir"), fw_spec)
172175
gzip_output = self.get("gzip_output", True)
173176
max_errors = self.get("max_errors", CUSTODIAN_MAX_ERRORS)

0 commit comments

Comments
 (0)