<div dir="ltr">Dear Lorenzo,<div><br><div>Thank you for your detailed response. I appreciate it. Everything is so clear now.<br></div><div><br></div><div>Best regards,</div><div><br></div><div>Mehmet Emin Kilic, PhD</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 3, 2019 at 4:41 AM Lorenzo Paulatto <<a href="mailto:paulatz@gmail.com">paulatz@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">My workflow for Xpectra calculations:<br>
<br>
1. first of all do everything with the standard pseudopotential with the <br>
full core, this is much cheaper (no need of supercell) and easier (no <br>
need to generate pseudopotentials), all you need is the 1s wavefunction <br>
in a text file, if the pseudopotential already contains GIPAW data, you <br>
can extract it, otherwise if the code was generated with ld1.x, you cna <br>
grab the input (it is at the beginning of the file) add<br>
  lsave_wfc=.true.<br>
to the input (check the INPUT_LD1 manual), and regenerate it as<br>
  ld1.x < input.txt<br>
with the all-electron data included.<br>
<br>
If the pseudo did not come from ld1, you have to speak with the person <br>
who generated it to see if gipaw data can be included, or use another <br>
pseudo.<br>
<br>
2. The upf2plotcore script does not work with most UPF files, use the <br>
attached extract_core.f90, you can put it in upftools/ together with the <br>
Makefile, just run<br>
   extract_core.x file.UPF<br>
and it will produce one file for each core wavefunction (which you pick <br>
depending on the edge you want)<br>
<br>
3. pw.x: if you have inequivalent atoms of the emitting type, take care <br>
to assign different types to each one, i.e. S1, S2 so you can get all <br>
the spectra,<br>
3b. xspectra.x: no need to use a supercell, or do any nscf calculation. <br>
You may want to specify a finer grid of k-points directly in xspectra, <br>
you can set the right after the namelists:<br>
...<br>
  &cut_occ<br>
     cut_desmooth=0.1,<br>
     cut_stepl=0.01,<br>
  /<br>
4 4 4 1 1 1   <-- this is the grid used by xspectra<br>
<br>
<br>
4. Now you want to refine the spectra, by including the core-hole, grab <br>
the ld1 input from above, and make a pseudo with only 1s1 electron, be <br>
careful to not forget the rest of the core/valence configuration, i.e. <br>
something like this<br>
  config='[Ne] 3s2 3p4 3d-1',<br>
may become<br>
  config='1s1 2s2 2p6 3s2 3p4 3d-2 4s-2 4p-2 4d-2',<br>
also, change the name of the output file. Normally you doo not need to <br>
change anything else, but sometimes reducing the pseudization radii is <br>
required. Check the output of ld1.x to see how much the core-hole <br>
contracts the orbitals, and reduce the radii accordingly.<br>
<br>
5. You never need the core wavefunction from the pseudopotential with <br>
the core hole, because the XANES transition is from the unperturbed 1s <br>
to the perturbed valence, you always use the core wavefunctions from the <br>
unperturbed pseudopotential.<br>
<br>
6. When doing the pw.x calculation you can set tot_charge=+1 or <br>
tot_charge=0 or anything in between, you may have a look at <br>
PhysRevB.98.214104 for a discussion on this. You will need a supercell <br>
to avoid interactions between core-holes (at least 5-7 Å), but you can <br>
start with a unit cell to see if it works, and do the expensive <br>
supercells when everything is sorted out.<br>
<br>
hope this helps<br>
<br>
<br>
On 6/1/19 4:49 PM, emin klc wrote:<br>
> Dear Lorenzo,<br>
> <br>
> Thank you for your email and suggestion.<br>
> <br>
> The calculation flow for XAS with Xspexctra as follows:<br>
> Firstly, prepare the GIPAW Pseudopotential.<br>
> Secondly, extract the core wavefunction<br>
> Thirdly, prepare input file and run SCF<br>
> Finally, prepare input file and run Xspectra.<br>
> <br>
> Considering the calculation flow, the problem (or unclear part) is to <br>
> get the core wavefunction.<br>
> As far as I understand, there are two ways to extract core wave functions:<br>
> <br>
> One is to use "upf2plotcore.sh" script. (upf2plotcore.sh < Ga.PBE.PP.UPF <br>
>  > Ga.wfc),  which is your suggestion. Am I correct?<br>
> If yes,<br>
> upf2plotcore.sh < Ga.PBE.PP.UPF(without core hole) > Ga.wfc<br>
> upf2plotcore.sh < Ga.PBE.PP.UPF(with core hole) > h_Ga.wfc.<br>
> which one is correct for spectroscopy.<br>
> <br>
> The other is to extract from all electron (AE) wavefunction which also <br>
> includes core wave functions. So, can we use the second way to extract <br>
> core wavefunction?<br>
> If yes, why the output file by ld1.x does not include 1S core wfc <br>
> information using my input.<br>
> Your thoughts are welcomed.<br>
> <br>
> Best regards,<br>
> <br>
> Mehmet Emin Kilic, PhD<br>
> -----------------------------<br>
> <br>
> Hello,<br>
> If you want to do spectroscopy with the xspectra code, it does not work<br>
> like that. You do not need an all-electron pseudopotential, but a pseudo<br>
> generated with a 1s1 core.<br>
> <br>
> -- <br>
> Lorenzo Paulatto<br>
> <br>
> On Fri, 31 May 2019, 07:35 emin klc, <klcmemin at <a href="http://gmail.com" rel="noreferrer" target="_blank">gmail.com</a>  <<a href="https://lists.quantum-espresso.org/mailman/listinfo/users" rel="noreferrer" target="_blank">https://lists.quantum-espresso.org/mailman/listinfo/users</a>>> wrote:<br>
> <br>
>>/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 /><br>
> <br>
> <br>
> <br>
> _______________________________________________<br>
> Quantum ESPRESSO is supported by MaX (<a href="http://www.max-centre.eu/quantum-espresso" rel="noreferrer" target="_blank">www.max-centre.eu/quantum-espresso</a>)<br>
> users mailing list <a href="mailto:users@lists.quantum-espresso.org" target="_blank">users@lists.quantum-espresso.org</a><br>
> <a href="https://lists.quantum-espresso.org/mailman/listinfo/users" rel="noreferrer" target="_blank">https://lists.quantum-espresso.org/mailman/listinfo/users</a><br>
> <br>
<br>
-- <br>
Lorenzo Paulatto - Paris<br>
</blockquote></div>