Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running PDOS workchain and plot bands + pdos #159

Merged
merged 1 commit into from
Jan 19, 2022
Merged

Conversation

unkcpz
Copy link
Member

@unkcpz unkcpz commented Nov 19, 2021

Fixes #62

  • The PR is blocked by NodesTreeWidget: find outputs not working for nested namespace aiidalab-widgets-base#262 since pdos workchain have outputs in namespace.
  • Clean qe.ipynb
  • add checkbox and able to run PDOS workchain when the box checked
  • newly added pdos and projwfc code setting will break backward compatibility.
  • newly added codes is not default set for the code dropdown widget.
  • Dependency: new aiida-quantumespresso plugin otherwise will raise tetrahydro setting error.
  • bands+pdos plot
  • show_band_structure widget tab name change. When only one bands or pdos calculation run.
  • aiida-quantumespresso 3.5.0 for the tetrahedra override

@unkcpz unkcpz marked this pull request as draft November 19, 2021 17:07
@mbercx
Copy link
Member

mbercx commented Nov 25, 2021

@unkcpz aiida-quantumespresso 3.5.0 is now released with the fix you need for the tetrahedra override, so you can update the dependency.

@unkcpz unkcpz requested review from mbercx and csadorf and removed request for mbercx November 25, 2021 16:22
@unkcpz
Copy link
Member Author

unkcpz commented Nov 25, 2021

For the band structure output view widget tab name, it is only a good to have feature. So I think this PR is ready to review.

@unkcpz unkcpz marked this pull request as ready for review November 25, 2021 16:24
Copy link
Member

@mbercx mbercx left a comment

Choose a reason for hiding this comment

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

Thanks @unkcpz! Just left some minor comments. Two other things:

  1. The dependency version of aiida-quantumespresso doesn't seem to be upgraded to 3.5.0?
  2. When I refresh the app, the dos.x and projwfc.x codes weren't automatically set to the defaults. But this is most likely because I didn't install the app with this branch, since if I understand correctly the default are set upon installation.

aiidalab_qe/steps.py Outdated Show resolved Hide resolved
aiidalab_qe/node_view.py Outdated Show resolved Hide resolved
@unkcpz unkcpz mentioned this pull request Nov 29, 2021
4 tasks
@unkcpz
Copy link
Member Author

unkcpz commented Nov 29, 2021

@mbercx Thanks a lot for the review.

The dependency version of aiida-quantumespresso doesn't seem to be upgraded to 3.5.0?

Ah, true. I forget to push the latest commits with some other changes.

I refresh the app, the dos.x and projwfc.x codes weren't automatically set to the defaults. But this is most likely because I didn't install the app with this branch, since if I understand correctly the default are set upon installation

This is an issue, I think the dos.x and projwfc.x were installed with pw.x. Just not sure which line of code influence this default fresh and setting behavior. I need to check this more.

aiidalab_qe/steps.py Outdated Show resolved Hide resolved
aiidalab_qe/steps.py Outdated Show resolved Hide resolved
aiidalab_qe/steps.py Outdated Show resolved Hide resolved
@unkcpz
Copy link
Member Author

unkcpz commented Dec 9, 2021

I make all the changes you mentioned in the review, but I need to give it a final run and test. Will request another review after it.

@unkcpz
Copy link
Member Author

unkcpz commented Jan 5, 2022

When I refresh the app, the dos.x and projwfc.x codes weren't automatically set to the defaults. But this is most likely because I didn't install the app with this branch, since if I understand correctly the default are set upon installation.

I am not sure since I create a new container with install the app with this branch but got the QE setup error 'NoneType' object has no attribute 'uuid'. @csadorf I am a bit lot in the QESetupWidget code. Could you tell me where this error might come from? The thing confuse me is in the method SubmitQeAppWorkChainStep:_auto_select_code it calls get_input_parameters which need the corresponding code selector being set?

Moreover, I can not figure out how to retrigger the codes install and code setup or maybe just manually set the related parameters for code dos and projwfc? I don't think create a new container to get the code set is a convenient way to do this.

@unkcpz
Copy link
Member Author

unkcpz commented Jan 7, 2022

The only block of this is the code selector not setting the default code as expected.

@csadorf
Copy link
Member

csadorf commented Jan 7, 2022

The only block of this is the code selector not setting the default code as expected.

I will try to reproduce the issue.

@csadorf
Copy link
Member

csadorf commented Jan 7, 2022

I think we should have a bot that automatically generates the following command for us 😁 :

