Skip to content

Commit

Permalink
allow one to put in an explicit list of VaspHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
computron committed May 11, 2018
1 parent 1128b3e commit 226bd58
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions atomate/vasp/firetasks/run_calc.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ class RunVaspCustodian(FiretaskBase):
Optional params:
job_type: (str) - choose from "normal" (default), "double_relaxation_run" (two consecutive
jobs), "full_opt_run" (multiple optimizations), and "neb"
handler_group: (str) - group of handlers to use. See handler_groups dict in the code for
the groups and complete list of handlers in each group.
handler_group: (str or [ErrorHandler]) - group of handlers to use. See handler_groups dict in the code for
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.
Expand Down Expand Up @@ -176,7 +177,12 @@ def run_task(self, fw_spec):
raise ValueError("Unsupported job type: {}".format(job_type))

# construct handlers
handlers = handler_groups[self.get("handler_group", "default")]

handler_group = self.get("handler_group", "default")
if isinstance(handler_group, six.string_types):
handlers = handler_groups[handler_group]
else:
handlers = handler_group

if self.get("max_force_threshold"):
handlers.append(MaxForceErrorHandler(max_force_threshold=self["max_force_threshold"]))
Expand Down

0 comments on commit 226bd58

Please sign in to comment.