From d5ad3ce45406b2c4b5d5575729a23d16d23b3504 Mon Sep 17 00:00:00 2001 From: Jusong Yu Date: Thu, 1 Sep 2022 22:08:00 +0000 Subject: [PATCH] SCF only process info to workchain inspect --- aiidalab_qe/process.py | 13 +++++++++---- aiidalab_qe/steps.py | 1 - 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/aiidalab_qe/process.py b/aiidalab_qe/process.py index 477daa144..ac2afed81 100644 --- a/aiidalab_qe/process.py +++ b/aiidalab_qe/process.py @@ -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, diff --git a/aiidalab_qe/steps.py b/aiidalab_qe/steps.py index d21f11fd4..40eed6ecd 100644 --- a/aiidalab_qe/steps.py +++ b/aiidalab_qe/steps.py @@ -6,7 +6,6 @@ * Carl Simon Adorf """ import os -from pickle import NONE import ipywidgets as ipw import traitlets