[QE-developers] Fix upf2plotcore.sh QE6.4.1

Aldo Ugolotti a.ugolotti at campus.unimib.it
Mon Nov 25 13:32:53 CET 2019


Dear QE developers,

I recently had to generate a core hole pseudopotential, from which I 
needed to extract the core state wavefunction. As usual, after running 
the atomic code, I tried to run upf2plotcore.sh - both as included in 
the 6.4.1 version of QE - but the output of the latter was empty with 
the exception of a single line "# number of core states 1 =  1 0;". 
After some checks, I noticed that the awk commands within the script 
itself were looking for a slightly different pattern than that included 
in the UPF file, and the string manipulation to extract some parameters 
was not working as intended.

Hoping it could be of help, I am attaching a copy of the script I edited 
to fix it; the changes are summarized here as well:

1) in reading the size of the radial grid (mesh_size, nris) the regex 
patterns in gsub functions have been substituted as:

     gsub ( /.*mesh_size="/, "", nris )

     gsub ( /[^0-9]*".*/, "", nris )

2) in reading the radial grid, the awk patterns to be searched have been 
changed as "/PP_R /" -> "<PP_R>" and "<PP_R"  -> "<PP_R>"

As for 2), I have not tested it with previous versions, but I noticed 
that v6.0 was reporting the "old" format of the tags; about point 1) I 
cannot guess why it wouldn't work for me.

Bests,

-- 
Aldo Ugolotti

PhD student
Materials Science Dept. U5,
Università degli Studi di Milano-Bicocca
via Cozzi 55,
20125 Milano (MI)
Italy
e-mail: a.ugolotti at campus.unimib.it


-------------- next part --------------
A non-text attachment was scrubbed...
Name: upf2plotcore_edited_v6.4.1.sh
Type: application/x-shellscript
Size: 2302 bytes
Desc: not available
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20191125/9d9b35e6/attachment.bin>


More information about the developers mailing list