quantum-espresso/upflib
Paolo Giannozzi 1def066099 [skip-CI] Fix for issue #533 2022-08-23 20:52:08 +02:00
..
CMakeLists.txt stress_acc - gen_us_dy_gpu removed 2022-08-08 12:52:05 +02:00
Makefile stress_acc - gen_us_dy_gpu removed 2022-08-08 12:52:05 +02:00
README.md Misc upflib fixes 2021-09-24 22:13:05 +02:00
TODO_upflib.md tab_d2y & gipaw routine removed from XSpectra 2022-07-05 08:54:29 +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 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
dom.f90 [skip-CI] Fix for issue #533 2022-08-23 20:52:08 +02:00
dqvan2.f90 stress_acc - addustress on acc and small omp fix in stres_us 2022-08-08 12:52:05 +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 stress_acc - gen_us_dj_gpu removed 2022-08-08 12:52:05 +02:00
gen_us_dy.f90 stress_acc - gen_us_dy_gpu removed 2022-08-08 12:52:05 +02:00
gth.f90 stress_acc - local term and deps 2022-08-08 12:52:05 +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 Removal of spline interpolation 2022-01-11 09:57:39 +01:00
init_tab_qrad.f90 More pseudopotential reorganization 2021-04-17 08:25:38 +02:00
init_us_0.f90 Minor changes 2021-12-31 09:09:47 +01:00
init_us_1.f90 stress_acc - qq_so var on acc and deeq_nc fix in PH 2022-08-08 12:52:05 +02:00
init_us_2_base.f90 Erroneous error 2022-01-23 13:12:12 +01:00
init_us_2_base_gpu.f90 Fed up with ICE in GPU-specific code on oldish compilers 2022-01-28 09:13:30 +01:00
init_us_b0.f90 Reverted: no point in smoothing GTH pseudopotentials 2022-01-10 08:41:44 +01: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
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 Erroneous error 2022-01-23 13:12:12 +01: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 Make read_upf_new work with old UPF v2 files 2022-01-21 08:36:10 -05:00
read_upf_v1.f90 Uninitialized variables noticed by Cray compiler 2022-03-20 10:51:02 +01:00
read_uspp.f90 More missing initializations in old formats, leading to strange errors 2020-05-02 13:58:25 +00:00
simpsn.f90 stress_acc - acc fixes in simpson and sph_bes 2022-08-08 12:52:05 +02:00
simpsn_gpu.f90 housekeeping 2021-02-13 17:41:20 +01:00
sph_bes.f90 stress_acc - acc fixes in simpson and sph_bes 2022-08-08 12:52:05 +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_acc_interfaces.f90 stress_acc - acc fixes in simpson and sph_bes 2022-08-08 12:52:05 +02: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 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 First compiling version of QE with initial "pseudolib" in upflib/. 2020-04-25 19:13:15 +00:00
upfconv.f90 More small corrections 2021-06-16 12:10:33 +02:00
uspp.f90 stress_acc - small oversight 2022-08-10 16:03:28 +02:00
uspp_data.f90 spline_ps removed as well 2022-07-05 11:02:45 +02:00
uspp_param.f90 Module uspp and uspp_param split 2021-12-30 15:10:13 +01: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 Relativistic UPF v.2 fix 2022-06-22 15:30:14 +02:00
wxml.f90 Check that file opened with xml_openfile is writable 2022-07-12 19:35:06 +02:00
xmltools.f90 Fix for issue #521 2022-07-12 08:32:16 +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.