[QE-users] Core wavefunction(Lorenzo Paulatto)

Lorenzo Paulatto paulatz at gmail.com
Sun Jun 2 21:41:15 CEST 2019


My workflow for Xpectra calculations:

1. first of all do everything with the standard pseudopotential with the 
full core, this is much cheaper (no need of supercell) and easier (no 
need to generate pseudopotentials), all you need is the 1s wavefunction 
in a text file, if the pseudopotential already contains GIPAW data, you 
can extract it, otherwise if the code was generated with ld1.x, you cna 
grab the input (it is at the beginning of the file) add
  lsave_wfc=.true.
to the input (check the INPUT_LD1 manual), and regenerate it as
  ld1.x < input.txt
with the all-electron data included.

If the pseudo did not come from ld1, you have to speak with the person 
who generated it to see if gipaw data can be included, or use another 
pseudo.

2. The upf2plotcore script does not work with most UPF files, use the 
attached extract_core.f90, you can put it in upftools/ together with the 
Makefile, just run
   extract_core.x file.UPF
and it will produce one file for each core wavefunction (which you pick 
depending on the edge you want)

3. pw.x: if you have inequivalent atoms of the emitting type, take care 
to assign different types to each one, i.e. S1, S2 so you can get all 
the spectra,
3b. xspectra.x: no need to use a supercell, or do any nscf calculation. 
You may want to specify a finer grid of k-points directly in xspectra, 
you can set the right after the namelists:
...
  &cut_occ
     cut_desmooth=0.1,
     cut_stepl=0.01,
  /
4 4 4 1 1 1   <-- this is the grid used by xspectra


4. Now you want to refine the spectra, by including the core-hole, grab 
the ld1 input from above, and make a pseudo with only 1s1 electron, be 
careful to not forget the rest of the core/valence configuration, i.e. 
something like this
  config='[Ne] 3s2 3p4 3d-1',
may become
  config='1s1 2s2 2p6 3s2 3p4 3d-2 4s-2 4p-2 4d-2',
also, change the name of the output file. Normally you doo not need to 
change anything else, but sometimes reducing the pseudization radii is 
required. Check the output of ld1.x to see how much the core-hole 
contracts the orbitals, and reduce the radii accordingly.

5. You never need the core wavefunction from the pseudopotential with 
the core hole, because the XANES transition is from the unperturbed 1s 
to the perturbed valence, you always use the core wavefunctions from the 
unperturbed pseudopotential.

6. When doing the pw.x calculation you can set tot_charge=+1 or 
tot_charge=0 or anything in between, you may have a look at 
PhysRevB.98.214104 for a discussion on this. You will need a supercell 
to avoid interactions between core-holes (at least 5-7 Å), but you can 
start with a unit cell to see if it works, and do the expensive 
supercells when everything is sorted out.

hope this helps


On 6/1/19 4:49 PM, emin klc wrote:
> Dear Lorenzo,
> 
> Thank you for your email and suggestion.
> 
> The calculation flow for XAS with Xspexctra as follows:
> Firstly, prepare the GIPAW Pseudopotential.
> Secondly, extract the core wavefunction
> Thirdly, prepare input file and run SCF
> Finally, prepare input file and run Xspectra.
> 
> Considering the calculation flow, the problem (or unclear part) is to 
> get the core wavefunction.
> As far as I understand, there are two ways to extract core wave functions:
> 
> One is to use "upf2plotcore.sh" script. (upf2plotcore.sh < Ga.PBE.PP.UPF 
>  > Ga.wfc),  which is your suggestion. Am I correct?
> If yes,
> upf2plotcore.sh < Ga.PBE.PP.UPF(without core hole) > Ga.wfc
> upf2plotcore.sh < Ga.PBE.PP.UPF(with core hole) > h_Ga.wfc.
> which one is correct for spectroscopy.
> 
> The other is to extract from all electron (AE) wavefunction which also 
> includes core wave functions. So, can we use the second way to extract 
> core wavefunction?
> If yes, why the output file by ld1.x does not include 1S core wfc 
> information using my input.
> Your thoughts are welcomed.
> 
> Best regards,
> 
> Mehmet Emin Kilic, PhD
> -----------------------------
> 
> Hello,
> If you want to do spectroscopy with the xspectra code, it does not work
> like that. You do not need an all-electron pseudopotential, but a pseudo
> generated with a 1s1 core.
> 
> -- 
> Lorenzo Paulatto
> 
> On Fri, 31 May 2019, 07:35 emin klc, <klcmemin at gmail.com  <https://lists.quantum-espresso.org/mailman/listinfo/users>> wrote:
> 
>>/Dear QE experts, />//>/I have tried to generate a Ga Pseudopotentials for theoretical />/spectroscopy by ld1.x. />/Firstly, I need to have all electron (AE) wave functions including 1s 2s />/2p 3s 3p core states and valence states. />/I'm having some troubles since the output file (ld1.wfc) only gives 2s 2p />/3s 3p as a core states except for 1s, but which is important for K edge />/spectroscopy. />/I include below my input file for generating all electron wave functions. />//>/Could you say what is wrong with my input? />/----------------------- />/&input />/title = 'Ga', />/iswitch = 1, />/rel = 1, />/zed = 31.0, />/config = '[Ar] 4s2 4p1 3d10.0', />/dft = 'PBE' />/------------------------ />//>/Mehmet Emin Kilic, PhD />
> 
> 
> 
> _______________________________________________
> Quantum ESPRESSO is supported by MaX (www.max-centre.eu/quantum-espresso)
> users mailing list users at lists.quantum-espresso.org
> https://lists.quantum-espresso.org/mailman/listinfo/users
> 

