Giter Club home page Giter Club logo

aiidalab-qe's Introduction

AiiDAlab Quantum ESPRESSO application

codecov Documentation Status

About

This is a early-development implementation of an AiiDAlab application for Quantum ESPRESSO workflow. The app allows the execution of a workflow with Quantum ESPRESSO that includes the selection of an input structure, its relaxation, and the bands structure calculation.

The app is currently in an early development stage!

For developers

The package uses pre-commit hooks to check the style consistency of all commits. To use those you need to first install the pre-commit package itself, e.g. with:

pip install .[dev]

and then install the pre-commit hooks with

pre-commit install

The pre-commit checks should now be automatically executed prior to each commit.

To run unit tests in the AiiDAlab container, you need to run pytest from within the aiida-core-services conda environment:

conda activate aiida-core-services
pytest -sv tests

To run the integration tests, you need to build the Docker image first:

cd docker/
docker buildx bake -f build.json -f docker-bake.hcl --set "*.platform=linux/amd64" --load

Then, you can run the integration tests with:

JUPYTER_TOKEN=max TAG=newly-baked pytest --driver Chrome tests_integration -sv

For maintainers

To create a new release, clone the repository, install development dependencies with pip install '.[dev]', and then execute bumpver update. This will:

  1. Create a tagged release with bumped version and push it to the repository.
  2. Trigger a GitHub actions workflow that creates a GitHub release.

For more details of the releases plan and management, please go to the wiki.

Additional notes:

  • Use the --dry option to preview the release change.
  • The release tag (e.g. a/b/rc) is determined from the last release. Use the --tag option to switch the release tag.
  • For making "outdate" release since we fix minor version to 2x.04.xx and 2x.10.xx, use e.g. bumpver update --set-version v23.10.0rc4 --ignore-vcs-tag to make the release.

Acknowledgements

We acknowledge support from:

MARVEL MaX MarketPlace
BIG-MAP EU

aiidalab-qe's People

Contributors

andresortegaguerrero avatar casperwa avatar chrisjsewell avatar csadorf avatar danielhollas avatar edan-bainglass avatar ltalirz avatar mbercx avatar mikibonacci avatar pnogillespie avatar pre-commit-ci[bot] avatar superstar54 avatar t-reents avatar unkcpz avatar yakutovicha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

aiidalab-qe's Issues

✨ NEW: Add parallelization options to "Resources" tab

Currently the parallelization options are not set automatically, and the user doesn't have a way to specify them. It would be good as a first rudimentary approach to set the npools to the number of nodes used for the calculation by default, as well as allow the user to specify the basic parallelization options in the "Resources" tab.

πŸ› FIX: Make `POSITIONS_CELL` the default selection

We should make "POSITIONS_CELL" the default choice for the geometry optimization, since just optimizing the atoms is often not sufficient. I tried to fix this in #54 but this refuses to work 😠 . Shouldn't we just add a value argument to the Dropdown?

πŸ‘Œ IMPROVE: Dictionary visualization and download

When selecting a dictionary output in Step 3, there are several improvements that can be made:

  • Offer an option to download the dictionary in JSON. Maybe also move these options to the top, since now the user has to scroll all the way down before she/he can see them.
  • Make very large values in the dictionary collapsable.

Submitting a magnetic run after one has been submitted

When submitting a 'ferromagnetic' run directly after submitting one using the QE-app by selecting 'new calculation' from the top drop down menu - a non-magnetic calculation is submitted.

To Reproduce

  1. Submit a ferromagnetic run with the QEapp (eg pk 630)
  2. Then select 'new calculation' - which brings you back to step 1. The same structure from the previous calculation is there automatically, use that structure.
  3. In the next screen (workflow), do not touch the 'magnetism' menu - it will still say 'ferromagnetic'. Other options can be changed or not.
  4. Submit run - this second run will be non-magnetic (eg pk 657)

Fix the Eiger configuration

The configuration seems to be a bit off: (1) the OMP_NUM_THREADS isn't getting the correct slurm env var; (2) the wall-time for the debug queue is set twice; (3) QE start running on 256 nodes?

(1)
The prepend text
OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}

results in an error for each job I run

e.g for pk 534 in _scheduler-stderr.txt:

OMP: Warning #232: OMP_NUM_THREADS: Invalid symbols found. Check the value "".
_scheduler-stderr.txt lines 1-9/9 (END)

(2) For the Eiger-debug config, the wall time is set twice (doesn't throw any error, but its a bit odd):
pk 534 _aiidasubmit.sh

#!/bin/bash
#SBATCH --no-requeue
#SBATCH --job-name="aiida-534"
#SBATCH --get-user-env
#SBATCH --output=_scheduler-stdout.txt
#SBATCH --error=_scheduler-stderr.txt
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --time=12:00:00


### computer prepend_text start ###
#SBATCH --partition=debug
#SBATCH --account=mr0
#SBATCH --constraint=mc
#SBATCH --time=00:30:00

export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}
export OMP_PROC_BIND=close
export OMP_PLACES=cores
### computer prepend_text end ###
module load cpeIntel/21.06
module load QuantumESPRESSO/6.7.0


'srun' '-n' '1' '/apps/eiger/UES/jenkins/1.4.0/software/QuantumESPRESSO/6.7.0-cpeIntel-21.06/bin/pw.x' '-in' 'aiida.in'  >'aiida.out'

