Page 1 of 2
p2y reading of "hybrid" calculations
Posted: Wed Jul 10, 2019 7:49 am
by chwolf
Dear all,
the release notes say that Yambo can now start based on hybrid DFT calculations; I assume that works by first performing an SCF calculation
Code: Select all
&SYSTEM
ibrav = 2
celldm(1) = 8.040359168
ntyp = 2
nat = 2
ecutwfc = 60
force_symmorphic=.true.
occupations ='fixed'
input_dft = 'b3lyp'
nbnd = 16
/
and then convert it to a yambo database; however p2y complains
This is p2y 4.3.2 rev.134 - MPI -
Code: Select all
<---> DBs path set to .
<---> detected QE data format: qexsd
<---> == PWscf v.6.x generated data (QEXSD fmt) ==
<---> Header/K-points/Energies... done
<---> Cell data...
<---> [WARNING]Two or more crystal strcutures fit the given cell done
<---> Atomic data... done
<---> Symmetries...[SI yes]...[I yes]...[-I yes]...[TR no]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Error in routine qexsd_read_exx (2):
fmt error
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
stopping ...
Abort(2) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, 2) - process 0
PW version is Program PWSCF v.6.4.1 starts on 10Jul2019 at 15:48:41
Thanks in advance for your assistance!
Chris
Re: p2y reading of "hybrid" calculations
Posted: Wed Jul 10, 2019 10:18 am
by andrea.ferretti
Hi Chris,
something may have changed in the QE xml format for v6.4.1 which breaks some corner features. I'll try to have a look.
Can you provide the input file that shows the problem ?
thanks for reporting
Andrea
Re: p2y reading of "hybrid" calculations
Posted: Wed Jul 10, 2019 10:29 am
by Daniele Varsano
Dear Chris,
we are working on this feature and at the moment it is possible to perform GW on top of hybrid for the plain HF, PBE0.
It is also possible to use GAUP, but it is not yet in the GPL release. Note that exx divergencies need to be treated in the same foot in QE and Yambo,
and this can be achieved by using "vcut_spherical" in QE and a sphere cutoff potential in Yambo for a finite system, or "vcut_ws" in QE and "ws" in Yambo.
B3LYP, unfortunately, presents some discrepancy we need still to investigate.
Anyway, the problem you are facing with p2y it is independent on that, we will try to reproduce your error and let you know, I do not know if some compatibility has been broken
with the 6.4.1.
Best,
Daniele
PS: I have just realized now Andrea answers you, we will try to fix it soon, but anyway take into account the warning in the first part of my message.
Re: p2y reading of "hybrid" calculations
Posted: Thu Jul 11, 2019 5:21 am
by chwolf
Hi Guys, thank you both for your swift replies.
The new features in the recent release of Yambo are really exciting, I have been playing around over the last week or so and it has improved on so many levels - thank you all in the YAMBO team!
I tried it again with EXX=HSE, PBE0
Code: Select all
&CONTROL
calculation = "scf",
restart_mode = "from_scratch",
prefix = "mgo",
outdir = "./tmp",
pseudo_dir = "./pseudo",
wf_collect = .true.
/
&SYSTEM
ibrav = 1
A = 4.15410
ntyp = 2
nat = 8
ecutwfc = 60
ecutrho = 300
force_symmorphic=.true.
occupations ='fixed'
input_dft = 'EXX'
nbnd = 60
exxdiv_treatment = 'vcut_spherical'
!ecutvcut = 60
x_gamma_extrapolation =.false.
ecutfock = 300
/
&ELECTRONS
conv_thr = 1e-10
diago_thr_init = 1e-2
diago_full_acc = .true.
/
&IONS
/
ATOMIC_SPECIES
Mg 24.30500 Mg_ONCV_PBE_nocorr.upf
O 15.99900 O_ONCV_PBE_nocorr.upf
K_POINTS automatic
2 2 2 0 0 0
ATOMIC_POSITIONS {crystal}
Mg 0.000000000000000 0.000000000000000 0.000000000000000
Mg 0.000000000000000 0.500000000000000 0.500000000000000
Mg 0.500000000000000 0.000000000000000 0.500000000000000
Mg 0.500000000000000 0.500000000000000 0.000000000000000
O 0.500000000000000 0.500000000000000 0.500000000000000
O 0.500000000000000 0.000000000000000 0.000000000000000
O 0.000000000000000 0.500000000000000 0.000000000000000
O 0.000000000000000 0.000000000000000 0.500000000000000
highest occupied, lowest unoccupied level (ev): 6.5711 14.2325 (HSE, not bad..)
p2y first gives
Code: Select all
<---> DBs path set to .
<---> detected QE data format: qexsd
<---> == PWscf v.6.x generated data (QEXSD fmt) ==
<---> Header/K-points/Energies...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Error in routine qexsd_read_planewaves (2):
fmt problem I
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
and after fixing the format as noted in the other post I get the
Code: Select all
<---> DBs path set to .
<---> detected QE data format: qexsd
<---> == PWscf v.6.x generated data (QEXSD fmt) ==
<---> Header/K-points/Energies... done
<---> Cell data...
<---> [WARNING]Two or more crystal strcutures fit the given cell done
<---> Atomic data... done
<---> Symmetries...[SI yes]...[I yes]...[-I yes]...[TR no]
[b] <---> XC functional...HSE06(XC)[/b]
<---> EXX fraction... 0.250000
<---> EXX screening... 0.106000
<---> K-points mesh... done
<---> RL vectors... done
<---> IGK arrays... done
<---> Energies... done
<---> :: Electrons : 64.00000
<---> :: Temperature [ev]: 0.000000
<---> :: Lattice factors [a.u.]: 7.850111 7.850111 7.850111
<---> :: K-points : 4
<---> :: Bands : 60
<---> :: Spinor components : 1
<---> :: Spin polarizations : 1
<---> :: Spin orbit coupling : no
<---> :: Symmetries [spatial]: 48
<---> :: [T-rev]: no
<---> :: Max WF components : 3840
<---> :: RL vectors (WF): 4929
<---> :: RL vectors (CHARGE): 42499
<---> :: XC potential : HSE06(XC)
<---> :: Atomic species : 2
<---> :: Max atoms/species : 4
<---> == DB1 (Gvecs and more) ...
<---> ... Database done
<---> == DB2 (wavefunctions) ...
<---> [p2y] wfc_io |########################################| [100%] --(E) --(X) done ==
<---> == DB3 (PseudoPotential) ... done ==
<---> == P2Y completed ==
I will try to see if yambo lets me work with this.
Quick question: The release notes say:
Code: Select all
(iii) handling of non-linear core corrections (NLCC) and USPPs data.
as far as I know NLCC should *NOT* be used in hybrid calcs (I forgot the exact reason..) - in any case I assume it is safe to use PP without NLCC for both calculations (Hybrid and Yambo)?
Thank you both!
Chris
Re: p2y reading of "hybrid" calculations
Posted: Thu Jul 11, 2019 5:31 am
by chwolf
just fyi, it seems to work; RPA spectra are attached for calculations based on PBE and HSE (same PBE pseudos); no convergence tests done, just quick and dirty.
with PBE
LDA.png
with HSE@PBE
HSE.png
Re: p2y reading of "hybrid" calculations
Posted: Thu Jul 11, 2019 9:28 am
by Daniele Varsano
Dear Christoph,
1) Even if it seems to work, HSE it is not supported. There should be a warning on that, but it is not yet percolated in the GPL release. So I strongly suggest you to switch to PBE0. What it happens is that the <Vxc> value calculated by QE and Yambo can be slightly different and do not cancel out due to the different way to treat the q->0 limit (yambo for the moment does not have the Gigy Baldereschi technique) and when using other exx_divergence technique there are problems in QE. Actually, we are working on that and I hope we can fix it soon. There is also a compatibility problem with B3LYP but in these days I'm validating it, and hopefully, it will be available in few days. So for the moment, I suggest you use the PBE0 functional.
2) Better not to use NLCC for both calculations. The reason is that they are used in the local part of Vxc, but then they are not included in the HF part of the functional.
Best,
Daniele
Re: p2y reading of "hybrid" calculations
Posted: Fri Jul 12, 2019 1:20 am
by chwolf
Dear Daniele,
Thank you for your helpful comment, that was exactly what I needed to know. I will keep an eye on github to see if there are any updates regarding B3LYP (as it gives me the best "hybrid band gaps")!
Best,
Chris
Re: p2y reading of "hybrid" calculations
Posted: Fri Jul 12, 2019 12:04 pm
by Daniele Varsano
Dear Chris,
the problem with B3LYP has been fixed, the fix will enter in the next release. In the meanwhile, if you want to use it consider to apply the following patch:
In /src/modules/mod_xc_functionals.F
you should change the following lines:
Code: Select all
166 if ((XC_libxcID(f(ixc)%id,ixc)==XC_HYB_GGA_XC_PBEH).or.&
167 & (XC_libxcID(f(ixc)%id,ixc)==XC_HYB_GGA_XC_B3LYP)) &
168 & call xc_f90_hyb_gga_xc_pbeh_set_par(f(ixc)%conf,exx_frac_)
in
Code: Select all
if (XC_libxcID(f(ixc)%id,ixc)==XC_HYB_GGA_XC_PBEH) call xc_f90_hyb_gga_xc_pbeh_set_par(f(ixc)%conf,exx_frac_)
i.e. remove the .or. (XC_libxcID(f(ixc)%id,ixc)==XC_HYB_GGA_XC_B3LYP)
from the if condition and recompile.
Next, in order to have full compatibility with the results of QE you should use the in QE input:
instead of simple B3LYP
If you are dealing with orthorombic cells you should treat the divergence by using the ws technique:
Code: Select all
exxdiv_treatment='vcut_ws'
ecutvcut=1.7
x_gamma_extrapolation = .false.
Next, when doing calculations in yambo you should use analogously:
Code: Select all
CUTGeo= "ws xyz" # [CUT] Coulomb Cutoff geometry: box/cylinder/sphere/ws X/Y/Z/XY..
CUTwsGvec= 1.700000 # [CUT] WS cutoff: number of G to be modified
This will provide perfect compatibility between yambo and QE. If you are using non-orthorombic cells I think that QE does not allow to use that treatment (you can have a try) and in this case an (hopefully) small error will come from the different way to treat the divergences between the two codes.
Best,
Daniele
Re: p2y reading of "hybrid" calculations
Posted: Sat Jun 05, 2021 12:38 pm
by haseebphysics1
Dear Daniele,
I want to try BSE on top of hybrid functional (HSE06). Does the "vcut_ws" treatment from QE and Coulomb Cutoff in Yambo (and other variables mentioned herein in this thread) should be used as mentioned in the previous post of this thread for B3LYP?
PS: I am using QE V6.7 and Yambo 5.0.2.
Thanks,
Re: p2y reading of "hybrid" calculations
Posted: Sat Jun 05, 2021 2:55 pm
by Daniele Varsano
Dear Haseeb,
unfortunately, as mentioned above, HSE06 is not supported, of better, it is coded, but not validated are there are some issue with the divergence treatment. Note also that the cut_ws is not compatible with the HSE06 in QE.
You can use other functionals as PBE0 or B3LYP and if you want to use a range separated functional you can use the GAU-PBE. In this case exxdiv_treatment should be set to "none".
Best,
Daniele