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

add PseudoDojo #387

Merged
merged 10 commits into from
Jun 20, 2023
Merged

add PseudoDojo #387

merged 10 commits into from
Jun 20, 2023

Conversation

superstar54
Copy link
Member

@superstar54 superstar54 commented Apr 26, 2023

Here, two pseudo families added:

  • PseudoDojo/0.4/PBE/SR/standard/upf
  • PseudoDojo/0.4/PBEsol/SR/standard/upf

I didn't touch the installation process, thus, it still uses the aiida-pseudo install method like that for SSSP.

GUI

The GUI of pseudo selection is now:

Screenshot from 2023-04-26 16-22-18

@superstar54 superstar54 linked an issue Apr 26, 2023 that may be closed by this pull request
@AndresOrtegaGuerrero
Copy link
Member

AndresOrtegaGuerrero commented Apr 27, 2023

I think it would be worth to also include FR (though that will require that we add the SOC options for properties) and also to add the stringent accuracy

@superstar54
Copy link
Member Author

Hi @AndresOrtegaGuerrero, Thanks for your suggestions. It's good to add more pseudo-family, but this leads to a longer time for the installation, thus the user needs to wait in the first run. The idea here is only to install the most commonly used pseudo, and trigger additional downloads (FR, stringent) if an advanced calculation is needed. This may be added in a further PR. See discussion #386.

@AndresOrtegaGuerrero
Copy link
Member

@superstar54 I agree, though it might be a good idea that the user gets some description that the PseudoDojo that they are using is SR, and that the accuracy is the standard

@superstar54
Copy link
Member Author

@superstar54 I agree, though it might be a good idea that the user gets some description that the PseudoDojo that they are using is SR, and that the accuracy is the standard

Thanks!. A description for Pseudodojo has been added.

@unkcpz unkcpz changed the base branch from master to main May 24, 2023 21:56
@unkcpz
Copy link
Member

unkcpz commented May 24, 2023

Hi @superstar54, I change the base to branch main since I decided to deprecate master after the change in app registry is merged, I hope you don't mind.

Is there any block for this PR? Do we need more discussion on this? I remember we want to double-check the versioning of pseudo-dojo?

@AndresOrtegaGuerrero
Copy link
Member

I think in a previous meeting, we discussed as well that it could be useful to have normal and stringent precision

@superstar54
Copy link
Member Author

it could be useful to have normal and stringent precision

Done

@AndresOrtegaGuerrero
Copy link
Member

@superstar54 Since the code was re factored, you should do a rebased on this branch with main , since now there is a folder named app for the files you modified

@codecov
Copy link

codecov bot commented Jun 8, 2023

Codecov Report

Patch coverage: 62.85% and project coverage change: +0.49 🎉

Comparison is base (827bb83) 52.13% compared to head (81b4529) 52.63%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #387      +/-   ##
==========================================
+ Coverage   52.13%   52.63%   +0.49%     
==========================================
  Files          16       17       +1     
  Lines        1849     1879      +30     
==========================================
+ Hits          964      989      +25     
- Misses        885      890       +5     
Flag Coverage Δ
python-3.10 52.63% <62.85%> (+0.49%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
aiidalab_qe/app/report.py 28.57% <ø> (ø)
aiidalab_qe/app/sssp.py 41.30% <12.50%> (-2.38%) ⬇️
aiidalab_qe/app/steps.py 68.91% <50.00%> (-0.16%) ⬇️
aiidalab_qe/app/pseudos.py 92.85% <75.00%> (+7.14%) ⬆️
tests/test_pseudo.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@superstar54
Copy link
Member Author

@AndresOrtegaGuerrero Thanks for the review. I addressed the issues and rebased the branch with the main branch.

@AndresOrtegaGuerrero
Copy link
Member

AndresOrtegaGuerrero commented Jun 8, 2023

@superstar54 Thank you it looks nice, I tested and didn't observe any issues, I only have one opinion an is regarding the widget.
Screenshot 2023-06-08 at 09 36 51
I was wondering if we should use a Dropdown ? or maybe to make like a 2x2 grid to organize the buttons? What do you think?

@superstar54
Copy link
Member Author

superstar54 commented Jun 8, 2023

I was wondering if we should use a Dropdown ? or maybe to make like a 2x2 grid to organize the buttons? What do you think?

Thanks for the suggestion. I updated the layout to show them in a 2x2 grid on a large screen and 4x1 on a small one.

@AndresOrtegaGuerrero
Copy link
Member

@superstar54 It looks great to me ! thank you

aiidalab_qe/app/report.py Outdated Show resolved Hide resolved
aiidalab_qe/app/steps.py Outdated Show resolved Hide resolved
Copy link
Member

@unkcpz unkcpz left a comment

Choose a reason for hiding this comment

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

Thanks @superstar54, some change requests.

@superstar54 superstar54 requested a review from unkcpz June 8, 2023 11:49
@superstar54
Copy link
Member Author

@unkcpz thanks for the review, I have addressed all the requests.

Copy link
Member

@unkcpz unkcpz left a comment

Choose a reason for hiding this comment

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

Thanks a lot @superstar54, still have one thing want you to check. I approve it anyway so I do not block you for further progress.

BTW, do you think it is okay to add a test for checking using the other pseudofamily?

Comment on lines 134 to 145
if self.override_protocol_pseudo_family.value:
if "PseudoDojo" in self.protocol_selection.value:
pseudo_family = f"PseudoDojo/0.4/{self.dft_functional.value}/SR/{self.protocol_selection.value.split()[1]}/upf"
elif "SSSP" in self.protocol_selection.value:
pseudo_family = f"SSSP/1.2/{self.dft_functional.value}/{self.protocol_selection.value.split()[1]}"
else:
raise ValueError(
f"Unknown pseudo family {self.override_protocol_pseudo_family.value}"
)
self.value = pseudo_family
else:
self.value = DEFAULT_PARAMETERS["pseudo_family"]
Copy link
Member

Choose a reason for hiding this comment

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

I am a bit worried about the complex if..else nest here. Can you check it again if you can make it more clear?

Copy link
Member

@AndresOrtegaGuerrero AndresOrtegaGuerrero Jun 8, 2023

Choose a reason for hiding this comment

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

@superstar54 perhaps you can use a dictionary to put the options an evaluate the dict[value] ?

Copy link
Member

Choose a reason for hiding this comment

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

@AndresOrtegaGuerrero, I don't quite understand what you mean. @superstar54, can you try to address it?
Then we can merge this PR.

Choose a reason for hiding this comment

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

@superstar54 you can ignore my suggestion and merge if you want

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the suggestions. I updated the code to make the string pretty and hopefully more clear. A test is also added for the PseudoFamilySelector widget.

Copy link
Member

Choose a reason for hiding this comment

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

Great! All good to me.

@unkcpz unkcpz merged commit d210b45 into main Jun 20, 2023
9 of 13 checks passed
@unkcpz unkcpz deleted the add_pseudo_dojo branch June 20, 2023 08:32
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.

Add PseudoDojo to the pseudopotential selection list
3 participants