-
Notifications
You must be signed in to change notification settings - Fork 0
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
[XPS] support multiple core levels for the same element #16
Conversation
Hi @PNOGillespie , if you have time to review this PR today, that would be great. Otherwise, would it be okay for me to merge it today so that a user can start testing this new feature? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @superstar54. The feature here does seem useful, however there are some issues regarding input validation which need resolving before this will be good to go.
I've left some comments on the various changes, but the main things which need changing are:
- There is no input validation for
core_levels
orcore_hole_pseudos
. I understand that this automatically done when loading in yourpseudo_demo
pseudopotentials - however when working with other pseudopotentials, the lack of validation can result in theWorkChain
excepting only at the end of a run due to simple spelling/formatting errors. - Docstrings (at least for the workflows) should be updated to include these new parameters, in addition to something showing how they need to be formatted.
I will have another look at this once these two points have been addressed.
src/aiida_qe_xspec/calculations/functions/xspectra/get_xps_spectra.py
Outdated
Show resolved
Hide resolved
- Add input validation - Update docstring
Hi @PNOGillespie , thanks for the review. I have implemented suggestions, in the commit: c6c9ef7, also with tests. I have added the following validation:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @superstar54. Thanks for addressing some of the changes and adding tests. I have one last point which I think maybe wasn't made clear in the previous review.
We can probably go ahead and merge after addressing that last point.
src/aiida_qe_xspec/calculations/functions/xspectra/get_xps_spectra.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @superstar54. Please take a look at the comment for this review - I don't think we're quite there yet with input validation.
Please let me know if anything about it is unclear.
Hi @PNOGillespie, thanks for your feedback! I've added more input validation along with corresponding tests in this commit: f4ea8f3. These improvements should make the input validation more robust and help catch potential issues early. Let me know if you have any further suggestions! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes @superstar54. The input scheme is now a lot more robust for workflow users.
Just need to update the help
string for core_hole_pseudos
and I think we're done here.
src/aiida_qe_xspec/workflows/xps.py
Outdated
spec.input_namespace( | ||
'gipaw_pseudos', | ||
valid_type=(orm.UpfData, UpfData), | ||
dynamic=True, | ||
help=( | ||
'Dynamic namespace for pairs of ground-state pseudopotentials for each absorbing' | ||
' element. Must use the mapping "{element}" : {Upf}".' | ||
) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this part has been removed, and the gipaw_pseudos
has been merged into core_hole_pseudos
, the help
string for core_hole_pseudos
needs to be updated for the new input format.
Doesn't need to be extensive, just something like:
'Dynamic namespace for ground-state and core-hole pseudopotentials for each absorbing'
' element. Must use the mapping "{element}" : {"gipaw" : {Upf}, "1s" : {Upf}}".'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, in commit: 3b52fcb
Good work @superstar54! Go ahead and merge this. |
@PNOGillespie Thank you for the review! |
Hi @PNOGillespie , I think it's good to make another release ( |
workchain support multiple core levels for the same elements
for example,
1s
,2s
,2p
forAl
:GUI to allow user specific the atom indices to be considered.