aiidalab / aiidalab-qe Goto Github PK
View Code? Open in Web Editor NEWAiiDAlab App for Quantum ESPRESSO
Home Page: https://aiidalab-qe.readthedocs.io/
License: MIT License
AiiDAlab App for Quantum ESPRESSO
Home Page: https://aiidalab-qe.readthedocs.io/
License: MIT License
After querying for e.g. Al in the following example:
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
Some ideas to improve the band structure plotting:
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:
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.
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.
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:
And made the layout pretty. π
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
When selecting a dictionary output in Step 3, there are several improvements that can be made:
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.):
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...
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
It might be possible to add scrolling buttons to the output follower widget to be able to scroll to previous output.
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:
Once aiidateam/aiida-sssp#25 is merged, we should replace the Dropdown pseudo selector (with hardcoded pseudo-family names) with the SsspSelectorWidget
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.
We should consider whether the layout is improved by placing the welcome text within a step / tab.
After opening the QE app, I take the following steps:
Si2
structure from the examples. Click confirm.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'>'
When downloading an output file while the calculation is running, the downloaded file only contains the currently shown lines
Some of the selection widgets (e.g. the kpoints distance) do not yet have units. Make sure every inputs and output has clearly defined units.
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
All of the setup and protocols currently only really consider 3D structures, and running anything else quickly results in issues:
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).
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.
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.
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
Reorganise the "Workflow" tab in Step 2 as follows:
First have three options:
Add "Material settings" here as well.
Here the user can simply select the properties to calculate. Band structure for now, DOS/PDOS later.
Same as before.
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?
In Step three, the StructureDataViewer
in the "Final Geometry" tab is not showing the structure properly. This is most likely related to this issue:
There is a suggested fix there, but I didn't manage to get this to work yet. This may be due to the convoluted logic I implemented to have these Tab
s only show up once the results are completed.
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:
-
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.
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.
Original comment by @yakutovicha
If one runs a calculation, then switches to a completed one, and then switches back to the running calculation - the on-the-fly output gets frozen.
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.
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:
Workflow:
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.
'process list' feature
π Do you think it makes sense to use tools like isort
?
Originally posted by @mbercx in #73 (comment)
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
---------------------------------------------------------------------------
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)
Additional context
Currently the PdosWorkChain
is not supported by the QEapp, limiting the properties to geometry and band structure. Since the work chain is there and very useful, we should add support for it ASAP.
There are still some issues on aiida-quantumespresso
that need to be fixed, though, see for example:
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.
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:
---------------------------------------------------------------------------
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
Currently the expert user cannot set the smearing settings (smearing
and degauss
) when running a metal (ElectronicType.METAL
). This should be added to the "Advanced Settings" page.
Currently, when things break because an error is raised, the whole Trace is printed out, and things get funky. It would be better if we could somehow catch this and give a clean error messages that creates a report (strack trace + state + inputs?) that is stored on the cluster.
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.
_Example: I submitted a calculation for Ca like pk 707, this one has pk 709 _
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
eNp9WF1v67gR_SuB-7oyLNmOk_u2zXYfipv27uZuF0VRFJREWbQpkSGpOMri_vcdzgxl5gYokhcffs- cOTOjP1Yv0nllxtWn8oeV1SJ0xg2rT3-shGt6FWQTJidXn_6zut3VKqx-WK3-C_Pm0Jvxf8vS1XZ9WN_D4BX5S3nz9Pjl5uskbx7 FfFOW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YUFAM5_WaIXMhQFAtUMeN2j_PTL5-5NyHkH-JB80q6-T-tHJ-ePlNkME3n-EAOF5h4QAwQaH6Sqw58sB8gYH2 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.
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 /...).
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:
localhost
, this can be achieved with os.cpu_count()
. For the remote computers, this is usually specified as mpiprocs_per_machine
.localhost
. For the remote computer, we should perhaps let this be configurable and stored as an extra?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:
dos.x
and projwfc.x
codes when the PDOS is not being calculated.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.
Example: I submitted a band structure calculation for BaTiO3 on Eiger
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
eNp9WF1v67gR_SuB-7oyLNmOk_u2zXYfipv27uZuF0VRFJREWbQpkSGpOMri_vcdzgxl5gYokhcffs- cOTOjP1Yv0nllxtWn8oeV1SJ0xg2rT3-shGt6FWQTJidXn_6zut3VKqx-WK3-C_Pm0Jvxf8vS1XZ9WN_D4BX5S3nz9Pjl5uskbx7 FfFOWN9Xm037zaXO4-e3rA_yoytU32Ek0Z3GUHk9UqhVFLcbWF2r0F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ePlNkME3n-EAOF5h4QAwQaH6Sqw58sB8gYH2 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.
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".
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:
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.
This can be checked immediately using the calculations for the magnetic configuration, by continuing with the configuration that has the lowest energy and checking:
Pinging @lorisercole for comments. Also wanted to touch base with Tushar on this, but I don't know his GitHub handle?
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'
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:
I would add a bunch of emoji's to this to make it less dry. π
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.