Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 1, 2022
1 parent cbd3b46 commit 035717f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions aiidalab_qe/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def find_work_chains(cls):
properties.append("pdos")
if "bands" in load_node(pk).inputs:
properties.append("bands")

if "relax" not in load_node(pk).inputs:
relax_info = "structure is not relaxed"
if "relax" in load_node(pk).inputs and properties:
Expand All @@ -101,7 +101,7 @@ def find_work_chains(cls):
properties_info = ""
else:
properties_info = f"properties on {', '.join(properties)}"

yield cls.WorkChainData(
formula=formula,
relax_info=relax_info,
Expand Down
6 changes: 4 additions & 2 deletions aiidalab_qe/steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -844,9 +844,11 @@ def update_builder(buildy, resources, npools):
builder.degauss_override = Float(parameters["degauss_override"])
if "smearing_override" in parameters:
builder.smearing_override = Str(parameters["smearing_override"])

# skip relax sub-worflow only when RelaxType is NONE and has property calculated.
if RelaxType(parameters["relax_type"]) is RelaxType.NONE and (parameters["run_bands"] or parameters["run_pdos"]):
if RelaxType(parameters["relax_type"]) is RelaxType.NONE and (
parameters["run_bands"] or parameters["run_pdos"]
):
builder.pop("relax")

if not parameters.pop("run_bands"):
Expand Down

0 comments on commit 035717f

Please sign in to comment.