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

WIP: parse more info from upf header #4597

Closed
wants to merge 1 commit into from

Conversation

unkcpz
Copy link
Member

@unkcpz unkcpz commented Nov 29, 2020

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 the z_valence(I want to get this value to set nbands before I run the scf calculation, I am curious why we cannot set things like nbands_factor in quantum-espresso) and more information from the upf file's PP_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:

  • I am not sure whether to set each of the info as an attribute of UpfData or collect them as a dict and set it as one attribute.
  • What's kinds of infos from pp file going to be store?
  • Do we need and maintain another package to parse the upf(such as upf_to_json by @simonpintarelli , and I think that package can be simplified or replaced by a more versatile one) . Meanwhile, how versatile it would be for other simulation code. Or maybe this tool can be a part of aiida-pseudo?

Pining @giovannipizzi @simonpintarelli for inputs before I moving forward.

@unkcpz unkcpz marked this pull request as draft November 29, 2020 08:06
@simonpintarelli
Copy link
Contributor

@unkcpz the upf_to_json is a copy of the scripts we are using in SIRIUS to create input files. It is needed for running SIRIUS accelerated CP2K via aiida, but the code was too messy to be merged into aiida, thus it became a standalone package 😄. I'm not aware that any other DFT code needs UPF files converted to something else.

@sphuber
Copy link
Contributor

sphuber commented Nov 30, 2020

@unkcpz I actually already implemented the same thing in aiida-pseudo that has another implementation of UpfData that (I think should) become the successor of the UpfData currently shipped with aiida-core. We were planning on removing all materials science specific code to plugins for aiida-core==2.0.0. I started aiida-pseudo for different reasons, but I thought it made a lot of sense to move UpfData there and so already implemented a clean version there. The z valence is thus already parsed in aiida-pseudo==0.3.0

@unkcpz
Copy link
Member Author

unkcpz commented Nov 30, 2020

@sphuber thanks! I'll have a try on this feature of aiida-psuedo.

@unkcpz unkcpz closed this Nov 30, 2020
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.

None yet

3 participants