Skip to content

Fix UI#60

Merged
edan-bainglass merged 4 commits into
aiidalab:mainfrom
edan-bainglass:fix-UI
May 22, 2026
Merged

Fix UI#60
edan-bainglass merged 4 commits into
aiidalab:mainfrom
edan-bainglass:fix-UI

Conversation

@edan-bainglass
Copy link
Copy Markdown
Member

@edan-bainglass edan-bainglass commented May 6, 2026

This PR addresses two issues:

  1. compute_fermi_surface wasn't being set on process load
  2. The dHvA part of the UI was still visible when compute_fermi_surface was deselected

The PR address a few other bugs/inconsistencies noticed alonged the way.

Closes #57
Closes #59

@edan-bainglass edan-bainglass requested a review from npaulish May 6, 2026 16:10
@edan-bainglass
Copy link
Copy Markdown
Member Author

@npaulish best we discuss the changes over a (very) brief call.

self.plot_wannier_functions = parameters.get('plot_wannier_functions', False)
self.number_of_disproj_max = parameters.get('number_of_disproj_max', 15)
self.number_of_disproj_min = parameters.get('number_of_disproj_min', 2)
self.compute_fermi_surface = parameters.get('compute_fermi_surface', False)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was missing

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much of what is changed here is just about standardizing the structure of the settings panel w.r.t how we do things in the QE app.

Comment on lines +320 to +323
ipw.link(
(self._model, 'frozen_type'),
(self.frozen_type, 'value'),
)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was actually being assigned on a redundant frozen_type widget that was not being used.

Comment on lines -360 to -368
self.frozen_type = ipw.Dropdown(
options=['fixed_plus_projectability', 'projectability', 'energy_fixed'],
value=self._model.frozen_type,
description='Frozen states:',
style={'description_width': 'initial'},
)
ipw.link(
(self._model, 'frozen_type'),
(self.frozen_type, 'value'),
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant!

Comment on lines +357 to +363
optimize_pdwf_info = ipw.HTML(
"""<div class="alert alert-warning">
<b>Note:</b> If <b>Optimize PDWF thresholds</b> is enabled, an
exhaustive scan of the PDWF thresholds is performed (up to 30
Wannierizations) to find those that bring the bands distance (for
bands up to 2 eV above the Fermi level) below 10 meV.
</div>"""
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a tooltip on the widget, but the tooltip parameter is not a thing for the Checkbox widget. Instead, it offers description_tooltip. However, this doesn't seem to work. For now, the tooltip is cast as a warning below the checkbox.

return

if self.compute_fermi_surface.value:
if self._model.compute_fermi_surface:
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not rely on widget values, but rather on model values!

@edan-bainglass edan-bainglass merged commit f22a6ca into aiidalab:main May 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dHvA section remains visible after deselecting "Compute Fermi surface" "Compute Fermi surface" checkbox not populated on app reload

1 participant