diff --git a/src/aiidalab_qe/app/configuration/workflow.py b/src/aiidalab_qe/app/configuration/workflow.py
index c7ccd5001..6a34f727f 100644
--- a/src/aiidalab_qe/app/configuration/workflow.py
+++ b/src/aiidalab_qe/app/configuration/workflow.py
@@ -94,9 +94,26 @@ def __init__(self, **kwargs):
ipw.HTML("Select which properties to calculate:"),
]
entries = get_entry_items("aiidalab_qe.properties", "outline")
+ setting_entries = get_entry_items("aiidalab_qe.properties", "setting")
for name, entry_point in entries.items():
self.properties[name] = entry_point()
- self.property_children.append(self.properties[name])
+ if name in setting_entries:
+ reminder_text = ipw.HTML()
+ self.property_children.append(
+ ipw.HBox([self.properties[name], reminder_text])
+ )
+
+ # observer change to update the reminder text
+ def update_reminder_text(change, reminder_text=reminder_text, name=name):
+ if change["new"]:
+ reminder_text.value = (
+ f"""Customize {name} settings in the panel above if needed."""
+ )
+ else:
+ reminder_text.value = ""
+
+ self.properties[name].run.observe(update_reminder_text, "value")
+
self.property_children.append(self.properties_help)
self.children = [
self.structure_title,
diff --git a/src/aiidalab_qe/common/panel.py b/src/aiidalab_qe/common/panel.py
index ca414cb6b..bd6fdcfdc 100644
--- a/src/aiidalab_qe/common/panel.py
+++ b/src/aiidalab_qe/common/panel.py
@@ -72,7 +72,7 @@ def __init__(self, **kwargs):
description=self.title,
indent=False,
value=False,
- layout=ipw.Layout(max_width="50%"),
+ style={"description_width": "initial"},
)
self.description_html = ipw.HTML(
f"""
diff --git a/src/aiidalab_qe/plugins/bands/workchain.py b/src/aiidalab_qe/plugins/bands/workchain.py
index 2127088b4..56594b2b7 100644
--- a/src/aiidalab_qe/plugins/bands/workchain.py
+++ b/src/aiidalab_qe/plugins/bands/workchain.py
@@ -237,7 +237,7 @@ def update_inputs(inputs, ctx):
workchain_and_builder = {
"workchain": PwBandsWorkChain,
- "exclude": ("clean_workdir", "structure", "relax"),
+ "exclude": ("structure", "relax"),
"get_builder": get_builder,
"update_inputs": update_inputs,
}
diff --git a/src/aiidalab_qe/plugins/pdos/workchain.py b/src/aiidalab_qe/plugins/pdos/workchain.py
index 83d7ec39a..2d5fd3e40 100644
--- a/src/aiidalab_qe/plugins/pdos/workchain.py
+++ b/src/aiidalab_qe/plugins/pdos/workchain.py
@@ -90,7 +90,7 @@ def update_inputs(inputs, ctx):
workchain_and_builder = {
"workchain": PdosWorkChain,
- "exclude": ("clean_workdir", "structure", "relax"),
+ "exclude": ("structure", "relax"),
"get_builder": get_builder,
"update_inputs": update_inputs,
}
diff --git a/src/aiidalab_qe/plugins/xas/workchain.py b/src/aiidalab_qe/plugins/xas/workchain.py
index 259fe4ba5..47a189cf5 100644
--- a/src/aiidalab_qe/plugins/xas/workchain.py
+++ b/src/aiidalab_qe/plugins/xas/workchain.py
@@ -111,7 +111,7 @@ def update_inputs(inputs, ctx):
workchain_and_builder = {
"workchain": XspectraCrystalWorkChain,
- "exclude": ("clean_workdir", "structure", "relax"),
+ "exclude": ("structure", "relax"),
"get_builder": get_builder,
"update_inputs": update_inputs,
}
diff --git a/src/aiidalab_qe/plugins/xps/workchain.py b/src/aiidalab_qe/plugins/xps/workchain.py
index a07808308..270400fc7 100644
--- a/src/aiidalab_qe/plugins/xps/workchain.py
+++ b/src/aiidalab_qe/plugins/xps/workchain.py
@@ -105,7 +105,7 @@ def update_inputs(inputs, ctx):
workchain_and_builder = {
"workchain": XpsWorkChain,
- "exclude": ("clean_workdir", "structure", "relax"),
+ "exclude": ("structure", "relax"),
"get_builder": get_builder,
"update_inputs": update_inputs,
}
diff --git a/src/aiidalab_qe/workflows/__init__.py b/src/aiidalab_qe/workflows/__init__.py
index 50af1e30f..cb5c5698e 100644
--- a/src/aiidalab_qe/workflows/__init__.py
+++ b/src/aiidalab_qe/workflows/__init__.py
@@ -158,21 +158,23 @@ def get_builder_from_protocol(
if properties is None:
properties = []
builder.properties = orm.List(list=properties)
+ # clean workdir
+ clean_workdir = orm.Bool(parameters["advanced"]["clean_workdir"])
+ builder.clean_workdir = clean_workdir
# add plugin workchain
for name, entry_point in plugin_entries.items():
if name in properties:
plugin_builder = entry_point["get_builder"](
codes, structure, copy.deepcopy(parameters), **kwargs
)
+ # check if the plugin has a clean_workdir input
+ plugin_workchain = entry_point["workchain"]
+ if plugin_workchain.spec().has_input("clean_workdir"):
+ plugin_builder.clean_workdir = clean_workdir
setattr(builder, name, plugin_builder)
else:
builder.pop(name, None)
- # XXX (unkcpz) I smell not proper design here since I have to look at
- # configuration step to know what show be set here.
- clean_workdir = parameters["advanced"]["clean_workdir"]
- builder.clean_workdir = orm.Bool(clean_workdir)
-
return builder
def setup(self):