quantum-espresso/upflib
Paolo Giannozzi 0eeb229724 Yet another PP reading problem
In existing files, PP_GIPAW_CORE_ORBITALS may appear in two different formats.
Should solve issue #367
2021-08-12 07:52:56 +02:00
..
CMakeLists.txt Add executables missing in CMake. 2021-07-21 12:06:35 -05:00
Makefile casino2upf converter restored (?), courtesy Jack Muff 2021-06-16 18:36:13 +02:00
README.md Misspell 2021-06-16 18:38:18 +02:00
TODO_upflib.md Derivatives of spherical harmonics (dylmr2*f90) moved to upflib/ 2021-05-02 09:20:21 +02:00
atom.f90
atomic_number.f90 Small correction to pseudopotential converters 2020-05-04 17:28:10 +02:00
casino2upf.f90 casino2upf converter restored (?), courtesy Jack Muff 2021-06-16 18:36:13 +02:00
casino_pp.f90 casino2upf converter restored (?), courtesy Jack Muff 2021-06-16 18:36:13 +02:00
dqvan2.f90 errore => upf_error 2021-04-09 07:57:24 +02:00
dylmr2.f90 Derivatives of spherical harmonics (dylmr2*f90) moved to upflib/ 2021-05-02 09:20:21 +02:00
dylmr2_gpu.f90 Derivatives of spherical harmonics (dylmr2*f90) moved to upflib/ 2021-05-02 09:20:21 +02:00
fixfiles.py Convert to Python3 and minor improvements 2020-09-23 23:50:24 +09:00
gth.f90 Merge branch 'develop' into gpu-develop 2020-05-28 15:19:12 +02:00
hgh2qe.f90 Replaced dgamma function with gamma because dgamma is only a GNU specific builtin 2020-09-29 18:11:32 +02:00
init_tab_atwfc.f90 Renaming of some routines for atomic wavefunctions: 2021-04-15 09:40:53 +02:00
init_tab_beta.f90 More pseudopotential reorganization 2021-04-17 08:25:38 +02:00
init_tab_qrad.f90 More pseudopotential reorganization 2021-04-17 08:25:38 +02:00
init_us_0.f90 More pseudopotential reorganization 2021-04-17 08:25:38 +02:00
init_us_1.f90 More pseudopotential reorganization 2021-04-17 08:25:38 +02:00
init_us_2_base.f90 The variable nsp (number of atomic species) in upflib/ is consistently used 2021-02-27 19:59:17 +00:00
init_us_2_base_gpu.f90 errore => upf_error 2021-04-09 07:57:24 +02:00
init_us_b0.f90 errore => upf_error 2021-04-09 07:57:24 +02:00
interp_atwfc.f90 Renaming of some routines for atomic wavefunctions: 2021-04-15 09:40:53 +02:00
interp_atwfc_gpu.f90 Renaming of some routines for atomic wavefunctions: 2021-04-15 09:40:53 +02:00
make.depend Derivatives of spherical harmonics (dylmr2*f90) moved to upflib/ 2021-05-02 09:20:21 +02:00
paw_variables.f90 init_us_1 moved to upflib 2021-01-16 01:07:21 +01:00
pseudo_types.f90 Potential trouble reading upf v.1 2021-07-15 17:37:51 +02:00
qvan2.f90 errore => upf_error 2021-04-09 07:57:24 +02:00
qvan2_gpu.f90 errore => upf_error 2021-04-09 07:57:24 +02:00
radial_grids.f90 Unused routines removed 2020-05-02 09:18:00 +02:00
read_cpmd.f90 upf_erf deleted and replaced by standard erf 2021-02-18 10:22:29 +00:00
read_fhi.f90 Aligned gpu-develop branch with develop from QEF/q-e. 2021-01-19 22:16:25 +00:00
read_ncpp.f90 upf_erf deleted and replaced by standard erf 2021-02-18 10:22:29 +00:00
read_ps.f90 Routine read_ps, used only for conversion, extracted from module upf_mod 2021-03-03 22:12:24 +01:00
read_upf_new.f90 Yet another PP reading problem 2021-08-12 07:52:56 +02:00
read_upf_v1.f90 In the HP postprocessing routine added some explanations 2020-11-18 16:29:39 +00:00
read_uspp.f90 More missing initializations in old formats, leading to strange errors 2020-05-02 13:58:25 +00:00
simpsn.f90
simpsn_gpu.f90 housekeeping 2021-02-13 17:41:20 +01:00
sph_bes.f90 errore => upf_error 2021-04-09 07:57:24 +02:00
sph_bes_gpu.f90 errore => upf_error 2021-04-09 07:57:24 +02:00
sph_ind.f90 errore => upf_error 2021-04-09 07:57:24 +02:00
spinor.f90 errore => upf_error 2021-04-09 07:57:24 +02:00
splinelib.f90 splinelib_gpu removed (splint_eq_gpu moved as splint_eq in splinelib module) 2021-02-16 08:19:03 +01:00
upf_auxtools.f90 There was a radial grid in upf%, an additional one with more variables (of 2020-04-28 08:15:50 +00:00
upf_const.f90 init_us_0.f90 and init_us_b0.f90 disentangled and moved to upflib. 2021-01-15 23:41:27 +01:00
upf_error.f90 Small upflib glitches: FoX no longer required, removed from Makefile; 2020-09-25 22:07:23 +02:00
upf_invmat.f90
upf_io.f90
upf_ions.f90 More cleanup; update on what is left to do 2021-02-26 14:44:58 +00:00
upf_kinds.f90
upf_kinds.h
upf_parallel_include.f90
upf_params.f90 increased lmaxx 2021-05-18 23:02:15 +02:00
upf_spinorb.f90 removal of uspp-gpum module. 2021-02-22 08:26:48 +01:00
upf_to_internal.f90 Removal of duplicated PP code 2021-04-05 22:21:48 +02:00
upf_utils.f90
upfconv.f90 More small corrections 2021-06-16 12:10:33 +02:00
uspp.f90 errore => upf_error 2021-04-09 07:57:24 +02:00
uspp_data.f90 errore => upf_error 2021-04-09 07:57:24 +02:00
virtual_v2.f90 Routine read_ps, used only for conversion, extracted from module upf_mod 2021-03-03 22:12:24 +01:00
write_upf_new.f90 Some compilers may write exceedingly long lines if an entire matrix is written 2021-02-10 22:05:28 +01:00
xmltools.f90 Yet another PP reading problem 2021-08-12 07:52:56 +02:00
ylmr2.f90 Derivatives of spherical harmonics (dylmr2*f90) moved to upflib/ 2021-05-02 09:20:21 +02:00
ylmr2_gpu.f90 CP with CG not working any longer with norm-conserving pseudopotentials. 2021-07-16 22:00:18 +02:00

README.md

Library of pseudopotential code

This directory contains a library of pseudopotential-related code, extracted from the Quantum ESPRESSO distribution. This library depends only upon module mp.f90 of UtilXlib and upon a few modules and routines of devXlib; upon a few LAPACK routines; requires a suitable ../make.inc file in Makefile. Other than this, it can be independently compiled.

Currently, it includes

In addition to the libupf.a library, two executable utilities are produced:

  • upfconv.x, converting pseudopotentials in other formats into UPF: see upfconv.x -h for more

  • virtual_v2.x, courtesy Jingyang Wang (jw598@cornell.edu), generates an averaged pseudopotential suitable for Virtual Crystal Approximation

A python script fixfile.py is also present, to remove undesired & characters from UPF files that hinder their parsing by xml tools.

CASINO and QE pseudopotentials

The following notes are kept for reference (they might be obsolete). Code upfconv.x -c should replace code upf2casino2.x mentioned below. Code casino2upf.x was moved to upflib/ and works (?) again, at least for the example provided by Jake Muff, since v.6.8. Old notes start here:

Two utilities are provided with the Quantum Espresso distribution to enable the PWscf code to be used in conjunction with the CASINO quantum Monte Carlo code.

Of course all pseudopotentials generated via these automatic tools should be tested before being used for production runs.

It should be noted that ultrasoft and PAW pseudopotentials cannot be used with the CASINO code. Currently only UPF files containing norm-conserving pseudopotentials can be converted using these utilities.

casino2upf.x

The first of these is casino2upf.x . This utility takes a given CASINO tabulated pseudopotential file and one or more awfn.data files specifying the pseudoatomic wavefunctions to be used in creating the Kleinman-Bylander projectors. A UPF file containing the projectors and the local potential is then written to the file name specified in inputpp. Any errors are communicated to the user via stderr.

Usage:

    ./casino2upf.x < inputpp

A sample inputpp file for converting a Trail and Needs pseudopotential would be:

inputpp:
	&inputpp
		pp_data='pp.data'
		upf_file='my_pseudo_potential.UPF'
	/
	3
	awfn.data_s1_2S
	awfn.data_p1_2P
	awfn.data_d1_2D

Here pp_data specifies the name and location of the file containing the CASINO pseudopotential. The utility then expects an input card after &inputpp consisting of the number of awfn.data files supplied (in this case 3) and then their names. The files are searched sequentially so the first s wavefunction found will be used for the s projector, first p for the p projector and so on.

A note on the radial grid

The utility currently performs no interpolation and attempts to use the same radial grid as the original pseudopotential. It therefore assumes that the grid will be of the standard form used by Trail and Needs.

If this is not the case the flag tn_grid=.false. can be set in the input file. The standard logarithmic form, r(i)=exp(xmin + i*dx) / Z is then assumed. Values for xmin and dx can also be specified in the input file in the usual way.

If interpolation from a different non-standard grid is required then the current recommended route is to use the casino2gon utility supplied with the CASINO distribution. This produces the older GON format that is (currently) still read by PWscf.

Ghost states

The Kleinman-Bylander form can unfortunately introduce ghost states into some calculations. If this does occur we recommend that the pseudopotential is re-converted using a different local channel. The local channel can be specified in the original CASINO pp.data file and is read in automatically by casino2upf.x .

up2casino.x

This utility takes a standard UPF pseudopotential from standard input and writes a CASINO tabulated pseudopotential file to standard output. Any errors are communicated via stderr.

Usage:

./up2casino.x < pseudo.UPF > pp.data

Care must be taken that the resulting pseudopotential file spec fies the required local channel. Also this utility should only be used with norm-conserving pseudopotentials.