PseudoPotentialIO.jl

Stable Dev Build Status Coverage

PseudoPotentialIO aims to provide parsers for common pseudopotential file formats used by density functional theory codes and an interface for accesssing the quantities that they contain.

Reading pseudopotentials

The following file formats are supported or have planned (or no planned) support. If your favorite format does not appear in the table below, please file an issue!

FormatRead
UPF (old)
UPF (v2.0.1 with schema)
PSP1Not planned
PSP3/HGHPartial
PSP4/TeterNot planned
PSP5/"Phoney"Not planned
PSP6/FHI98PPNot planned
PSP7/ABINIT PAWNot planned
PSP8/ONCVPSP
PSP9/PSMLNot planned
PSP17/ABINIT PAW XMLNot planned
FPMD XMLNot planned
Vanderbilt USPPNot planned

Pseudopotentials are read by calling load_psp_file(path). This returns one of the [Format]File structs which mirror very closely the contents of the file. However, different file formats provide important physical quantities in slightly different forms. Be sure to check the docstrings and comments here in PseudoPotentialIO.jl or the relevant documentation of the file format.

Writing pseudopotentials

This package also supports writing pseudopotentials, currently only in the UPF v2.0.1 and PSP8 format. This is done using save_psp_file:

save_psp_file("path/to/pseudo.upf", pseudo)

where pseudo is a UpfFile or Psp8File. Support for additional formats might be added in the future.

Converting pseudopotentials

Conversion from PSP8 to UPF is implemented as well, by calling the UpfFile constructor with a Psp8File. Conversions between other formats might be added in the future.

Here is a full example of reading a PSP8 file, converting it to a UPF file and then writing it:

psp8 = load_psp_file("path/to/pseudo.psp8")
save_psp_file("path/to/pseudo.upf", UpfFile(psp8))