Skip to content

Commit

Permalink
SCF only process info to workchain inspect
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz committed Sep 1, 2022
1 parent 96caa11 commit cbd3b46
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions aiidalab_qe/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,21 +82,26 @@ def find_work_chains(cls):
for process in projected[1:]:
pk = process[0]
formula = load_node(pk).inputs.structure.get_formula()
if "relax" in load_node(pk).inputs:
relax_info = "structure is relaxed"
else:
relax_info = "structure is not relaxed"

properties = []
if "pdos" in load_node(pk).inputs:
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:
relax_info = "structure is relaxed"
if "relax" in load_node(pk).inputs and not properties:
relax_info = "structure is not relaxed"
properties = ["SCF only"]

if not properties:
properties_info = ""
else:
properties_info = f"properties on {', '.join(properties)}"

yield cls.WorkChainData(
formula=formula,
relax_info=relax_info,
Expand Down

0 comments on commit cbd3b46

Please sign in to comment.