aiidalab install quantum-espresso@git+https://github.com/unkcpz/aiidalab-qe@pdos --yes

@csadorf
Copy link
Member

csadorf commented Jan 7, 2022

I am still investigating, but I will start to try to answer some of your questions.

When I refresh the app, the dos.x and projwfc.x codes weren't automatically set to the defaults. But this is most likely because I didn't install the app with this branch, since if I understand correctly the default are set upon installation.

I just installed this app version in a new environment and did not experience any issues with the qe installation. However, I also found that the codes were not selected by default.

I am not sure since I create a new container with install the app with this branch but got the QE setup error 'NoneType' object has no attribute 'uuid'. @csadorf I am a bit lot in the QESetupWidget code. Could you tell me where this error might come from?

I am not able to reproduce this problem.

The thing confuse me is in the method SubmitQeAppWorkChainStep:_auto_select_code it calls get_input_parameters which need the corresponding code selector being set?

Indeed, I am not exactly sure how that currently works either. I will keep investigating.

Moreover, I can not figure out how to retrigger the codes install and code setup or maybe just manually set the related parameters for code dos and projwfc? I don't think create a new container to get the code set is a convenient way to do this.

To re-trigger the setup process just remove the AiiDA codes with the corresponding labels (pw-6.7@localhost etc.) and optionally also remove the quantum-espresso-6.7 conda environment.

Edit: You also have to remove the .do-not-setup-on-localhost file in the app folder. The file is created whenever a previous setup attempt failed to avoid that the setup process starts every single time the app is opened.

@csadorf
Copy link
Member

csadorf commented Jan 7, 2022

I can confirm that the pw.x code is currently not automatically selected, not even on the "master" branch. Trying to figure out when and how this regression was introduced.

I have reported the issue here: #164

@csadorf
Copy link
Member

csadorf commented Jan 7, 2022

Please rebase this branch after merging #167 .

Copy link
Member

@csadorf csadorf left a comment

Choose a reason for hiding this comment

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

Please apply my suggestion on how to fix the remaining code selection issue and then rebase on master after #167 has been merged.

aiidalab_qe/steps.py Outdated Show resolved Hide resolved
Comment on lines 501 to 505
self.codes_selector.pw.selected_code = _load_code(parameters["pw_code"])
self.codes_selector.dos.selected_code = _load_code(parameters["dos_code"])
self.codes_selector.projwfc.selected_code = _load_code(
parameters["projwfc_code"]
)
Copy link
Member

Choose a reason for hiding this comment

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

I would recommend to refactor this into a loop and keep the catch of the NotExistent exception for robustness:

for code in ("pw_code", "dos_code", ...):
    try:
        ...
    except NotExistent:
        pass

@unkcpz unkcpz force-pushed the pdos branch 4 times, most recently from 81a6161 to 984cba0 Compare January 10, 2022 08:42
@unkcpz unkcpz requested a review from csadorf January 10, 2022 08:45
@unkcpz
Copy link
Member Author

unkcpz commented Jan 10, 2022

Hi @csadorf, I have run bumpver update to create a new tag: v22.01.0. I need then push this tag? Or do this after pr #169 merged?

@csadorf
Copy link
Member

csadorf commented Jan 10, 2022

Hi @csadorf, I have run bumpver update to create a new tag: v22.01.0. I need then push this tag? Or do this after pr #169 merged?

As discussed offline, we should not bump the version on the feature branch. That said, bumpver should have pushed the tag, not sure why that did not happen.

Copy link
Member

@csadorf csadorf left a comment

Choose a reason for hiding this comment

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

I tested this on the latest aiidalab version and everything appeared to work fine, however the DOS and the Projwfc calculations never appeared to fully finish:
Screen Shot 2022-01-10 at 12 42 01

That's despite the fact the logs appear completed:
Screen Shot 2022-01-10 at 12 42 08

I have one last question regarding the widgets base requirement, but other than that this is good to go.

setup.cfg Outdated Show resolved Hide resolved
Add features to submit widget and output view widget to support running
PdosWorkChain and show the pdos results.
Copy link
Member

@csadorf csadorf left a comment

Choose a reason for hiding this comment

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

I reviewed the code and just ran a pdos work chain for testing on Si.
Screen Shot 2022-01-19 at 18 54 57

Everything appears to be working. 👍

@csadorf csadorf merged commit 4d81d64 into aiidalab:master Jan 19, 2022
@unkcpz unkcpz deleted the pdos branch May 18, 2023 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support the aiida-quantumespresso PdosWorkChain
3 participants