From 36d1a87c80ae1dac638e1f6eafee2cf7c91f924e Mon Sep 17 00:00:00 2001 From: Edan Bainglass Date: Fri, 27 Dec 2024 13:49:16 +0000 Subject: [PATCH 1/5] Apply sentence-case to bands pdos widget download button --- src/aiidalab_qe/common/bands_pdos/bandpdoswidget.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aiidalab_qe/common/bands_pdos/bandpdoswidget.py b/src/aiidalab_qe/common/bands_pdos/bandpdoswidget.py index 26d160c75..e93653977 100644 --- a/src/aiidalab_qe/common/bands_pdos/bandpdoswidget.py +++ b/src/aiidalab_qe/common/bands_pdos/bandpdoswidget.py @@ -113,7 +113,7 @@ def render(self): self.update_plot_button.on_click(self._update_pdos_plot) self.download_button = ipw.Button( - description="Download Data", + description="Download data", icon="download", button_style="primary", layout=ipw.Layout(visibility="hidden"), From 3cf92c79d6a39a67e361be92926661368526762e Mon Sep 17 00:00:00 2001 From: Edan Bainglass Date: Sat, 28 Dec 2024 05:24:19 +0000 Subject: [PATCH 2/5] Fix integration test lookup case --- tests_integration/test_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests_integration/test_app.py b/tests_integration/test_app.py index 09260f055..3b446deaf 100755 --- a/tests_integration/test_app.py +++ b/tests_integration/test_app.py @@ -28,7 +28,7 @@ def test_qe_app_select_silicon_and_confirm( # Select the Silicon example element = WebDriverWait(driver, 60 * 2).until( - EC.presence_of_element_located((By.XPATH, "//*[text()='From Examples']")) + EC.presence_of_element_located((By.XPATH, "//*[text()='From examples']")) ) element.click() From 76926df0e5d7122e8f5117a1a6a9eea883bb8b63 Mon Sep 17 00:00:00 2001 From: Edan Bainglass Date: Sat, 28 Dec 2024 17:52:51 +0000 Subject: [PATCH 3/5] Adjust more capitalization --- calculation_history.ipynb | 18 +++++++-------- delete.ipynb | 8 +++---- plugin_list.ipynb | 2 +- .../app/configuration/basic/basic.py | 2 +- .../app/configuration/basic/model.py | 8 +++---- src/aiidalab_qe/app/utils/search_jobs.py | 23 ++++++++++--------- 6 files changed, 31 insertions(+), 30 deletions(-) diff --git a/calculation_history.ipynb b/calculation_history.ipynb index 151a8dd99..a60d745fb 100644 --- a/calculation_history.ipynb +++ b/calculation_history.ipynb @@ -50,22 +50,22 @@ " color: #2c3e50;\n", " }\n", " \n", - "
Calculation History
\n", + "
Calculation history
\n", "
\n", - "

How to Use This Page

\n", + "

How to use this page

\n", "

\n", - " This page allows you to view and manage your calculation history. Use the table below to \n", + " This page allows you to view and manage your calculation history. Use the table below to\n", " see all jobs in the database. You can use the following filters to narrow down your search:\n", "

\n", "
    \n", - "
  • Label Search Field: Enter a job label to find matching jobs.
  • \n", - "
  • Job State Dropdown: Filter jobs based on their state (e.g., finished, running).
  • \n", - "
  • Date Range Picker: Select a start and end date to view jobs created within that range.
  • \n", - "
  • Properties Filter: Select specific properties associated with jobs.
  • \n", + "
  • Label search field: Enter a job label to find matching jobs.
  • \n", + "
  • Job state dropdown: Filter jobs based on their state (e.g., finished, running).
  • \n", + "
  • Date range picker: Select a start and end date to view jobs created within that range.
  • \n", + "
  • Properties filter: Select specific properties associated with jobs.
  • \n", "
\n", "

\n", - " Each row in the table provides links to inspect, delete or download a job. To delete a job, click the \"Delete\" \n", - " link in the respective row. To view detailed information about a job, click the \"PK\" link. To download the \n", + " Each row in the table provides links to inspect, delete or download a job. To delete a job, click the \"Delete\"\n", + " link in the respective row. To view detailed information about a job, click the \"PK\" link. To download the\n", " input/output files of a job, click the \"Download\" link.\n", "

\n", "
\n", diff --git a/delete.ipynb b/delete.ipynb index 571a79f25..d20838c8e 100644 --- a/delete.ipynb +++ b/delete.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# AiiDAlab Quantum ESPRESSO App\n", + "# AiiDAlab Quantum ESPRESSO app\n", "\n", "Caution! Deleting this job will also remove all associated nodes, including every calculation initiated by this job and their respective results. This action is irreversible.\n" ] @@ -37,10 +37,10 @@ " try:\n", " node = load_node(pk)\n", " print(f\"Node ID: {node.pk}\")\n", - " print(f\"Node Type: {node.process_label}\")\n", + " print(f\"Node type: {node.process_label}\")\n", " print(f\"Label: {node.label}\")\n", " print(f\"Description: {node.description}\")\n", - " print(f\"Creation Time: {node.ctime}\")\n", + " print(f\"Creation time: {node.ctime}\")\n", " except Exception as e:\n", " print(f\"Error loading node: {e!s}\")\n", " return False\n", @@ -113,7 +113,7 @@ " description=\"Confirm:\",\n", " disabled=False,\n", " )\n", - " confirm_button = widgets.Button(description=\"Delete Node\")\n", + " confirm_button = widgets.Button(description=\"Delete node\")\n", " confirm_button.on_click(confirm_deletion)\n", " display(delete_confirmation, confirm_button)\n", "else:\n", diff --git a/plugin_list.ipynb b/plugin_list.ipynb index 05a5c8108..7b47f5fb0 100644 --- a/plugin_list.ipynb +++ b/plugin_list.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## AiiDAlab Quantum ESPRESSO Plugin manager\n", + "## AiiDAlab Quantum ESPRESSO plugin manager\n", "\n", "This page lets you manage the plugins of the AiiDAlab Quantum ESPRESSO app. You can find below all plugins available in the official [AiiDAlab Quantum ESPRESSO plugin registry](https://github.com/aiidalab/aiidalab-qe/blob/main/plugins.yaml) (click [here](https://aiidalab-qe.readthedocs.io/development/plugin_registry.html) to learn how to register a new plugin, if you are developing one). You can install and uninstall plugins from this page.\n", "\n", diff --git a/src/aiidalab_qe/app/configuration/basic/basic.py b/src/aiidalab_qe/app/configuration/basic/basic.py index 0121c297e..a92c88fd7 100644 --- a/src/aiidalab_qe/app/configuration/basic/basic.py +++ b/src/aiidalab_qe/app/configuration/basic/basic.py @@ -107,7 +107,7 @@ def render(self): ipw.HBox( children=[ ipw.Label( - "Electronic Type:", + "Electronic type:", layout=ipw.Layout(justify_content="flex-start", width="120px"), ), self.electronic_type, diff --git a/src/aiidalab_qe/app/configuration/basic/model.py b/src/aiidalab_qe/app/configuration/basic/model.py index 1ac6f6b8f..e9e826741 100644 --- a/src/aiidalab_qe/app/configuration/basic/model.py +++ b/src/aiidalab_qe/app/configuration/basic/model.py @@ -18,11 +18,11 @@ class BasicConfigurationSettingsModel(ConfigurationSettingsModel): input_structure = tl.Union([tl.Instance(orm.StructureData)], allow_none=True) protocol_options = tl.List( - trait=tl.Unicode(), + trait=tl.Tuple(tl.Unicode(), tl.Unicode()), default_value=[ - "fast", - "moderate", - "precise", + ("Fast", "fast"), + ("Moderate", "moderate"), + ("Precise", "precise"), ], ) protocol = tl.Unicode(DEFAULT["workchain"]["protocol"]) diff --git a/src/aiidalab_qe/app/utils/search_jobs.py b/src/aiidalab_qe/app/utils/search_jobs.py index 7606367d9..1b899c50d 100644 --- a/src/aiidalab_qe/app/utils/search_jobs.py +++ b/src/aiidalab_qe/app/utils/search_jobs.py @@ -125,7 +125,7 @@ def setup_widgets(self): children=property_checkboxes, description="Properties:" ) self.properties_filter_description = ipw.HTML( - "

Properties Filter: Select one or more properties to narrow the results. Only calculations that include all the selected properties will be displayed. Leave all checkboxes unselected to include calculations regardless of their properties.

" + "

Properties filter: Select one or more properties to narrow the results. Only calculations that include all the selected properties will be displayed. Leave all checkboxes unselected to include calculations regardless of their properties.

" ) # Replace 'None' in 'Properties' with an empty list self.df["Properties"] = self.df["Properties"].apply( @@ -140,7 +140,7 @@ def setup_widgets(self): "Killed": "killed", }, value="", # Default value corresponding to "Any" - description="Job State:", + description="Job state:", ) self.label_search_field = ipw.Text( value="", @@ -150,11 +150,11 @@ def setup_widgets(self): style={"description_width": "initial"}, ) self.label_search_description = ipw.HTML( - "

Search Label: Enter a keyword to search in both the Label and Description fields. Matches will include any calculations where the keyword is found in either field.

" + "

Search label: Enter a keyword to search in both the Label and Description fields. Matches will include any calculations where the keyword is found in either field.

" ) self.toggle_description_checkbox = ipw.Checkbox( value=False, # Show the Description column by default - description="Show Description", + description="Show description", indent=False, ) self.toggle_description_checkbox.observe( @@ -163,18 +163,18 @@ def setup_widgets(self): self.toggle_time_format = ipw.ToggleButtons( options=["Absolute", "Relative"], value="Absolute", # Default to Absolute time - description="Time Format:", + description="Time format:", ) self.toggle_time_format.observe(self.update_table_visibility, names="value") self.toggle_id_format = ipw.ToggleButtons( options=["PK", "UUID"], value="PK", # Default to PK - description="ID Format:", + description="ID format:", ) self.toggle_id_format.observe(self.update_table_visibility, names="value") - self.time_start = ipw.DatePicker(description="Start Time:") - self.time_end = ipw.DatePicker(description="End Time:") + self.time_start = ipw.DatePicker(description="Start time:") + self.time_end = ipw.DatePicker(description="End time:") self.time_box = ipw.HBox([self.time_start, self.time_end]) # self.apply_filters_btn = ipw.Button(description='Apply Filters') # self.apply_filters_btn.on_click(self.apply_filters) @@ -187,7 +187,7 @@ def setup_widgets(self): self.filters_layout = ipw.VBox( [ - ipw.HTML("

Search & Filter Calculations:

"), + ipw.HTML("

Search & filter calculations:

"), ipw.VBox( [ self.job_state_dropdown, @@ -204,7 +204,7 @@ def setup_widgets(self): # self.apply_filters_btn, ] ), - ipw.HTML("

Display Options:

"), + ipw.HTML("

Display options:

"), ipw.VBox( [ self.toggle_description_checkbox, @@ -251,8 +251,9 @@ def get_table_value(self, display_df): display_df.rename( columns={ "State": "State 🟢", - "Creation time": "Creation Time ⏰", + "Creation time": "Creation time ⏰", "ID": "ID 🔗", + "Relax_type": "Relax type", }, inplace=True, ) From 87cebdc3839c7ee752a660234eefd8583c0ebed1 Mon Sep 17 00:00:00 2001 From: Edan Bainglass Date: Sun, 29 Dec 2024 06:26:24 +0000 Subject: [PATCH 4/5] Clean up configuration panels --- .../app/configuration/advanced/advanced.py | 5 +- .../configuration/advanced/pseudos/pseudos.py | 24 ++--- src/aiidalab_qe/plugins/bands/setting.py | 32 +++---- src/aiidalab_qe/plugins/pdos/setting.py | 29 +++--- src/aiidalab_qe/plugins/xas/setting.py | 88 ++++++++++--------- src/aiidalab_qe/plugins/xps/setting.py | 43 +++++---- 6 files changed, 115 insertions(+), 106 deletions(-) diff --git a/src/aiidalab_qe/app/configuration/advanced/advanced.py b/src/aiidalab_qe/app/configuration/advanced/advanced.py index 3f0c84112..13efe716c 100644 --- a/src/aiidalab_qe/app/configuration/advanced/advanced.py +++ b/src/aiidalab_qe/app/configuration/advanced/advanced.py @@ -212,7 +212,10 @@ def render(self): self.clean_workdir, self.reset_to_defaults_button, ], - layout=ipw.Layout(justify_content="space-between"), + layout=ipw.Layout( + justify_content="space-between", + margin="0 0 10px 0", + ), ), self.total_charge, self.van_der_waals, diff --git a/src/aiidalab_qe/app/configuration/advanced/pseudos/pseudos.py b/src/aiidalab_qe/app/configuration/advanced/pseudos/pseudos.py index 6e30c3414..5feced660 100644 --- a/src/aiidalab_qe/app/configuration/advanced/pseudos/pseudos.py +++ b/src/aiidalab_qe/app/configuration/advanced/pseudos/pseudos.py @@ -149,27 +149,15 @@ def render(self): ) self.children = [ + ipw.HTML("

Accuracy and precision

"), ipw.HTML(""" -
-

Accuracy and precision

+
+ The exchange-correlation functional and pseudopotential + library is set by the protocol configured in the + "Workflow" tab. Here you can override the defaults if + desired.
"""), - ipw.HBox( - children=[ - ipw.HTML( - """ -
- The exchange-correlation functional and pseudopotential - library is set by the protocol configured in the - "Workflow" tab. Here you can override the defaults if - desired. -
- """, - layout=ipw.Layout(max_width="60%"), - ), - ], - layout=ipw.Layout(height="50px", justify_content="space-between"), - ), ipw.HBox( [ ipw.VBox( diff --git a/src/aiidalab_qe/plugins/bands/setting.py b/src/aiidalab_qe/plugins/bands/setting.py index 093fb2933..d624c4086 100644 --- a/src/aiidalab_qe/plugins/bands/setting.py +++ b/src/aiidalab_qe/plugins/bands/setting.py @@ -15,6 +15,7 @@ def render(self): return self.projwfc_bands = ipw.Checkbox( + indent=False, description="Fat bands calculation", style={"description_width": "initial"}, ) @@ -26,21 +27,22 @@ def render(self): self.children = [ InAppGuide(identifier="bands-settings"), ipw.HTML(""" -
-

Settings

-
- """), - ipw.HTML(""" -
- The band structure workflow will automatically detect the default - path in reciprocal space using the - SeeK-path tool. -

- Fat Bands is a band structure plot that includes the angular - momentum contributions from specific atoms or orbitals to each - energy band. The thickness of the bands represents the strength - of these contributions, providing insight into the electronic - structure. +
+

+ The band structure workflow will automatically detect the + default path in reciprocal space using the + SeeK-path tool. +

+

+ Fat Bands is a band structure plot that includes the angular + momentum contributions from specific atoms or orbitals to each + energy band. The thickness of the bands represents the strength + of these contributions, providing insight into the electronic + structure. +

"""), self.projwfc_bands, diff --git a/src/aiidalab_qe/plugins/pdos/setting.py b/src/aiidalab_qe/plugins/pdos/setting.py index 3f62c9e29..45b6fead7 100644 --- a/src/aiidalab_qe/plugins/pdos/setting.py +++ b/src/aiidalab_qe/plugins/pdos/setting.py @@ -56,6 +56,7 @@ def render(self): ) self.use_pdos_degauss = ipw.Checkbox( + indent=False, description="Use custom PDOS degauss", style={"description_width": "initial"}, ) @@ -107,21 +108,19 @@ def render(self): self.children = [ InAppGuide(identifier="pdos-settings"), ipw.HTML(""" -
-

Settings

-
- """), - ipw.HTML(""" -
- By default, the tetrahedron method is used for partial density of states (PDOS) calculation. - However, if you need more control over the broadening, you can apply Gaussian broadening - by specifying a custom degauss value. -
- Recommendation for Molecules and Localized Orbitals: -
- For systems involving molecules or localized orbitals, it is recommended to use a - custom degauss value. This will provide a more accurate representation of the PDOS, - especially when the electronic states are localized. +
+

+ By default, the tetrahedron method is used for partial + density of states (PDOS) calculation. However, if you need more + control over the broadening, you can apply Gaussian broadening + by specifying a custom degauss value. +

+

+ For systems involving molecules or localized orbitals, it is + recommended to use a custom degauss value. This will + provide a more accurate representation of the PDOS, especially + when the electronic states are localized. +

"""), ipw.HBox( diff --git a/src/aiidalab_qe/plugins/xas/setting.py b/src/aiidalab_qe/plugins/xas/setting.py index 341019bfa..90ef1a97c 100644 --- a/src/aiidalab_qe/plugins/xas/setting.py +++ b/src/aiidalab_qe/plugins/xas/setting.py @@ -51,65 +51,71 @@ def render(self): # calculation of molecular systems is not really supported (neither in # terms of XAS nor the main App itself) we should not present this option # that essentially does nothing. + # ipw.HTML("

Structure

"), # ipw.HTML(""" - #
- #

Structure

- #
- # """), - # ipw.HTML(""" - #
+ #
# Below you can indicate if the material should be treated as a # molecule or a crystal. #
# """), # ipw.HBox( - # children=[self.structure_type], + # children=[ + # self.structure_type, + # ] # ), + ipw.HTML("

Element and core-hole treatment settings

"), ipw.HTML(""" -
-

Element and core-hole treatment setting.

-
- """), - ipw.HTML(""" -
+
To select elements for calculation of K-edge spectra: -
- (1) Tick the checkbox for each element symbol to select the element - for calculation.
- (2) Select the core-hole treatment scheme from the dropdown box. -
-
+
    +
  1. + Tick the checkbox for each element symbol to select the + element for calculation +
  2. +
  3. + Select the core-hole treatment scheme from the dropdown box +
  4. +
There are three supported options for core-hole treatment: -
- - FCH: Remove one electron from the system (any occupations scheme). -
- - XCH (Smearing): places the excited electron into the conduction - band (smeared occupations). -
- - XCH (Fixed): places the excited electron into the conduction band - (fixed occupations). -
-
- For XAS calculations of most elements, the FCH treatment is - recommended, however in some cases the XCH treatment should be used instead. -
- The recommended setting will be shown for each available element. - Note that only elements for which core-hole pseudopotential sets - are available will be shown. -
+
    +
  • + FCH: Remove one electron from the system (any occupations + scheme) +
  • +
  • + XCH (Smearing): places the excited electron into the + conduction band (smeared occupations) +
  • +
  • + XCH (Fixed): places the excited electron into the conduction + band (fixed occupations). +
  • +
+

+ For XAS calculations of most elements, the FCH treatment is + recommended, however in some cases the XCH treatment should be + used instead. +

+

+ The recommended setting will be shown for each available element. + Note that only elements for which core-hole pseudopotential sets + are available will be shown. +

"""), ipw.HBox( - children=[self.core_hole_treatments_widget], + children=[ + self.core_hole_treatments_widget, + ], layout=ipw.Layout(width="95%"), ), ipw.HTML(""" -
+

Cell size

"""), ipw.HTML(""" -
+
Define the minimum cell length in angstrom for the resulting supercell, and thus all output structures. The default value of 8.0 angstrom will be used if no input is given. Setting this value to @@ -117,7 +123,9 @@ def render(self):
"""), ipw.HBox( - children=[self.supercell_min_parameter], + children=[ + self.supercell_min_parameter, + ], ), ] diff --git a/src/aiidalab_qe/plugins/xps/setting.py b/src/aiidalab_qe/plugins/xps/setting.py index 01f4fcccd..fd4533cf6 100644 --- a/src/aiidalab_qe/plugins/xps/setting.py +++ b/src/aiidalab_qe/plugins/xps/setting.py @@ -81,38 +81,47 @@ def render(self): ) self.children = [ + ipw.HTML("

Structure

"), ipw.HTML(""" -
-

Structure

-
- """), - ipw.HTML(""" -
+
Below you can indicate if the material should be treated as a molecule or a crystal. -
"""), - ipw.HBox([self.structure_type]), +
+ """), + ipw.HBox( + children=[ + self.structure_type, + ] + ), ipw.HTML(""" -
+

Core-Hole pseudopotential group

-
"""), +
+ """), ipw.HTML(f""" -
+
Please select a pseudopotential group, which provide the ground-state and excited-state pseudopotentials for the element. The pseudopotentials are downloaded from this repository. -
"""), +
+ """), self.pseudo_group, ipw.HTML(""" -
+

Select core-level

-
"""), +
+ """), ipw.HTML(""" -
+
The list of core-levels to be considered for analysis. -
"""), - ipw.HBox([self.core_levels_widget]), +
+ """), + ipw.HBox( + children=[ + self.core_levels_widget, + ] + ), ] self.rendered = True From 99be7bc538998a201a90a988ebf31f5e0feae292 Mon Sep 17 00:00:00 2001 From: Edan Bainglass Date: Sun, 29 Dec 2024 12:09:20 +0000 Subject: [PATCH 5/5] Emphasize molecules and localized orbitals in PDOS settings panel --- src/aiidalab_qe/plugins/pdos/setting.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/aiidalab_qe/plugins/pdos/setting.py b/src/aiidalab_qe/plugins/pdos/setting.py index 45b6fead7..a55f11d7c 100644 --- a/src/aiidalab_qe/plugins/pdos/setting.py +++ b/src/aiidalab_qe/plugins/pdos/setting.py @@ -116,10 +116,10 @@ def render(self): by specifying a custom degauss value.

- For systems involving molecules or localized orbitals, it is - recommended to use a custom degauss value. This will - provide a more accurate representation of the PDOS, especially - when the electronic states are localized. + For systems involving molecules or localized orbitals, + it is recommended to use a custom degauss value. This + will provide a more accurate representation of the PDOS, + especially when the electronic states are localized.

"""),