quantum-espresso/upflib
Paolo Giannozzi bc909b71bf [skip-CI] Missing !$acc exit data when deallocating 2023-10-06 19:33:47 +02:00
..
CMakeLists.txt Forgot to update CMake 2023-09-10 15:03:52 +02:00
Makefile Local potential calculation cleaned up and moved to upflib 2023-09-10 10:36:47 +02:00
README.md [skip-CI] Unclosed file was causing trouble with GTH pseudopotential reading 2023-04-29 14:53:15 +02:00
TODO_upflib.md Some more tweaking with Vloc 2023-09-30 22:42:20 +02:00
atom.f90 First compiling version of QE with initial "pseudolib" in upflib/. 2020-04-25 19:13:15 +00:00
atomic_number.f90 Small correction to pseudopotential converters 2020-05-04 17:28:10 +02:00
casino2upf.f90 [skip-CI] Some more upf clean-up, notably in error handling 2023-04-18 17:28:28 +02:00
casino_pp.f90 casino2upf converter restored (?), courtesy Jack Muff 2021-06-16 18:36:13 +02:00
dom.f90 [skip-CI] Add test for upf PP 2023-04-12 15:28:34 +00:00
dqvan2.f90 CUDA Fortran replaced with OpenACC in qvan2 2023-06-23 18:01:07 +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
gen_us_dj.f90 Add KIND=DP to CMPLX 2023-05-21 17:48:55 -05:00
gen_us_dy.f90 Add KIND=DP to CMPLX 2023-05-21 17:48:55 -05:00
gth.f90 Final (?) Vloc cleanup: removal of redundant code from phonon and EPW. 2023-10-01 12:04:30 +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 [skip-CI] Interpolation table for atomic wavefunctions moved to openacc 2023-06-29 14:39:17 +02:00
init_tab_beta.f90 Removal of spline interpolation 2022-01-11 09:57:39 +01:00
init_tab_qrad.f90 CUDA Fortran replaced with OpenACC in qvan2 2023-06-23 18:01:07 +02:00
init_tab_rhc.f90 [skip-CI] Forgot one of the modified routines! Also: small documentation updates 2023-06-15 22:10:58 +02:00
init_tab_rho.f90 My first attempt towards ACC wasn't as successfull as it seemed at a first glance 2023-06-15 19:04:52 +02:00
init_us_0.f90 Minor changes 2021-12-31 09:09:47 +01:00
init_us_1.f90 [skip-CI] There is somethng very wrong in the stres with exact exchange 2023-07-03 15:35:53 +02:00
init_us_2_base.f90 Erroneous error 2022-01-23 13:12:12 +01:00
init_us_2_base_gpu.f90 [skip-CI] Some more upf clean-up, notably in error handling 2023-04-18 17:28:28 +02:00
init_us_b0.f90 Reverted: no point in smoothing GTH pseudopotentials 2022-01-10 08:41:44 +01:00
interp_atwfc.f90 [skip-CI] interp_atwfc GPU and COPU versions arenow the same 2023-06-29 18:04:13 +02:00
interp_drhc.f90 More rho-core cleanup: interpolation routines renamed and moved to upflib/ 2023-06-09 16:53:10 +02:00
interp_rhc.f90 More rho-core cleanup: interpolation routines renamed and moved to upflib/ 2023-06-09 16:53:10 +02:00
paw_variables.f90 init_us_1 moved to upflib 2021-01-16 01:07:21 +01:00
pseudo_types.f90 [skip-CI] Remove redundant variable "nn" from upf type 2023-04-17 17:53:21 +02:00
qvan2.f90 qvan2 and qvan2_gpu merged 2023-06-28 15:44:28 +02:00
radial_grids.f90 Unused routines removed 2020-05-02 09:18:00 +02:00
read_cpmd.f90 [skip-CI] More upflib cleanup 2023-04-23 13:10:10 +02:00
read_fhi.f90 [skip-CI] Removed file upftest.f90 erroneously added, moved two small functions 2023-04-12 18:04:13 +02:00
read_ncpp.f90 [skip-CI] More upf cleanup, notably in pseudppotebtial reading. Now all formats 2023-04-25 10:21:18 +02:00
read_ps.f90 [skip-CI] Yet another problem with new PP reading code 2023-05-27 10:03:20 +02:00
read_psml.f90 [skip-CI] More upf cleanup, notably in pseudppotebtial reading. Now all formats 2023-04-25 10:21:18 +02:00
read_upf_new.f90 [skip-CI] More cleanup, GTH PP re-introduced, fixed a crash with PAW 2023-04-27 11:07:57 +02:00
read_upf_v1.f90 [skip-CI] Yet another bogus UPF v.1 error 2023-08-11 11:02:54 +02:00
read_uspp.f90 [skip-CI] More upf cleanup, notably in pseudppotebtial reading. Now all formats 2023-04-25 10:21:18 +02:00
simpsn.f90 stress_acc - acc fixes in simpson and sph_bes 2022-08-08 12:52:05 +02:00
sph_bes.f90 stress_acc - acc fixes in simpson and sph_bes 2022-08-08 12:52:05 +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 [skip-CI] More cleanup, GTH PP re-introduced, fixed a crash with PAW 2023-04-27 11:07:57 +02: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 [skip-CI] Some more upf clean-up, notably in error handling 2023-04-18 17:28:28 +02:00
upf_invmat.f90 First compiling version of QE with initial "pseudolib" in upflib/. 2020-04-25 19:13:15 +00:00
upf_io.f90 First compiling version of QE with initial "pseudolib" in upflib/. 2020-04-25 19:13:15 +00:00
upf_ions.f90 More cleanup; update on what is left to do 2021-02-26 14:44:58 +00:00
upf_kinds.f90 First compiling version of QE with initial "pseudolib" in upflib/. 2020-04-25 19:13:15 +00:00
upf_kinds.h First compiling version of QE with initial "pseudolib" in upflib/. 2020-04-25 19:13:15 +00:00
upf_parallel_include.f90 First compiling version of QE with initial "pseudolib" in upflib/. 2020-04-25 19:13:15 +00:00
upf_params.f90 increased lmaxx 2021-05-18 23:02:15 +02:00
upf_spinorb.f90 More spin-orbit cleanup 2021-10-24 10:22:44 +02:00
upf_to_internal.f90 Removal of duplicated PP code 2021-04-05 22:21:48 +02:00
upf_utils.f90 [skip-CI] Removed file upftest.f90 erroneously added, moved two small functions 2023-04-12 18:04:13 +02:00
upfconv.f90 [skip-CI] Yet another problem with new PP reading code 2023-05-27 10:03:20 +02:00
uspp.f90 stress_acc - small oversight 2022-08-10 16:03:28 +02:00
uspp_data.f90 [skip-CI] Interpolation table for atomic wavefunctions moved to openacc 2023-06-29 14:39:17 +02:00
uspp_param.f90 Module uspp and uspp_param split 2021-12-30 15:10:13 +01:00
virtual_v2.f90 [skip-CI] Yet another problem with new PP reading code 2023-05-27 10:03:20 +02:00
vloc_mod.f90 [skip-CI] Missing !$acc exit data when deallocating 2023-10-06 19:33:47 +02:00
write_upf_new.f90 Incorrect PP_SEMILOCAL written to UPF v.2 2023-05-11 10:27:46 +02:00
wxml.f90 changed format es24.15 -> es24.15e3 in xml writer. 2023-05-16 09:51:07 +02:00
xmltools.f90 [skip-CI] Fix for issue #582 2023-04-19 20:38:40 +02:00
ylmr2.f90 Derivatives of spherical harmonics (dylmr2*f90) moved to upflib/ 2021-05-02 09:20:21 +02:00
ylmr2_gpu.f90 Increased limit of ylmr2_gpu kernel 2021-11-29 14:45:27 +01: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, 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

  • casino2upf.x, courtesy Mike Towler (see below)

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.