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

Parse more information from UPF pseudopotentials #38

Open
zooks97 opened this issue Dec 9, 2020 · 4 comments
Open

Parse more information from UPF pseudopotentials #38

zooks97 opened this issue Dec 9, 2020 · 4 comments

Comments

@zooks97
Copy link
Contributor

zooks97 commented Dec 9, 2020

There is a lot of useful information in the header section of UPF pseudopotentials that can be applied to resource estimation, automatic checking of compatibility with methods like DFT + U and spin-orbit coupling, etc.

Would it be possible to parse this information and add it to the pseudopotential metadata as is done currently with z_valence?

@zooks97
Copy link
Contributor Author

zooks97 commented Dec 9, 2020

Here is an example of the header where this information should be from a PseudoDojo Ag.UPF (nc-fr-04_pbe_standard)

<PP_HEADER
generated="Generated using ONCVPSP code by D. R. Hamann"
author="anonymous"
date="180423"
comment=""
element="Ag"
pseudo_type="NC"
relativistic="full"
is_ultrasoft="F"
is_paw="F"
is_coulomb="F"
has_so="T"
has_wfc="F"
has_gipaw="F"
core_correction="T"
functional="PBE"
z_valence="   19.00"
total_psenergy="  -2.94576220757E+02"
rho_cutoff="   1.53700000000E+01"
l_max="2"
l_local="-1"
mesh_size="  1538"
number_of_wfc="6"
number_of_proj="10"/>

@sphuber
Copy link
Contributor

sphuber commented Dec 9, 2020

Of course technically this is not a problem. Just two points I can think of now to take into account:

  • What to do for pseudos that don't include the information, because it seems likely that this cannot be guaranteed. We could just return None
  • Should we store this as an attribute. This would have the advantage of making it queryable but the question is whether that is necessary. If not, maybe it is not worth the cost of storing. It is always possible to retrieve from the file by parsing on the fly.

@unkcpz
Copy link
Member

unkcpz commented Dec 18, 2020

Should we store this as an attribute. This would have the advantage of making it queryable but the question is whether that is necessary. If not, maybe it is not worth the cost of storing. It is always possible to retrieve from the file by parsing on the fly.

there must be some mandatory attributes for different types of pseudopotential file, like element, z_valence, or pp_type, correct? Then leave other attributes can be parsed on the fly.

@AndresOrtegaGuerrero
Copy link

It could be interesting to add the Wavefunctions, like the number of Wavefunctions and the Orbital.
For example

grep Wavefunction W_pbe_v1.2.uspp.F.UPF
5 8 Number of Wavefunctions, Number of Projectors
Wavefunctions nl l occ
5S 0 2.00 Wavefunction
5P 1 6.00 Wavefunction
5D 2 3.90 Wavefunction
6S 0 2.00 Wavefunction
6P 1 0.00 Wavefunction

and per pseudo be able to get the orbitals for DFT+U calculations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants