From fb6fedce908cd50a77e1b9ddba9a1a5cadb60401 Mon Sep 17 00:00:00 2001
From: Edan Bainglass <45081142+edan-bainglass@users.noreply.github.com>
Date: Tue, 14 Jan 2025 09:17:20 +0100
Subject: [PATCH 1/2] Unpin pymatgen (#1086)
---
setup.cfg | 1 -
1 file changed, 1 deletion(-)
diff --git a/setup.cfg b/setup.cfg
index d7716144c..c88f0e60a 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -32,7 +32,6 @@ install_requires =
filelock~=3.8
importlib-resources~=5.2
aiida-wannier90-workflows==2.3.0
- pymatgen==2024.5.1
anywidget==0.9.13
table_widget~=0.0.2
From 37a230fb3873484039d915cfefa67e53f7f27d1c Mon Sep 17 00:00:00 2001
From: Edan Bainglass <45081142+edan-bainglass@users.noreply.github.com>
Date: Tue, 14 Jan 2025 09:20:21 +0100
Subject: [PATCH 2/2] Fix process tree issues (#1087)
- Remove "vc-" from calculation type
- Add link to restart feature
- Fix style
---
.../app/result/components/status/status.py | 4 ++-
.../app/result/components/status/tree.py | 34 ++++++++++++++++---
src/aiidalab_qe/app/static/styles/status.css | 13 ++++---
src/aiidalab_qe/common/widgets.py | 1 +
4 files changed, 42 insertions(+), 10 deletions(-)
diff --git a/src/aiidalab_qe/app/result/components/status/status.py b/src/aiidalab_qe/app/result/components/status/status.py
index 7f38c8b57..49d27c897 100644
--- a/src/aiidalab_qe/app/result/components/status/status.py
+++ b/src/aiidalab_qe/app/result/components/status/status.py
@@ -66,7 +66,9 @@ def _render(self):
self.to_advanced_view_button.on_click(self._switch_to_advanced_view)
simplified_tree_container = ipw.VBox(
- children=[self.simplified_process_tree],
+ children=[
+ self.simplified_process_tree,
+ ],
)
simplified_tree_node_view_container = ipw.VBox(
diff --git a/src/aiidalab_qe/app/result/components/status/tree.py b/src/aiidalab_qe/app/result/components/status/tree.py
index 799020cab..d7be654a4 100644
--- a/src/aiidalab_qe/app/result/components/status/tree.py
+++ b/src/aiidalab_qe/app/result/components/status/tree.py
@@ -77,11 +77,32 @@ def _render(self):
self.children = [
self.collapse_button,
self.trunk,
- ipw.HTML("""
-
- *workflow will re-submit failed calculations
-
- """),
+ ipw.HBox(
+ children=[
+ ipw.HTML(
+ value="*",
+ layout=ipw.Layout(margin="0"),
+ ),
+ ipw.HTML(
+ value="""
+
+ workflow will automatically re-submit failed calculations
+
+
(advanced users) click
+
here to learn how AiiDA handles errors
+
+ """,
+ layout=ipw.Layout(margin="0"),
+ ),
+ ],
+ layout=ipw.Layout(
+ align_items="flex-start",
+ margin="5px 0 0 0",
+ ),
+ ),
]
def _update(self):
@@ -108,12 +129,14 @@ class ProcessTreeNode(ipw.VBox, t.Generic[ProcessNodeType]):
"nscf": "NSCF workflow",
"bands": "Bands workflow",
"relax": "Structure relaxation workflow",
+ "md": "Molecular dynamics workflow",
},
"PwCalculation": {
"scf": "Run SCF cycle",
"nscf": "Run NSCF cycle",
"bands": "Compute bands",
"relax": "Optimize structure geometry",
+ "md": "Run molecular dynamics simulation",
},
"DosCalculation": "Compute density of states",
"ProjwfcCalculation": "Compute projections",
@@ -186,6 +209,7 @@ def _get_human_readable_title(self):
if label in ("PwBaseWorkChain", "PwCalculation"):
inputs = node.inputs.pw if label == "PwBaseWorkChain" else node.inputs
calculation: str = inputs.parameters.get_dict()["CONTROL"]["calculation"]
+ calculation = calculation.replace("vc-", "")
return self._TITLE_MAPPING.get(label, {}).get(calculation, label)
return self._TITLE_MAPPING.get(label, label)
diff --git a/src/aiidalab_qe/app/static/styles/status.css b/src/aiidalab_qe/app/static/styles/status.css
index e94d78b24..2dc17cc51 100644
--- a/src/aiidalab_qe/app/static/styles/status.css
+++ b/src/aiidalab_qe/app/static/styles/status.css
@@ -21,6 +21,14 @@
}
}
+.simplified-view .widget-button {
+ min-height: 28px;
+}
+
+.filename-display {
+ min-height: 32px;
+}
+
/* Process tree */
.rolling-output {
@@ -50,10 +58,6 @@
line-height: 1.5;
}
-.simplified-process-tree .widget-button {
- height: fit-content;
-}
-
.simplified-process-tree .tree-node-toggle:focus:enabled,
.simplified-process-tree .tree-node-toggle:hover:enabled,
.simplified-process-tree .tree-node-toggle:active:enabled,
@@ -96,6 +100,7 @@
.simplified-process-tree .calculation-link {
color: var(--color-link);
+ margin: 0 2px;
}
.simplified-process-tree .calculation-link:hover:enabled,
diff --git a/src/aiidalab_qe/common/widgets.py b/src/aiidalab_qe/common/widgets.py
index 4bbe8e613..bb2273131 100644
--- a/src/aiidalab_qe/common/widgets.py
+++ b/src/aiidalab_qe/common/widgets.py
@@ -159,6 +159,7 @@ def __init__(self, max_width=None, **kwargs):
self.max_width = max_width
self._html = ipw.HTML()
super().__init__([self._html], **kwargs)
+ self.add_class("filename-display")
@traitlets.observe("value")
def _observe_filename(self, change):