uniPPlib - Universal PseudoPotential Library


This library provides many useful pseudopotential routines. Both j-dependent and j-independent pseudopotentials can be processed with the same function calls. The philosophy of uniPPlib is to hold all relevant pseudopotential information in a data structure called uniPP which is passed to each function in this library, providing maximum transparency to the programmer.

upf Format

The pseudopotential files that uniPPlib can process need to be given in the upf format which stands for universal pseudopotential format. Conventionally the pseudopotential files end with '.upf', although this is not a requirement. The files are plain ASCII text. Each line that contains more than one entry is broken into columns, separated by white spaces or tabs. The format is as follows:

1st line:
         name   (string)
   Name of pseudopotential, for human use only.
2nd line:
         Z_ion  (double)
    Ionic charge in units of |e| (elementary charge).
         l_max  (int)        Number of pseudopotential components.
         l_loc  (int)        Local component index for l_loc<l_max, design flag otherwise.
         rel    (int)        Relativistic flag: 0 not j-dependent; 1: j-dependent.
         nlcc   (int)        Non-linear core correction flag.
         m_mesh (int)        Number of radial mesh points.
         a_mesh (double)     Mesh increment r_(m+1)/r_m.

3rd to (m_mesh+3)th line:
         r_m    (double)
    Radius [a.u.].
         v_loc  (double)     Local potential [Hartree].
         v_l+1/2  (double)     l,j=l+1/2 part of non-local pseudopotential [Hartree].
         u_l+1/2  (double)     l,j=l+1/2 pseudo wave function [1/sqrt(a.u.)].
         v_l-1/2  (double)     l,j=l-1/2 part of non-local pseudopotential [Hartree].
         u_l-1/2  (double)     l,j=l-1/2 pseudo wave function [1/sqrt(a.u.)].
         n_pc   (double)     Partial core density for non-linear core corrections.

Note: There are l_max potential and wave function blocks. If the rel flag is set to 0, i.e. the pseudopotential is j-independent, there will only be one v_l and one u_l for each angular momentum block.

Download & Install

Just click on uniPPlib-Helium-2.tgz to download the package. Type tar xzvf uniPPlib-Helium.tgz to unpack or, alternatively, gunzip and untar the file in two separate steps. This creates a directory named uniPPlib which contains all the files. Change into this directory and customize the makefile. Then type make which should leave you with the library file libuniPP.a.

uniPPlib Functions

int uniPP_read(uniPP *unipp, FILE *fp);

Read a upf pseudopotential file. This call will also allocate the required memory.

void uniPP_free(uniPP *unipp);

Free all memory currently allocated by this pseudopotential.

double uniPP_alpha(uniPP *unipp);

Calculate and return the alpha term of the local pseudopotential part. [Ihm, et al., J. Phys. C: Solid State Phys., 12, 4409 (1979)]

void uniPP_ffloc(uniPP *unipp, double *ffloc, double *g, int n);

Calculate the form factors of the local pseudopotential part.

void uniPP_ffnlcc(uniPP *unipp, double *ffnlcc, double *g, int n);

Calculate the form factors of the partial core density.

void uniPP_kbden(uniPP *unipp, double ***kbden, double nproj);

Calculate the denominator of the Kleinman-Bylander transformation. [Kleinman and Bylander, PRB 48, 1425 (1982)]

void uniPP_kbfnl(uniPP *unipp, dcomplex *****kbfnl, int nproj, double *gk_abs, double **gk, int nmax, int flag);

Calculate the (not normalized) factors in the numerator of the Kleinman-Bylander transformation . [Kleinman and Bylander, PRB 48, 1425 (1982)]


'uniPPlib' - Universal PseudoPotential Library
Copyright (C) 2000 University of California, Santa Barbara

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA