WIP: parse more info from upf header #4597
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
parse_upf
method is very old and only support parsing the element from upf file. I find it is sometimes helpful to also parse thez_valence
(I want to get this value to setnbands
before I run the scf calculation, I am curious why we cannot set things likenbands_factor
in quantum-espresso) and more information from the upf file'sPP_HEADER
such as the type of PP. Just like what @simonpintarelli did in #3308 to support converting upf to json. I propose to have a tool to elaborately parsing the upf(or maybe if necessary for other types of pseudopotentials). From the time being, I just add a parser for 'z_valence'. It might useful to parse the following infos from file, [element, z_valence, pp_type, pp_energy, functional, wfc_cutoff, rho_cutoff, relativistic].Here are the things worth to be discussed:
UpfData
or collect them as a dict and set it as one attribute.aiida-pseudo
?Pining @giovannipizzi @simonpintarelli for inputs before I moving forward.