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 converters from one pseudo format to the other #77

Open
sphuber opened this issue Apr 15, 2021 · 1 comment
Open

Add converters from one pseudo format to the other #77

sphuber opened this issue Apr 15, 2021 · 1 comment

Comments

@sphuber
Copy link
Contributor

sphuber commented Apr 15, 2021

Certain codes only have support for a number of pseudopotential format, but in principle the format is just a way of encoding the information. Many formats are in principle interchangeable. It would be cool if the PseudoPotentialFamily.get_pseudo method had an argument pseudo_type that allowed to specify the desired PseudoPotentialData returned. So even if the pseudo is stored internally as a UpfData, it would be possible to retrieve it as an Psp8Data.

@zooks97
Copy link
Contributor

zooks97 commented Apr 30, 2021

It seems like this functionality would require a few different sub-projects:

  • A universal data structure for storing pseudo data
  • Parsers for the desired pseudo file formats
  • Writers for the desired pseudo file formats
  • Test round-trip consistency

The first step might be to research a couple different formats, e.g. UPF(2) and PSP8, and define a sort of schema which encompasses all the data they (can) store.

Then, a suitable data structure can be designed to efficiently and universally store that data, including units and any important metadata.

The I/O methods can then be implemented, perhaps based on implementations in codes like QuantumESPRESSO, ABINIT (links to source files), SIRIUS, etc. This can then be tested using aiida-common-workflows to ensure that passing a pseudo through the parse -> store -> write pipeline gives consistent results within/across the codes.

Does this seem like a reasonable plan to follow?

I think would also be nice to have this functionality implemented at its core AiiDA-independently so that it can be used by the broader community. Then, the underlying code can be used by aiida-pseudo.

Edit 07.05:
It looks like some people from CECAM were working on this topic a few years ago in libpspio. Development seems to have stopped before reaching a stable version, but there's a lot of good information in the source code for the quirks of various formats. They also seem to have implemented a generic data structure for pseudopotentials, which could be a nice starting point.

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

2 participants