Thanks to visit codestin.com
Credit goes to github.com

Skip to content

maki49/gth2upf

Repository files navigation

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.

Usage

  1. 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"
    }

    Parameters (Default)

    • "cp2k_path" (cp2k.popt): Path to the CP2K executable file.
    • "gth_path" (GTH_POTENTIALS): Path to the GTH_POTENTIALS or GTH_SOC_POTENTIALS file, usually int the data folder of CP2K installation.
    • "quadrature" (gc_log): gc_log | gc_simple | gc_transformed | cpmd2upf_default Algorithm 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)
  2. 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.

  3. 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

About

A one-step script to convert GTH pseudopotential to ".upf" format using CP2K's ATOM module.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •