From 4aa08730c3b72aac8d9f5223323ce435033995f9 Mon Sep 17 00:00:00 2001 From: mikibonacci Date: Fri, 21 Jun 2024 12:58:15 +0000 Subject: [PATCH] Layout fixing of the settings. --- src/aiida_koopmans/gui/app/setting.py | 39 ++++++++++++++++++++------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/src/aiida_koopmans/gui/app/setting.py b/src/aiida_koopmans/gui/app/setting.py index ff77c80..8422f04 100644 --- a/src/aiida_koopmans/gui/app/setting.py +++ b/src/aiida_koopmans/gui/app/setting.py @@ -34,44 +34,64 @@ def __init__(self, **kwargs):
Only "DFPT" method and "KI" functional are currently available. Norm-conserving pseudopotentials must be used. """, - layout=ipw.Layout(width="400"), + #layout=ipw.Layout(width="400"), ) + layout_inside_Vboxes = ipw.Layout(width="90%") # it is the default, no need to set it up actually. + layout_Vboxes = ipw.Layout(width="12.5%") + # Method button self.method = ipw.RadioButtons( options=['DFPT','deltaSCF'], value='DFPT', + layout=layout_inside_Vboxes ) method_box = ipw.VBox( - children = [ipw.HTML('Method'),self.method] + children = [ipw.HTML('Method'),self.method], + layout=layout_Vboxes + ) # Functional button self.functional = ipw.RadioButtons( options=['ki','kipz'], value='ki', + layout=layout_inside_Vboxes ) functional_box = ipw.VBox( - children = [ipw.HTML('Functional'),self.functional] + children = [ipw.HTML('Functional'),self.functional], + layout=layout_Vboxes ) # Init orbitals dropdown self.init_orbitals_dropdown = ipw.Dropdown( options=['mlwfs','kohn-sham'], - #layout=ipw.Layout(width="200px"), value='mlwfs', + layout=layout_inside_Vboxes ) init_orbitals_box = ipw.VBox( - children = [ipw.HTML('Initial orbitals'),self.init_orbitals_dropdown] + children = [ipw.HTML('Initial orbitals'),self.init_orbitals_dropdown], + layout=layout_Vboxes ) # Compute alpha checkbox self.compute_alpha = ipw.Checkbox( - description='compute screening alpha (or provide it in the json file)', - layout={'width':'2000px'}, + indent=False, + layout=ipw.Layout(flex='0 1 auto', width="10%"), ) compute_alpha_box = ipw.VBox( - children = [self.compute_alpha] + children = [ipw.HBox([ + ipw.HTML("""
+ Compute screening alpha
+ (or provide it in the json file) +
+ """, + layout=ipw.Layout(flex='0 1 auto', width="28%")), + self.compute_alpha, + ],), + + ], + layout=ipw.Layout(display='flex', flex_flow='column', align_items='stretch', width='62.5%') ) # Full box of the above Koopmans inputs. @@ -112,10 +132,11 @@ def __init__(self, **kwargs): ipw.VBox( children=[ mandatory_inputs_box, - ipw.HTML(""" + ipw.HTML("""
Upload your Koopmans json file to define/override inputs: it is also possible to upload a specific json file with all (or part) of the needed settings. These will override the current options and, if there, also parameters of the simulations to be submitted. +
"""), upload_widget_box, ],