-- 
Lorenzo Paulatto - Paris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: extract_core.f90
Type: text/x-fortran
Size: 2930 bytes
Desc: not available
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20190602/233a4dea/attachment.bin>
-------------- next part --------------
# Makefile for converters to UPF format

include ../make.inc

# location of needed modules
MODFLAGS= $(BASEMOD_FLAGS)

OBJS = write_upf.o read_upf.o
QEMODS = ../Modules/libqemod.a ../FFTXlib/libqefft.a  ../UtilXlib/libutil.a 

TLDEPS = libs mods

all : tldeps extract_core.x casino2upf.x cpmd2upf.x fhi2upf.x fpmd2upf.x \
     ncpp2upf.x oldcp2upf.x read_upf_tofile.x rrkj2upf.x upf2casino.x \
     uspp2upf.x vdb2upf.x virtual_v2.x interpolate.x fix_upf.x

extract_core.x : extract_core.o  $(OBJS) $(QEMODS) $(LIBOBJS)
	$(LD) $(LDFLAGS) -o $@ extract_core.o $(OBJS) $(QEMODS) $(LIBOBJS) $(QELIBS)

casino2upf.x : casino2upf.o casino_pp.o $(OBJS) $(QEMODS) $(LIBOBJS)
	$(LD) $(LDFLAGS) -o $@ casino2upf.o casino_pp.o $(OBJS) $(QEMODS) $(LIBOBJS) $(QELIBS)

upf2upf2.x : upf2upf2.o $(OBJS) $(QEMODS) $(LIBOBJS)
	$(LD) $(LDFLAGS) -o $@ upf2upf2.o $(OBJS) $(QEMODS) $(LIBOBJS) $(QELIBS)

cpmd2upf.x : cpmd2upf.o $(OBJS) $(QEMODS) $(LIBOBJS)
	$(LD) $(LDFLAGS) -o $@ cpmd2upf.o $(OBJS) $(QEMODS) $(LIBOBJS) $(QELIBS)

fhi2upf.x : fhi2upf.o $(OBJS) $(QEMODS) $(LIBOBJS)
	$(LD) $(LDFLAGS) -o $@ fhi2upf.o $(OBJS) $(QEMODS) $(LIBOBJS) $(QELIBS)

fpmd2upf.x : fpmd2upf.o $(OBJS) $(LIBOBJS) 
	$(LD) $(LDFLAGS) -o $@ fpmd2upf.o $(OBJS) $(QEMODS) $(LIBOBJS) $(QELIBS)

ncpp2upf.x : ncpp2upf.o $(OBJS) $(QEMODS) $(LIBOBJS) 
	$(LD) $(LDFLAGS) -o $@ ncpp2upf.o $(OBJS) $(QEMODS) $(LIBOBJS) $(QELIBS)

oldcp2upf.x : oldcp2upf.o $(OBJS) $(QEMODS) $(LIBOBJS)
	$(LD) $(LDFLAGS) -o $@ oldcp2upf.o $(OBJS) $(QEMODS) $(LIBOBJS) $(QELIBS)

read_upf.x : read_ps.o
	$(LD) $(LDFLAGS) -o $@ read_ps.o $(OBJS)

read_upf_tofile.x : read_upf_tofile.o $(OBJS) $(QEMODS) $(LIBOBJS)
	$(LD) $(LDFLAGS) -o $@ read_upf_tofile.o $(OBJS) $(QEMODS) $(LIBOBJS) $(QELIBS)


fix_upf.x: fix_upf.o $(QEMODS) $(LIBOBJS)
	$(LD) $(LDFLAGS) -o $@ fix_upf.o $(QEMODS) $(LIBOBJS) $(QELIBS)

rrkj2upf.x : rrkj2upf.o $(OBJS) $(QEMODS) $(LIBOBJS)
	$(LD) $(LDFLAGS) -o $@ rrkj2upf.o $(OBJS) $(QEMODS) $(LIBOBJS) $(QELIBS)

upf2casino.x : upf2casino.o casino_pp.o $(OBJS) $(QEMODS) $(LIBOBJS)
	$(LD) $(LDFLAGS) -o $@ upf2casino.o casino_pp.o $(OBJS) $(QEMODS) $(LIBOBJS) $(QELIBS)

uspp2upf.x : uspp2upf.o vanderbilt.o $(OBJS) $(QEMODS) $(LIBOBJS)
	$(LD) $(LDFLAGS) -o $@ \
		uspp2upf.o vanderbilt.o $(OBJS) $(QEMODS) $(LIBOBJS) $(QELIBS)

vdb2upf.x : vdb2upf.o vanderbilt.o $(OBJS) $(QEMODS) $(LIBOBJS)
	$(LD) $(LDFLAGS) -o $@ \
		vdb2upf.o vanderbilt.o $(OBJS) $(QEMODS) $(LIBOBJS) $(QELIBS)


virtual_v2.x: virtual_v2.o $(OBJS) $(QEMODS) $(LIBOBJS)
	$(LD) $(LDFLAGS) -o $@ \
		virtual_v2.o $(OBJS) $(QEMODS) $(LIBOBJS) $(QELIBS)

interpolate.x : interpolate.o $(OBJS) $(QEMODS) $(LIBOBJS)
	$(LD) $(LDFLAGS) -o $@ \
		interpolate.o $(OBJS) $(QEMODS) $(LIBOBJS) $(QELIBS)

tldeps:
	if test -n "$(TLDEPS)" ; then \
	( cd ../ ; $(MAKE) $(TLDEPS) || exit 1 ) ; fi

clean :
	- /bin/rm -f  *.x *.o *~ *_tmp.f90 *.mod *.d *.i *.L

include make.depend


More information about the users mailing list