(3) QE starts to run on 256 cores? (aren't there 128 on each eiger node?) - Maybe this is an issue with their QE module not the configuration of the computer/code in aiidaLab(?)
pk 534 header of aiida.out

```

Program PWSCF v.6.7MaX starts on 27Jul2021 at 12:11:10

 This program is part of the open-source Quantum ESPRESSO suite
 for quantum simulation of materials; please cite
     "P. Giannozzi et al., J. Phys.:Condens. Matter 21 395502 (2009);
     "P. Giannozzi et al., J. Phys.:Condens. Matter 29 465901 (2017);
      URL http://www.quantum-espresso.org",
 in publications or presentations arising from this work. More details at
 http://www.quantum-espresso.org/quote

 Parallel version (MPI & OpenMP), running on     256 processor cores
 Number of MPI processes:                 1
 Threads/MPI process:                   256

 MPI processes distributed on     1 nodes
 Reading input from aiida.in

πŸ‘Œ IMPROVE: Workflow Summary

The workflow summary tab is now a little bare bone, and in monospace font for some reason. Just off the top of my head, we can add:

  • Title
  • Little explanation on what this tab contains.
  • Settings from Step2 outlined.
  • References to cite
  • Dropdown with "methods text"

And made the layout pretty. 😍

πŸ‘Œ IMPROVE: Minor layout and UX issues

As I'm testing the QE app by trying to break stuff and tweaking the layout/content somewhat, I'm going to run into issues I don't immediately know how to fix, but want to keep track of. I'll keep these in this issue, and either try to fix them myself, or call in the cavalry (@csadorf and @yakutovicha).

  • Warning loads when opening the QE app that reads:

    WARNING The pseudo potential families required for this app are not yet installed. In step 2: click on 'Pseudopotential', and then on 'Install pseudos' to install them.

    However, the "Pseudo potentials" tab (which I think doesn't need to hyphenated) is only available in "expert" mode, so this warning will confuse laymen users.

    I think the SSSP pseudopotential libraries (or families) should be installed by default upon deployment, and the "Install pseudopotentials" button removed. Note that we also support the Pseudo dojo libraries in aiida-pseudo now, it might be interesting to extend the options users have here.

  • Codes are not configured, which is a bit of a hassle, especially when the user wants to run the PdosWorkChain to calculate the projected density of states and has to configure 3 codes.

    I think it's best to configure the default codes upon deployment.

  • The new tabs for expert mode aren't just added to the right, but some of them are inserted. That's a little weird, especially because it changes the active tab.

    I would just add the tabs on the right of the "layman" ones.

  • Consider having just one "Advanced options" tab. One issue is that the Functional choice is somewhat hidden in the "Pseudopotentials" tab. Although it is true that the pseudopotential files determine the functional, this is only because they are generated for specific functionals, so Quantum ESPRESSO reads the functional from the pseudopotential files header. However, the functional choice is quite fundamental in DFT, so I would put it front and center in an "Advanced options" tab.

    Perhaps we should just have one "Advanced Options" tab, whose UI is disabled by default. Something along the lines of what I was now working on for the "Pseudopotentials" tab:



    I think we can remove the "Expert mode" button for now, until we can think of more tabs that only experts need access to. Alternatively, we keep the expert mode and just remove the "Override" checkbox in the "Advanced options" tab. Though that would mean my hard work on adapting the opacity would be for naught. 😭

  • Currently the "k-points distance" value widget disappears when "use default k-points" is checked:



    This is fancy, but I think it would be better if the user could see what the default k-points distance is here, without having to uncheck the box.

  • When I try to set the kpoints distance, it reverts back to the default, causing endless frustration:



    That should of course not happen. 😁

  • Currently the "Select codes" tab is part of the "layman" tabs. However, if we install and set up the QE codes for the latest version by default, I think this should move into the expert mode tabs, and the codes should be configured to the defaults straight away.

  • Remove the install pseudos button. These should be installed by default, avoiding this hassle for the user.

  • Remove the "Use default X type" checkboxes for the spin and electronic type. Just put in the defaults and let them select the type.

  • Rephrase the work chain definition in terms of properties to calculate.

  • Add an explanation to the new "Properties" section.

  • Make the "POSITIONS_CELL" the default choice for the geometry optimization. @csadorf this refuses to work 😠 . I should just add a value argument to the Dropdown, no? Moved to #58

  • Remove the "Parameters" tab for now. I think this will be very nice when the process builder can have a nice representation in HTML, sort of like here: aiidateam/aiida-core#4970

  • Switch "Advanced Settings" and "Compute resources" tabs.

Things to double check:

  • If the user untick the default k-points box and changes the k-points distance, then ticks the box again, is the default actually being used? Moved to #59

Questions

  • What purpose do the "Previous Step" and "Next Step" buttons serve? Are they outdated? EDIT: Seems you can indeed move between steps with them (but only "Next Step" seems to work?). I would remove this entire line of buttons. You can just click on the steps now, right? So why would you use these? The "Reset" button seems more important, but I'd instead have a nice big button on the top left or right that says "Start new workflow!". Moved to #56

Bugs to fix

  • When the user selects a protocol, the default values in the expert mode for e.g. the k-points distance should be updated. Moved to #59
  • The structure is not showing in the "Final Geometry" tab of the outputs is not showing. Moved to #69
  • The band structure is not showing either for some reason after I redeployed on my work station.

TraitError appears on COD selection

When selecting a structure from COD, I got the traceback below appear (this is on Quantum Mobile).
It didn't seem to actually affect anything though, since the structure still appeared and everything seemed to work fine:

image

---------------------------------------------------------------------------
TraitError                                Traceback (most recent call last)
~/.virtualenvs/aiida/lib/python3.7/site-packages/ipywidgets/widgets/widget.py in _handle_msg(self, msg)
    674                 if 'buffer_paths' in data:
    675                     _put_buffers(state, data['buffer_paths'], msg['buffers'])
--> 676                 self.set_state(state)
    677 
    678         # Handle a state request.

~/.virtualenvs/aiida/lib/python3.7/site-packages/ipywidgets/widgets/widget.py in set_state(self, sync_data)
    543                     from_json = self.trait_metadata(name, 'from_json',
    544                                                     self._trait_from_json)
--> 545                     self.set_trait(name, from_json(sync_data[name], self))
    546 
    547     def send(self, content, buffers=None):

/usr/lib/python3.7/contextlib.py in __exit__(self, type, value, traceback)
    117         if type is None:
    118             try:
--> 119                 next(self.gen)
    120             except StopIteration:
    121                 return False

~/.virtualenvs/aiida/lib/python3.7/site-packages/traitlets/traitlets.py in hold_trait_notifications(self)
   1203                                 self._trait_values.pop(name)
   1204                 cache = {}
-> 1205                 raise e
   1206             finally:
   1207                 self._cross_validation_lock = False

~/.virtualenvs/aiida/lib/python3.7/site-packages/traitlets/traitlets.py in hold_trait_notifications(self)
   1189                 for name in list(cache.keys()):
   1190                     trait = getattr(self.__class__, name)
-> 1191                     value = trait._cross_validate(self, getattr(self, name))
   1192                     self.set_trait(name, value)
   1193             except TraitError as e:

~/.virtualenvs/aiida/lib/python3.7/site-packages/traitlets/traitlets.py in _cross_validate(self, obj, value)
    616         if self.name in obj._trait_validators:
    617             proposal = Bunch({'trait': self, 'value': value, 'owner': obj})
--> 618             value = obj._trait_validators[self.name](obj, proposal)
    619         elif hasattr(obj, '_%s_validate' % self.name):
    620             meth_name = '_%s_validate' % self.name

~/.virtualenvs/aiida/lib/python3.7/site-packages/traitlets/traitlets.py in __call__(self, *args, **kwargs)
    973         """Pass `*args` and `**kwargs` to the handler's function if it exists."""
    974         if hasattr(self, 'func'):
--> 975             return self.func(*args, **kwargs)
    976         else:
    977             return self._init_call(*args, **kwargs)

~/.virtualenvs/aiida/lib/python3.7/site-packages/ipywidgets/widgets/widget_selection.py in _validate_index(self, proposal)
    223             return proposal.value
    224         else:
--> 225             raise TraitError('Invalid selection: index out of bounds')
    226 
    227     @observe('index')

TraitError: Invalid selection: index out of bounds

✨ NEW: Widget for setting magnetic configuration

Not something I would add to the "Public release" project, but more of a long-term idea:

The user can now specify whether or not they think a material is magnetic or not. This will then use the rudimentary approach we have set up in aiida-quantumespresso that just sets up a ferromagnetic high-spin configuration.

This is a fine first step, but more advanced users will want to be able to choose the magnetic configuration. Having a widget for doing this in an intuitive manner will be challenging, but a great addition to the QEapp.

πŸ› FIX: Issue when disabling expert from code

When going into "Expert mode" -> "Select Codes" -> Disabling "Expert mode", the following error is raised:

---------------------------------------------------------------------------
TraitError                                Traceback (most recent call last)
/opt/conda/lib/python3.7/site-packages/ipywidgets/widgets/widget.py in _handle_msg(self, msg)
    674                 if 'buffer_paths' in data:
    675                     _put_buffers(state, data['buffer_paths'], msg['buffers'])
--> 676                 self.set_state(state)
    677 
    678         # Handle a state request.

/opt/conda/lib/python3.7/site-packages/ipywidgets/widgets/widget.py in set_state(self, sync_data)
    543                     from_json = self.trait_metadata(name, 'from_json',
    544                                                     self._trait_from_json)
--> 545                     self.set_trait(name, from_json(sync_data[name], self))
    546 
    547     def send(self, content, buffers=None):

/opt/conda/lib/python3.7/contextlib.py in __exit__(self, type, value, traceback)
    117         if type is None:
    118             try:
--> 119                 next(self.gen)
    120             except StopIteration:
    121                 return False

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in hold_trait_notifications(self)
   1120                                 self._trait_values.pop(name)
   1121                 cache = {}
-> 1122                 raise e
   1123             finally:
   1124                 self._cross_validation_lock = False

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in hold_trait_notifications(self)
   1106                 for name in list(cache.keys()):
   1107                     trait = getattr(self.__class__, name)
-> 1108                     value = trait._cross_validate(self, getattr(self, name))
   1109                     self.set_trait(name, value)
   1110             except TraitError as e:

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in _cross_validate(self, obj, value)
    597         if self.name in obj._trait_validators:
    598             proposal = Bunch({'trait': self, 'value': value, 'owner': obj})
--> 599             value = obj._trait_validators[self.name](obj, proposal)
    600         elif hasattr(obj, '_%s_validate' % self.name):
    601             meth_name = '_%s_validate' % self.name

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in __call__(self, *args, **kwargs)
    905         """Pass `*args` and `**kwargs` to the handler's function if it exists."""
    906         if hasattr(self, 'func'):
--> 907             return self.func(*args, **kwargs)
    908         else:
    909             return self._init_call(*args, **kwargs)

/opt/conda/lib/python3.7/site-packages/ipywidgets/widgets/widget_selectioncontainer.py in _validated_index(self, proposal)
     28             return proposal.value
     29         else:
---> 30             raise TraitError('Invalid selection: index out of bounds')
     31 
     32     # Public methods

TraitError: Invalid selection: index out of bounds

Steps to reproduce:

bug-codes

status tab: indicate progress of workchain

image

  1. The Calculation state switches between "Waiting" and "Running"
    It actually shows "Waiting" while QE is running and "Running" in between. I know where this comes from, but this is confusing
  2. The Process shown in the text field stays the same throughout the whole workflow. I.e. one does not see e.g. the name of the calcjob whose output is shown below.
  3. The progress bar is stuck at the same progress for most of the run.

Point 1 is relatively easy to fix - simply include the "process status" as well (which would be something like "monitoring scheduler: job state RUNNING")

For point 2, I guess in other use cases this field is not greyed out and one can use it to select the process (?) - if yes, one can keep it like this, but instead of showing the active process in that field one could e.g. show the currently active process as part of the message shown on top of the progress bar where it currently just says Waiting/Finished.

Finally, it's very rare to use the UUID to interact with processes in practice. I therefore propose to show
pk: 2170 aiida.workflows:quantumespresso.pw.bands
(and add the uuid in brackets at the end if you prefer to keep it)

For 3. @csadorf already mentioned that a progress bar might not be the best way of indicating progress.
What one would probably want to see is something like the output of verdi process status

PwBandsWorkChain<2170> Finished [0] [7:results]
    β”œβ”€β”€ seekpath_structure_analysis<2171> Finished [0]
    β”œβ”€β”€ PwBaseWorkChain<2178> Finished [0] [7:results]
    β”‚   β”œβ”€β”€ create_kpoints_from_distance<2180> Finished [0]
    β”‚   β”œβ”€β”€ PwCalculation<2184> Finished [0]
    β”‚   └── PwCalculation<2192> Finished [0]
    └── PwBaseWorkChain<2200> Finished [0] [7:results]
        └── PwCalculation<2203> Finished [0]

A first prototype could be to include the output of verdi status as text below the progress bar and simply update it whenever the progress bar itself is updated.
One could later make a more interactive version out of it (with folding / links /...).

Block the submission of calculations that would not actually do anything

Currently, if the user asks to leave the structure "as is", and doesn't specify that she or he wants to calculate the band structure, the work chain will effectively do nothing, just pass the input structure.

Should this be a valid way of using the QEapp, or should we simply block submission since the user is effectively asking it to do nothing?

Currently the submission is accepted, but this leads to an error when generating workchain report:

~/apps/quantum-espresso/aiidalab_qe/report.py in _generate_report_dict(qeapp_wc)
     84         bands_kpoints_distance = qeapp_wc.inputs.bands.bands_kpoints_distance.value
     85 
---> 86     energy_cutoff_wfc = round(pw_parameters["SYSTEM"]["ecutwfc"])
     87     energy_cutoff_rho = round(pw_parameters["SYSTEM"]["ecutrho"])
     88 

UnboundLocalError: local variable 'pw_parameters' referenced before assignment

πŸ‘Œ IMPROVE: Clean up top-level UI

I have some changes I would suggest to the top level UI:

  • Remove the "Steps" buttons. You can just click on the tabs now, so I assume these are still here for some legacy reason?

  • To make sure users can still start new workflows (and make this somewhat more intuitive), I'd add a nice big button_style "info" button to the line that contains the dropdown to select the workflow. The line should become:

    Select workflow: [DROPDOWN] [REFRESH_BUTTON] [ Start new worfklow! ]

  • Would be great it the dropdown text where you select your workflow would use a monospace font, but not sure if that's possible? I'd maybe also reformat it a bit, e.g.:

    PK = {wc.pk} {some nice spacing} - {structure formula} {state} {last adjusted time}

    I actually tried doing this, but got frustrated looking for how to change the font for the DropDown.

So then below this line you would just have the Step tabs. One additional feature that would be super nice for using this in a real production environment is adding filters to the work chains you have in the dropdown. I think this already works by querying, so this should be reasonable easy to do. I'd add filters for:

  • Structure formula elements, maybe separated with a dash? -
  • State. Or just a checkbox with "Finished"
  • Last adjusted time.

Since we don't want to overwhelm new users, we should hide this UI and have either a "Apply filter" button that then shows it, or maybe a dropdown tab or something.

UI experience

Nice work on aiida-lab and the qe-app. After about a day messing around, I have some comments on my experience. Here are some comments on the general UI (see other issues for comments on magnetic run submission, Bandstructure, connection to CSCS)

Speed - maybe this is an issue on my end, but sometimes things could be very slow. Starting the server the first time took ~10 min and then once or twice it crashed and restarting it took ~5 min. Also loading the process list pages took a noticeable amount of time. I didn't time it, but after clicking through that once, I just resorted using the aiida commands in a terminal window. Those are slow much slower relative to using aiida on my workstation, but I guess that is to be expected.

Getting setup - when setting up the connection to CSCS, I didn't notice the "computer database" box at the top at first. I started doing it all by hand, and then noticed that box. Is there a reason that the database isn't pulled automatically when the box is 'maximized'? Just an idea for the future, but depending how it is used, maybe there is a way to set up the code and computer (I know that these are two difference steps in aiida) in one go to make the user experience more seamless.

Running a calculation:
Select structure:

  • Maybe the cell parameters could be displayed as well as the structure?
  • Is there way to label a run (so that the name will appear in the drop down list associated with "Select workflow or start new: "

Workflow:

  • the text is informative, but I felt I didn't notice it the first time through (though I wasn't reading carefully the first time through) maybe having the text to the right of the menu would make it clear what advice went with what. Also it seems like the magnetic and electronic choices for the calculation are an attribute of the structural properties - this seems misleading in a way.
    --Maybe having "structure" with buttons or a drop-down menu below with explanatory text to the left, then underneath, "magnetism" (same with the menu and explanatory text", and finally "electronic type" and the same again.
  • In general, have an issue calling a 'non-spin-polarized' calculation 'non-magnetic'. Of course a non-spin-polarized calculation will ALWAYS be non-magnetic, but you can do a spin polarized calculation and get a non-magnetic result. Furthermore, you could probably cook up a case where you chose "ferromagnetic" and you get a non-magnetic result in the end - For example, I would guess this would happen for elemental Ca
  • I think a lot of people would be interested in the project DOS, and this shouldn't require an additional calculation overall.
  • It took me clicking expert mode a few time to notice what it was doing..... maybe put the button at the top so you are already looking in the correct part of the screen when the new tabs appear.

Status and results:
-Random: why is the 'local' computer time in GMT, not CET - GMT+2? I guess this doesn't really matter, but it would be nice if it could be the local time of the user, or at least CET.

  • It would be nice if the workchain steps had more informative titles - the daemon give the point in the workchain that it is in , but unless you are familiar with the workchain logic, this may just be confusing. Instead of thing like 'if(_should_relax)' - or whatever it is, maybe something in 'plain english'
  • Really nice if there was some indication of how the calculation is progressing, but I know aiida doesn't parse anything until the end, and the target users are not 'experts' so maybe this is just a waste.
  • After a run completes, in come cases I had to 'refresh' to get the band structure to display.
  • Again it would be nice if the final structure displayed the cell parameter (especially if a cell relaxation was performed)

'process list' feature

  • I didn't continue to use it b/c of the speed but once you have selected a run type, ie 'killed', you can select another run type, but there is no option 'all' to go back to the initial process list (which is the output like 'verdi process list -a')

Bug report: Application crashed with UnboundLocalError

Automated report

This issue was created with the app's automated bug reporting feature.
Attached to this issue is the full traceback as well as an environment
fingerprint that contains information about the operating system as well as all
installed libraries.

Additional comments (optional):

_Example: I submitted a calculation for Ca like pk 707, this one has pk 709 _

Attachments

Traceback
UnboundLocalError                         Traceback (most recent call last)
~/apps/quantum-espresso/aiidalab_qe/widgets.py in _observe_node(self, change)
    229                 clear_output()
    230                 if change["new"]:
--> 231                     display(viewer(change["new"]))
    232 
    233 

~/.local/lib/python3.7/site-packages/aiidalab_widgets_base/viewers.py in viewer(obj, downloadable, **kwargs)
     70     try:
     71         _viewer = AIIDA_VIEWER_MAPPING[obj.node_type]
---> 72         return _viewer(obj, downloadable=downloadable, **kwargs)
     73     except (KeyError) as exc:
     74         if obj.node_type in str(exc):

~/apps/quantum-espresso/aiidalab_qe/node_view.py in __init__(self, node, **kwargs)
    217             "Workflow Summary",
    218         ]
--> 219         self.result_children = [self.get_summary()]
    220         self.result_tabs = ipw.Tab()
    221 

~/apps/quantum-espresso/aiidalab_qe/node_view.py in get_summary(self)
    285 
    286     def get_summary(self):
--> 287         return SummaryView(self.node)
    288 
    289     def get_structure(self):

~/apps/quantum-espresso/aiidalab_qe/node_view.py in __init__(self, wc_node, **kwargs)
    177             return "Yes" if truthy else "No"
    178 
--> 179         report = generate_report_dict(self.wc_node)
    180 
    181         env = Environment()

~/apps/quantum-espresso/aiidalab_qe/report.py in generate_report_dict(qeapp_wc)
     96 def generate_report_dict(qeapp_wc):
     97     """Generate a dictionary for reporting the inputs for the `QeAppWorkChain`"""
---> 98     return dict(_generate_report_dict(qeapp_wc))
     99 
    100 

~/apps/quantum-espresso/aiidalab_qe/report.py in _generate_report_dict(qeapp_wc)
     84         bands_kpoints_distance = qeapp_wc.inputs.bands.bands_kpoints_distance.value
     85 
---> 86     energy_cutoff_wfc = round(pw_parameters["SYSTEM"]["ecutwfc"])
     87     energy_cutoff_rho = round(pw_parameters["SYSTEM"]["ecutrho"])
     88 

UnboundLocalError: local variable 'pw_parameters' referenced before assignment
Environment fingerprint
eNp9WF1v67gR_SuB-7oyLNmOk_u2zXYfipv27uZuF0VRFJREWbQpkSGpOMri_vcdzgxl5gYokhcffs-
cOTOjP1Yv0nllxtWn8oeV1SJ0xg2rT3-shGt6FWQTJidXn_6zut3VKqx-WK3-C_Pm0Jvxf8vS1XZ9WN_D4BX5S3nz9Pjl5uskbx7
FfFOWN9Xm037zaXO4-e3rA_yoytU32Ek0Z3GUHk9UqhVFLcbWF2r0Fs6GjTbr3XoDW_OoOrYdwdX6doEb0wZjNG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h4QAwQaH6Sqw58sB8gYH2
WcL7MTyDOnus82i5IT1pToepxSgUDSfZntVgNRyD5pfpok68Y5EAlPInP_XXEAwdVN3PRmbaC7HzyeTzPwZwaMVgOLsacmLMOBoA
3sney2b9_fPzMukg7v2FfWFUsbdB0Xr9UYEsZp8Hhsapj9SDkeQJL0LyKhDJhBT4sq-CdhMWptqbU4CYxSB27Z12kwhzL0LvNMrq
Oo0v4foevuX3ZcIMDqQ4irIBezFHzUO0SzqFClPdS1IanlJQnvZRnm_LRPVLkCVJe9dUJ32fOByGe7NJY3UetQrpHzd6UmxjVvpc
6dhG9GDJm-h4qvWlSbcYtr2KrE0sXKgpJab16pbAmbfGjudTQrAJZh4GjlFzt7TEVR6xtTxieXAHhCRSvICpzDf0K91Rkfh6DRNa
ZaYQ2EqrXrK_gYUgR6bsJOZLwJnajUChAj68lPNhmafv9DGgNoU3wRaugTQnQ_Wdk_X7my__dKX5e4AkVV13vJ5z8UlJssjek4ee
Qbb_9MAwSqKCXeYuuSx8ySswpNA_KTijT4Rmi61KNijz55fOPOpaeS2zs3qHFb0uhvb3FDyj-WaPkpoosQkG4mMFlyjtR9P1Us-h
vK3TqHtXDz6nOiJtB3py0CKkMiyIC2Rz6b8Hf1LjXiKK1fHchaoX4pGlUsf1sKfdGs0ShEa0FkjdBc7-H000KRfIOaBofQuwLz-2
AqWbPv51QQac2hUiHGOQy6bM-A36D0amdiJ8-fOqRyMnhDepjQTeJ06cxfqkQkNeV5Knopsl2IFwFx1PKEZODaKy3lBYp_v8loO2
as4rkxWiI6smk7xN0zkWEpm_NMb052v7SQOm_fLyKp15kLUewH7wghUlc_Lt05zc5HTM2XnopdeJBPJa6CPqcvHweolzHQ98XRxU
_lfuPsV5sxvzAc6CZpXRa0vOgk1h6o6iB8SEz8C2TxDeF3yqpFfj27U8BMaRK

By submitting this issue I confirm that I am aware that this information can
potentially be used to determine what kind of calculation was performed at the
time of error.

Allow for full editing of the QE input

Hello,

In the Step 2: submit work chain when in Expert mode, I think the "Advanced settings" should give full access to the QE input file.

The user could click on a button and see & edit the QE input file.

Then that modified input is submitted.

I think it is very important (you can have a Warning saying "modify at your own risk, calculation might crash").
Certainly for expert users but even for non-expert in order to learn.
In addition if a non-expert ask for questions and someone tell them that they should change X input variable, then they can do it easily.

I would consider this an important feature to add flexibility.

-- Sam

Fix the reading of QE input files

Describe the bug
When trying to Upload Structure "From computer" providing a valid QE input file (text format) it crashes.
From the Supported structure formats it should be supported.

To Reproduce
Upload a structure which is any valid QE input file.

Expected behavior
I expect the structure to be recognized from the QE input file which contains all the information about the structure

Traceback
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
/opt/conda/lib/python3.7/site-packages/ipywidgets/widgets/widget.py in _handle_msg(self, msg)
    674                 if 'buffer_paths' in data:
    675                     _put_buffers(state, data['buffer_paths'], msg['buffers'])
--> 676                 self.set_state(state)
    677 
    678         # Handle a state request.

/opt/conda/lib/python3.7/site-packages/ipywidgets/widgets/widget.py in set_state(self, sync_data)
    543                     from_json = self.trait_metadata(name, 'from_json',
    544                                                     self._trait_from_json)
--> 545                     self.set_trait(name, from_json(sync_data[name], self))
    546 
    547     def send(self, content, buffers=None):

/opt/conda/lib/python3.7/contextlib.py in __exit__(self, type, value, traceback)
    117         if type is None:
    118             try:
--> 119                 next(self.gen)
    120             except StopIteration:
    121                 return False

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in hold_trait_notifications(self)
   1129                 for changes in cache.values():
   1130                     for change in changes:
-> 1131                         self.notify_change(change)
   1132 
   1133     def _notify_trait(self, name, old_value, new_value):

/opt/conda/lib/python3.7/site-packages/ipywidgets/widgets/widget.py in notify_change(self, change)
    604                 # Send new state to front-end
    605                 self.send_state(key=name)
--> 606         super(Widget, self).notify_change(change)
    607 
    608     def __repr__(self):

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in notify_change(self, change)
   1174                 c = getattr(self, c.name)
   1175 
-> 1176             c(change)
   1177 
   1178     def _add_notifiers(self, handler, name, type):

/opt/conda/lib/python3.7/site-packages/ipywidgets/widgets/widget_upload.py in on_incr_counter(self, change)
     62             name = metadata['name']
     63             res[name] = {'metadata': metadata, 'content': content}
---> 64         self.set_trait('value', res)
     65 
     66     @default('description')

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in set_trait(self, name, value)
   1341                                 (cls.__name__, name))
   1342         else:
-> 1343             getattr(cls, name).set(self, value)
   1344 
   1345     @classmethod

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in set(self, obj, value)
    572             # we explicitly compare silent to True just in case the equality
    573             # comparison above returns something other than True/False
--> 574             obj._notify_trait(self.name, old_value, new_value)
    575 
    576     def __set__(self, obj, value):

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in _notify_trait(self, name, old_value, new_value)
   1137             new=new_value,
   1138             owner=self,
-> 1139             type='change',
   1140         ))
   1141 

/opt/conda/lib/python3.7/site-packages/ipywidgets/widgets/widget.py in notify_change(self, change)
    604                 # Send new state to front-end
    605                 self.send_state(key=name)
--> 606         super(Widget, self).notify_change(change)
    607 
    608     def __repr__(self):

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in notify_change(self, change)
   1174                 c = getattr(self, c.name)
   1175 
-> 1176             c(change)
   1177 
   1178     def _add_notifiers(self, handler, name, type):

~/.local/lib/python3.7/site-packages/aiidalab_widgets_base/structures.py in _on_file_upload(self, change)
    392                 self.structure = self._validate_and_fix_ase_cell(
    393                     get_ase_from_file(
--> 394                         io.StringIO(item["content"].decode()), format=frmt
    395                     )
    396                 )

~/.local/lib/python3.7/site-packages/aiidalab_widgets_base/utils/__init__.py in get_ase_from_file(fname, format)
     30         traj = read(fname, format=format, index=":", store_tags=True)
     31     else:
---> 32         traj = read(fname, format=format, index=":")
     33     if not traj:
     34         print(("Could not read any information from the file {}".format(fname)))

~/.local/lib/python3.7/site-packages/ase/io/formats.py in read(filename, index, format, parallel, **kwargs)
    597     format = format or filetype(filename)
    598 
--> 599     io = ioformats[format]
    600     if isinstance(index, (slice, basestring)):
    601         return list(_iread(filename, index, format, io, parallel=parallel,

KeyError: 'in'

Version (if known)

  • App version: v21.07.0b4

Additional context

πŸ‘Œ IMPROVE: Step 2 Workflow tab

Reorganise the "Workflow" tab in Step 2 as follows:

Structure

First have three options:

  • structure as is
  • optimize atoms
  • optimize atoms and unit cell

Add "Material settings" here as well.

Properties

Here the user can simply select the properties to calculate. Band structure for now, DOS/PDOS later.

Protocol

Same as before.

✨ NEW: Add limit to number of atoms in structure

Since the amount of resources that are typically available on demo/testing deployments is limited, calculating structures with large unit cells will take far too long (if they can even complete). We should put an upper limit on the amount of atoms in the (primitive) unit cell that the app will allow for submission. An error message should appear, clearly stating that "for this demo deployment only structures with a size smaller than X" can be calculated.

If you can figure out the resources at your disposal, you could adjust this size to what's available, and automatically set the max you can spare on this machine in the (hidden) resources tab of Step 2. Hopefully at some point we'll be able to get a halfway decent TTS (time to solution) and memory usage predictor, but until then we have to just play it safe and keep the structures smaller.

We could also have three ranges (e.g. on one core - some might take long though.):

  • X <= 6: No problemo!
  • 6 <= X <= 10: Raise warning
  • > 10: Raise error

Bug report: Application crashed with UnboundLocalError

Automated report

This issue was created with the app's automated bug reporting feature.
Attached to this issue is the full traceback as well as an environment
fingerprint that contains information about the operating system as well as all
installed libraries.

Additional comments (optional):

Example: I submitted a band structure calculation for BaTiO3 on Eiger

Attachments

Traceback
UnboundLocalError                         Traceback (most recent call last)
~/apps/quantum-espresso/aiidalab_qe/widgets.py in _observe_node(self, change)
    229                 clear_output()
    230                 if change["new"]:
--> 231                     display(viewer(change["new"]))
    232 
    233 

~/.local/lib/python3.7/site-packages/aiidalab_widgets_base/viewers.py in viewer(obj, downloadable, **kwargs)
     70     try:
     71         _viewer = AIIDA_VIEWER_MAPPING[obj.node_type]
---> 72         return _viewer(obj, downloadable=downloadable, **kwargs)
     73     except (KeyError) as exc:
     74         if obj.node_type in str(exc):

~/apps/quantum-espresso/aiidalab_qe/node_view.py in __init__(self, node, **kwargs)
    217             "Workflow Summary",
    218         ]
--> 219         self.result_children = [self.get_summary()]
    220         self.result_tabs = ipw.Tab()
    221 

~/apps/quantum-espresso/aiidalab_qe/node_view.py in get_summary(self)
    285 
    286     def get_summary(self):
--> 287         return SummaryView(self.node)
    288 
    289     def get_structure(self):

~/apps/quantum-espresso/aiidalab_qe/node_view.py in __init__(self, wc_node, **kwargs)
    177             return "Yes" if truthy else "No"
    178 
--> 179         report = generate_report_dict(self.wc_node)
    180 
    181         env = Environment()

~/apps/quantum-espresso/aiidalab_qe/report.py in generate_report_dict(qeapp_wc)
     96 def generate_report_dict(qeapp_wc):
     97     """Generate a dictionary for reporting the inputs for the `QeAppWorkChain`"""
---> 98     return dict(_generate_report_dict(qeapp_wc))
     99 
    100 

~/apps/quantum-espresso/aiidalab_qe/report.py in _generate_report_dict(qeapp_wc)
     84         bands_kpoints_distance = qeapp_wc.inputs.bands.bands_kpoints_distance.value
     85 
---> 86     energy_cutoff_wfc = round(pw_parameters["SYSTEM"]["ecutwfc"])
     87     energy_cutoff_rho = round(pw_parameters["SYSTEM"]["ecutrho"])
     88 

UnboundLocalError: local variable 'pw_parameters' referenced before assignment
Environment fingerprint
eNp9WF1v67gR_SuB-7oyLNmOk_u2zXYfipv27uZuF0VRFJREWbQpkSGpOMri_vcdzgxl5gYokhcffs-
cOTOjP1Yv0nllxtWn8oeV1SJ0xg2rT3-shGt6FWQTJidXn_6zut3VKqx-WK3-C_Pm0Jvxf8vS1XZ9WN_D4BX5S3nz9Pjl5uskbx7
FfFOWN9Xm037zaXO4-e3rA_yoytU32Ek0Z3GUHk9UqhVFLcbWF2r0Fs6GjTbr3XoDW_OoOrYdwdX6doEb0wZjNGyzqtZlNr8x8fa
rcn273l5BW50R3OYz3eyD0OUBNy_zTdpWNjj_Hai6DsEqAzstJ_cBPYrJeyVGHNity2VAi2GwHg-8y-ZrPxicu8nAUYwG3NEXcrA
Cl-S3NzaoQb3JDwazXk6tQfh2XS3ws3xOJ4jrfZ4nMYZpk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9SDkeQJL0LyKhDJhBT4sq-CdhMWptqbU4CYxSB27Z12kwhzL0LvNMrq
Oo0v4foevuX3ZcIMDqQ4irIBezFHzUO0SzqFClPdS1IanlJQnvZRnm_LRPVLkCVJe9dUJ32fOByGe7NJY3UetQrpHzd6UmxjVvpc
6dhG9GDJm-h4qvWlSbcYtr2KrE0sXKgpJab16pbAmbfGjudTQrAJZh4GjlFzt7TEVR6xtTxieXAHhCRSvICpzDf0K91Rkfh6DRNa
ZaYQ2EqrXrK_gYUgR6bsJOZLwJnajUChAj68lPNhmafv9DGgNoU3wRaugTQnQ_Wdk_X7my__dKX5e4AkVV13vJ5z8UlJssjek4ee
Qbb_9MAwSqKCXeYuuSx8ySswpNA_KTijT4Rmi61KNijz55fOPOpaeS2zs3qHFb0uhvb3FDyj-WaPkpoosQkG4mMFlyjtR9P1Us-h
vK3TqHtXDz6nOiJtB3py0CKkMiyIC2Rz6b8Hf1LjXiKK1fHchaoX4pGlUsf1sKfdGs0ShEa0FkjdBc7-H000KRfIOaBofQuwLz-2
AqWbPv51QQac2hUiHGOQy6bM-A36D0amdiJ8-fOqRyMnhDepjQTeJ06cxfqkQkNeV5Knopsl2IFwFx1PKEZODaKy3lBYp_v8loO2
as4rkxWiI6smk7xN0zkWEpm_NMb052v7SQOm_fLyKp15kLUewH7wghUlc_Lt05zc5HTM2XnopdeJBPJa6CPqcvHweolzHQ98XRxU
_lfuPsV5sxvzAc6CZpXRa0vOgk1h6o6iB8SEz8C2TxDeF3yqpFfj27U8BMaRK

By submitting this issue I confirm that I am aware that this information can
potentially be used to determine what kind of calculation was performed at the
time of error.

Access to additional flags/override existing ones

The idea is to allow expert users in "expert mode" access to specify additional flags or override already specified ones by the protocol.

One way this could be achieved is through some small editor-type field where the user can specify a Dict-like structure (either an actual python Dict, or yaml or json), which will then be merged with the default one defined by the protocol.

Cannot launch v 21.07.0b3 QE-app

After making my github membership public , I updated to version 21.07.0b3 and didn’t do anything else. I cannot launch the app (see screen shot below) Not sure if this is a β€˜global issue’ or just one on my end?

image

πŸ› Synchronize the displayed `kpoints_distance` with the one selected for different protocols

When we select a protocol in the main tab of step two, it doesn't update the default kpoints_distance that is shown in the "Advanced Settings" tab. This should be fixed, so it's clear what the default is for the protocol that the user has chosen. I'd also like to double check that this was actually the value that was used.

A great way of checking all these input settings is re-introducing the parameters tab, but then in the "Workflow Summary" I think it has more of a place there, and will make it easy to discover/debug issues.

Improve the band structure plotting

Some ideas to improve the band structure plotting:

  • (1) The Fermi energy needs to, at least be indicated, or, even better, be set to 0
  • (2) Y-label changed from 'dispersion' to 'Energy', 'E', or 'electronic dispersion' (there are other dispersions that are commonly plotted in a similar fashion aside from electronic energy dispersion - mostly phonon dispersions...). If the Fermi energy is set to be 0, then the label should be something like 'E-E_F'
  • (3) A smaller window would be better, maybe E_F +/- 5 eV or so? Anyway, the really low bands are often just not physical, and the high bands are really sensitive to the energy cutoffs used and can show funny unphysical results as well.
  • (4) For ferromagnetic calculations, a way to distinguish between the spin-up and spin-down bands. ( you can compare the results of pk 630 to https://materialsproject.org/materials/mp-13/)

πŸ‘Œ IMPROVE: Revert to checkbox for selecting properties to calculate

Currently we use a toggle button for selecting which properties to calculate. However, due to the limited styling options for the buttons, this isn't always very clear, especially for colorblind users. We should revert to using a checkbox for selecting which properties to calculate.

Other suggestions from @giovannipizzi:

  • Calculate the band structure by default.
  • Rename "Geometry" to "Optimize Geometry".

Remove the "Expert mode"

When at Step 2: Submit work chain, it is possible to click on "Expert mode".

For like 10 min I though there was a bug as nothing was happening.

Then I realized that there was "new tab" open on the top next to "Workflow".

My suggestion would be to remove the "Expert mode" button and always display the "Advanced setting" and Code& resources option. If the user does not click on them or specify nothing then it should still work as in not expert mode.
It is not too overwhelming to have these additional tab there even for non-expert.

  • Samuel

πŸ‘Œ IMPROVE: Basic approach for dealing with non-3D structures

All of the setup and protocols currently only really consider 3D structures, and running anything else quickly results in issues:

  • 2D: seekpath fails since there is a check that the system is periodic in all three directions.
  • Molecule: A simple molecule took very long to run. This might be related to the fact that the protocol doesn't consider the periodic boundary conditions at the moment, and so even with the large unit cell it could use more than just one k-point.

We should have some basic way of dealing with these problems for the release. Either we block the selection of such structures for now, or fix e.g. the k-points issue at the app level (although over time we may want to fix this for the plugin).

πŸ› FIX: Bug when going back to new workflow

During a demo session, I already ran a workflow and then played around with the Steps a bit, and then selected "New calculation". I haven't been able to reproduce it, but this was the Trace:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/opt/conda/lib/python3.7/site-packages/ipywidgets/widgets/widget.py in _handle_msg(self, msg)
    674                 if 'buffer_paths' in data:
    675                     _put_buffers(state, data['buffer_paths'], msg['buffers'])
--> 676                 self.set_state(state)
    677 
    678         # Handle a state request.

/opt/conda/lib/python3.7/site-packages/ipywidgets/widgets/widget.py in set_state(self, sync_data)
    543                     from_json = self.trait_metadata(name, 'from_json',
    544                                                     self._trait_from_json)
--> 545                     self.set_trait(name, from_json(sync_data[name], self))
    546 
    547     def send(self, content, buffers=None):

/opt/conda/lib/python3.7/contextlib.py in __exit__(self, type, value, traceback)
    117         if type is None:
    118             try:
--> 119                 next(self.gen)
    120             except StopIteration:
    121                 return False

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in hold_trait_notifications(self)
   1129                 for changes in cache.values():
   1130                     for change in changes:
-> 1131                         self.notify_change(change)
   1132 
   1133     def _notify_trait(self, name, old_value, new_value):

/opt/conda/lib/python3.7/site-packages/ipywidgets/widgets/widget.py in notify_change(self, change)
    604                 # Send new state to front-end
    605                 self.send_state(key=name)
--> 606         super(Widget, self).notify_change(change)
    607 
    608     def __repr__(self):

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in notify_change(self, change)
   1174                 c = getattr(self, c.name)
   1175 
-> 1176             c(change)
   1177 
   1178     def _add_notifiers(self, handler, name, type):

/opt/conda/lib/python3.7/site-packages/ipywidgets/widgets/widget_selection.py in _propagate_index(self, change)
    233             self.label = label
    234         if self.value is not value:
--> 235             self.value = value
    236 
    237     @validate('value')

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in __set__(self, obj, value)
    583             raise TraitError('The "%s" trait is read-only.' % self.name)
    584         else:
--> 585             self.set(obj, value)
    586 
    587     def _validate(self, obj, value):

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in set(self, obj, value)
    572             # we explicitly compare silent to True just in case the equality
    573             # comparison above returns something other than True/False
--> 574             obj._notify_trait(self.name, old_value, new_value)
    575 
    576     def __set__(self, obj, value):

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in _notify_trait(self, name, old_value, new_value)
   1137             new=new_value,
   1138             owner=self,
-> 1139             type='change',
   1140         ))
   1141 

/opt/conda/lib/python3.7/site-packages/ipywidgets/widgets/widget.py in notify_change(self, change)
    604                 # Send new state to front-end
    605                 self.send_state(key=name)
--> 606         super(Widget, self).notify_change(change)
    607 
    608     def __repr__(self):

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in notify_change(self, change)
   1174                 c = getattr(self, c.name)
   1175 
-> 1176             c(change)
   1177 
   1178     def _add_notifiers(self, handler, name, type):

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in _update(self, change)
    345         with self._busy_updating():
    346             setattr(self.target[0], self.target[1],
--> 347                     self._transform(change.new))
    348 
    349     def unlink(self):

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in __set__(self, obj, value)
    583             raise TraitError('The "%s" trait is read-only.' % self.name)
    584         else:
--> 585             self.set(obj, value)
    586 
    587     def _validate(self, obj, value):

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in set(self, obj, value)
    572             # we explicitly compare silent to True just in case the equality
    573             # comparison above returns something other than True/False
--> 574             obj._notify_trait(self.name, old_value, new_value)
    575 
    576     def __set__(self, obj, value):

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in _notify_trait(self, name, old_value, new_value)
   1137             new=new_value,
   1138             owner=self,
-> 1139             type='change',
   1140         ))
   1141 

/opt/conda/lib/python3.7/site-packages/ipywidgets/widgets/widget.py in notify_change(self, change)
    604                 # Send new state to front-end
    605                 self.send_state(key=name)
--> 606         super(Widget, self).notify_change(change)
    607 
    608     def __repr__(self):

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in notify_change(self, change)
   1174                 c = getattr(self, c.name)
   1175 
-> 1176             c(change)
   1177 
   1178     def _add_notifiers(self, handler, name, type):

<ipython-input-2-c951e308e80f> in _observe_process_selection(change)
     73         with structure_manager_widget.hold_sync():
     74             with structure_selection_step.hold_sync():
---> 75                 structure_manager_widget.structure = process.inputs.structure
     76                 structure_selection_step.structure = process.inputs.structure
     77                 structure_selection_step.confirmed_structure = process.inputs.structure

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in __set__(self, obj, value)
    583             raise TraitError('The "%s" trait is read-only.' % self.name)
    584         else:
--> 585             self.set(obj, value)
    586 
    587     def _validate(self, obj, value):

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in set(self, obj, value)
    572             # we explicitly compare silent to True just in case the equality
    573             # comparison above returns something other than True/False
--> 574             obj._notify_trait(self.name, old_value, new_value)
    575 
    576     def __set__(self, obj, value):

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in _notify_trait(self, name, old_value, new_value)
   1137             new=new_value,
   1138             owner=self,
-> 1139             type='change',
   1140         ))
   1141 

/opt/conda/lib/python3.7/site-packages/ipywidgets/widgets/widget.py in notify_change(self, change)
    604                 # Send new state to front-end
    605                 self.send_state(key=name)
--> 606         super(Widget, self).notify_change(change)
    607 
    608     def __repr__(self):

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in notify_change(self, change)
   1174                 c = getattr(self, c.name)
   1175 
-> 1176             c(change)
   1177 
   1178     def _add_notifiers(self, handler, name, type):

/opt/conda/lib/python3.7/site-packages/aiidalab_widgets_base/structures.py in _structure_changed(self, change)
    341         self.btn_store.disabled = False
    342         with self.hold_trait_notifications():
--> 343             self._sync_structure_node()
    344 
    345 

/opt/conda/lib/python3.7/contextlib.py in __exit__(self, type, value, traceback)
    117         if type is None:
    118             try:
--> 119                 next(self.gen)
    120             except StopIteration:
    121                 return False

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in hold_trait_notifications(self)
   1129                 for changes in cache.values():
   1130                     for change in changes:
-> 1131                         self.notify_change(change)
   1132 
   1133     def _notify_trait(self, name, old_value, new_value):

/opt/conda/lib/python3.7/site-packages/ipywidgets/widgets/widget.py in notify_change(self, change)
    604                 # Send new state to front-end
    605                 self.send_state(key=name)
--> 606         super(Widget, self).notify_change(change)
    607 
    608     def __repr__(self):

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in notify_change(self, change)
   1174                 c = getattr(self, c.name)
   1175 
-> 1176             c(change)
   1177 
   1178     def _add_notifiers(self, handler, name, type):

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in _update(self, change)
    345         with self._busy_updating():
    346             setattr(self.target[0], self.target[1],
--> 347                     self._transform(change.new))
    348 
    349     def unlink(self):

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in __set__(self, obj, value)
    583             raise TraitError('The "%s" trait is read-only.' % self.name)
    584         else:
--> 585             self.set(obj, value)
    586 
    587     def _validate(self, obj, value):

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in set(self, obj, value)
    572             # we explicitly compare silent to True just in case the equality
    573             # comparison above returns something other than True/False
--> 574             obj._notify_trait(self.name, old_value, new_value)
    575 
    576     def __set__(self, obj, value):

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in _notify_trait(self, name, old_value, new_value)
   1137             new=new_value,
   1138             owner=self,
-> 1139             type='change',
   1140         ))
   1141 

/opt/conda/lib/python3.7/site-packages/ipywidgets/widgets/widget.py in notify_change(self, change)
    604                 # Send new state to front-end
    605                 self.send_state(key=name)
--> 606         super(Widget, self).notify_change(change)
    607 
    608     def __repr__(self):

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in notify_change(self, change)
   1174                 c = getattr(self, c.name)
   1175 
-> 1176             c(change)
   1177 
   1178     def _add_notifiers(self, handler, name, type):

<ipython-input-2-c951e308e80f> in _observe_structure_selection(change)
     56         if structure_selection_step.confirmed_structure is not None and \
     57                 structure_selection_step.confirmed_structure != change['new']:
---> 58             app.reset()
     59 structure_selection_step.observe(_observe_structure_selection, 'structure')
     60 

/opt/conda/lib/python3.7/site-packages/aiidalab_widgets_base/wizard.py in reset(self, step)
    246             for index in reversed(range(step, len(self.accordion.children))):
    247                 if hasattr(self.accordion.children[index], "reset"):
--> 248                     self.accordion.children[index].reset()
    249             self.accordion.selected_index = step
    250 

~/apps/quantum-espresso/aiidalab_qe/steps.py in reset(self)
    756 
    757     def reset(self):
--> 758         self.process = None
    759 
    760     def _update_state(self):

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in __set__(self, obj, value)
    583             raise TraitError('The "%s" trait is read-only.' % self.name)
    584         else:
--> 585             self.set(obj, value)
    586 
    587     def _validate(self, obj, value):

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in set(self, obj, value)
    572             # we explicitly compare silent to True just in case the equality
    573             # comparison above returns something other than True/False
--> 574             obj._notify_trait(self.name, old_value, new_value)
    575 
    576     def __set__(self, obj, value):

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in _notify_trait(self, name, old_value, new_value)
   1137             new=new_value,
   1138             owner=self,
-> 1139             type='change',
   1140         ))
   1141 

/opt/conda/lib/python3.7/site-packages/ipywidgets/widgets/widget.py in notify_change(self, change)
    604                 # Send new state to front-end
    605                 self.send_state(key=name)
--> 606         super(Widget, self).notify_change(change)
    607 
    608     def __repr__(self):

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in notify_change(self, change)
   1174                 c = getattr(self, c.name)
   1175 
-> 1176             c(change)
   1177 
   1178     def _add_notifiers(self, handler, name, type):

~/apps/quantum-espresso/aiidalab_qe/steps.py in _observe_process(self, change)
    776     @traitlets.observe("process")
    777     def _observe_process(self, change):
--> 778         self._update_state()

~/apps/quantum-espresso/aiidalab_qe/steps.py in _update_state(self)
    760     def _update_state(self):
    761         if self.process is None:
--> 762             self.state = self.State.INIT
    763         else:
    764             process_state = self.process.process_state

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in __set__(self, obj, value)
    583             raise TraitError('The "%s" trait is read-only.' % self.name)
    584         else:
--> 585             self.set(obj, value)
    586 
    587     def _validate(self, obj, value):

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in set(self, obj, value)
    572             # we explicitly compare silent to True just in case the equality
    573             # comparison above returns something other than True/False
--> 574             obj._notify_trait(self.name, old_value, new_value)
    575 
    576     def __set__(self, obj, value):

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in _notify_trait(self, name, old_value, new_value)
   1137             new=new_value,
   1138             owner=self,
-> 1139             type='change',
   1140         ))
   1141 

/opt/conda/lib/python3.7/site-packages/ipywidgets/widgets/widget.py in notify_change(self, change)
    604                 # Send new state to front-end
    605                 self.send_state(key=name)
--> 606         super(Widget, self).notify_change(change)
    607 
    608     def __repr__(self):

/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py in notify_change(self, change)
   1174                 c = getattr(self, c.name)
   1175 
-> 1176             c(change)
   1177 
   1178     def _add_notifiers(self, handler, name, type):

/opt/conda/lib/python3.7/site-packages/aiidalab_widgets_base/wizard.py in _update_step_state(self, _)
    191             self._update_titles()
    192             self._update_buttons()
--> 193             self._consider_auto_advance()
    194 
    195     @traitlets.observe("selected_index")

/opt/conda/lib/python3.7/site-packages/aiidalab_widgets_base/wizard.py in _consider_auto_advance(self, _)
    178         with self.hold_trait_notifications():
    179             index = self.accordion.selected_index
--> 180             last_step_selected = index + 1 == len(self.accordion.children)
    181             selected_widget = self.accordion.children[index]
    182             if (

TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'

Relabel the "Store in database" button with "Confirm"

The purpose of the "Store in database" button is to store any changes made to the structure when using the tools that allow this (@yakutovicha can explain more). However, I don't think these tools are currently available in the QE app, and even if they were we could just automatically store this link + the new structure (and old one if it didn't come from the local database) when the user clicks on "Confirm" (or perhaps better: "Submit").

The description of the node could also contain some automatically generated text based on the changes made to the structure.

πŸ‘Œ IMPROVE: Add more explanation to material settings

Currently there is very little explanation to the materials settings (none, in fact). Would be good to explain the differences in layman's terms, since these settings are not part of the "Expert mode" panels. Also make the values more user friendly than METAL, COLLINEAR, etc...

✨NEW: rSCF to find material type

The user can currently specify two "Material settings":

  • SpinType - Is the structure magnetic?
  • ElectronicType - Is the structure a metal/insulator?

Although this is already fine, it would be a vast improvement if we could set these (either or both) to "Automatic", and simply run a reconnaissance SCF to figure out the setting automatically. This could simply be added to the work chain in case the user sets one of the two to "Automatic".

Magnetism

Here we would use the rudimentary approach we have for our HT projects, as well as the one implemented in the protocol: Simply set the magnetic moments to the highest value based on which shell is partially occupied for that element (d -> 5; f -> 7). This will of course:

  1. Only find ferromagnetic configurations.
  2. Only find the high-spin configurations.
  3. Non-magnetic materials might get stuck in local minimum and be labeled magnetic.

Hence, it might already be an improvement to fix [3] by also running the structure in a non-magnetic configuration. Pinging @mkotiuga. @flavianojs for comments.

To be a metal or not to be a metal?

This can be checked immediately using the calculations for the magnetic configuration, by continuing with the configuration that has the lowest energy and checking:

  • The smearing energy. If this is very low, the material is typically an insulator.
  • The occupations. If the occupations are all close to being fully occupied or empty, the material is once again typically an insulator.

Pinging @lorisercole for comments. Also wanted to touch base with Tushar on this, but I don't know his GitHub handle?

πŸ‘Œ IMPROVE: Use user-friendly aliases for work chains and outputs

In step 3 we show the work chains and outputs based on their actual class and link names. To make the app more user-friendly for non-expert users, it would be good to replace e.g. PwBandsWorkChain by something along the lines of "Band structure workflow" and output_structure by "Final Geometry" etc.

πŸ‘Œ IMPROVE: select primitive cell in `StructureSelectionStep`

After querying for e.g. Al in the following example:

Screenshot 2021-06-07 at 08 54 08

I am happy with the structure I found, but want to take the primitive (instead of conventional) unit cell to run the calculations, since this represents the same structure but requires fewer resources. However, that doesn't seem to be an option? I'd remove this "Camera type" selector and instead allow the user to switch between the conventional and unit cell.

One way to do this would be to rely on pymatgen's SpaceGroupAnalyzer:

https://pymatgen.org/pymatgen.symmetry.analyzer.html#pymatgen.symmetry.analyzer.SpacegroupAnalyzer

πŸ‘Œ IMPROVE: App header + welcome text

Currently I just added a title in #54. This is already better than nothing, but I think there should be a little text here to explain the concept and how to get started. Nothing massive, of course. Some bullet point for content:

  • Purpose of the app
  • How it works, i.e. you select a structure and run a work chain where you can select the properties you want to calculate.
  • How to find previous results.

I would add a bunch of emoji's to this to make it less dry. 😁

`ValueError` when trying to submit with no code selected

After opening the QE app, I take the following steps:

  1. Select Si2 structure from the examples. Click confirm.
  2. Set up new code, but don't select it
  3. Choose a pseudopotential after it is downloaded
  4. Click on submit

This raises a ValueError, because the code is None:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
~/apps/quantum-espresso/codes.py in _on_submit_button_clicked(self, _)
    307         self.submit_button.disabled = True
    308         self.state = WizardApp.State.ACTIVE
--> 309         self.submit()
    310 
    311     def submit(self, _):

~/apps/quantum-espresso/bands.py in submit(self, _)
     97         builder = WorkflowFactory('quantumespresso.pw.bands').get_builder()
     98 
---> 99         builder.scf.pw.code = self.code_group.selected_code
    100         builder.scf.pw.parameters = load_default_parameters()
    101         builder.scf.pw.metadata.options = self.options

/opt/conda/lib/python3.7/site-packages/aiida/engine/processes/builder.py in __setattr__(self, attr, value)
     87                 validation_error = port.validate(value)
     88                 if validation_error:
---> 89                     raise ValueError('invalid attribute value {}'.format(validation_error.message))
     90 
     91             self._data[attr] = value

ValueError: invalid attribute value value 'code' is not of the right type. Got '<class 'NoneType'>', expected '<class 'aiida.orm.nodes.data.code.Code'>'

πŸ‘Œ IMPROVE: Set max resources based on computer

Currently the user can specify whatever resources he/she likes in the ResourceSelectionWidget. This can lead to calculations failing, but also to significant slowdowns when the code is run on the localhost. I see three things that we should improve here:

  • Allow the user to specify resources separately for each code.
  • Determine the max number of CPU's available. For the localhost, this can be achieved with os.cpu_count(). For the remote computers, this is usually specified as mpiprocs_per_machine.
  • Limit the amount of resources that can be specified:
    • Nodes: 1 for the localhost. For the remote computer, we should perhaps let this be configurable and stored as an extra?
    • CPUs: For the remotes, this should be mpiprocs_per_machine by default and also enforced as a maximum. The localhost should probably leave at least 1 CPU, so maybe max(1, os.cpu_count() - 1) should be the maximum?

Since we'll be touching this part of the code, I think it makes sense that we also:

  • Disable the dos.x and projwfc.x codes when the PDOS is not being calculated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.