A one-step script to convert GTH pseudopotential to ".upf" format using CP2K's ATOM module.
Numerical orbitals in ".orb" format for ABACUS can also generated by calling gaussian_orbital_for_ABACUS.
-
Prepare a json file "input.json" containing the following infomation:
{ "cp2k_path": "/home/pkgs/cp2k/exe/local/cp2k.popt", "gth_path": "/home/pkgs/cp2k/data/GTH_POTENTIALS", "element": "C", "xc": "PBE", "valence": 4, "prefix": "C-GTH-PBE", "grid_points": 500, "quadrature": "cpmd2upf_default" }- "cp2k_path" (
cp2k.popt): Path to the CP2K executable file. - "gth_path" (
GTH_POTENTIALS): Path to theGTH_POTENTIALSorGTH_SOC_POTENTIALSfile, usually int thedatafolder of CP2K installation. - "quadrature" (
gc_log):gc_log|gc_simple|gc_transformed|cpmd2upf_defaultAlgorithm to construct the atomic radial grids.- The first three are supported in CP2K (see CP2Kdoc-QUADRATURE).
cpmd2upf_default: Replace the atomic radial grid to the same as the default grid used in cpmd2upf.
- "grid_points" (
400): Number of radial grid points. The same as GRID_POINTS in CP2K. - "soc" (
false): Whether to include spin-orbit coupling in the pseudopotential.- Note: currently only the latest CP2K version (2025.8+) supports SOC in ATOM module. (Related PR)
- "cp2k_path" (
-
Run the following command:
python3 /path/to/gth2upf.py input.json
It generates ".upf" pseudopotential file with the intermediate CP2K input (".inp") and output (".out") files in current directory.
-
If you also want to generate ".orb" file of this element, set the following infomation to the "input.json" file:
{ "cp2k_path": "/home/pkgs/cp2k/exe/local/cp2k.popt", "gth_path": "/home/pkgs/cp2k/data/GTH_POTENTIALS", "element": "H", "basis_type": "DZVP", "basis_rcut": 14 }and then run:
python3 /path/to/genorb.py input.json