TDDFT with GGA XC-functional

Deals with issues related to computation of optical spectra, in RPA (-o c) or by solving the Bethe-Salpeter equation (-o b). Includes local field effects, excitons, etc.

Moderators: Davide Sangalli, Daniele Varsano, andrea.ferretti, andrea marini, Conor Hogan, myrta gruning

Post Reply
subhayan
Posts: 24
Joined: Thu Sep 26, 2019 7:48 am

TDDFT with GGA XC-functional

Post by subhayan » Thu Sep 26, 2019 9:00 am

Hi,

I am a very new user of Yambo. I am trying to do ALDA calculation for CO2 molecule. The DFT calculation is done with pwscf. The Yambo input file is generated with the command "yambo -o b -k alda". However, the tddft calculation calculation, which is run with yambo 4.4.0, crashes with the message "[ERROR] Fxc not coded for GGA".
I was wondering if you could suggest a way around this. Is this planned for a future version?

Best regards,
Subhayan
Subhayan Roychoudhury
Postdoctoral researcher
Lawrence Berkeley National Laboratory

User avatar
Daniele Varsano
Posts: 2660
Joined: Tue Mar 17, 2009 2:23 pm
Contact:

Re: TDDFT with GGA XC-functional

Post by Daniele Varsano » Thu Sep 26, 2019 9:07 am

Dear Subhayan,
welcome on the yambo forum. Please add your complete name and affiliation in your future posts, this is a rule of the forum and you can do once for all by filling the signature in your user profile.

From your post, it is not clear if your intention is to perform calculations in ALDA of in GGA approximation. If you are trying an ALDA calculation that error message should not show up, please post your qe and yambo input and report files and we will see what is happening.
Contrary, if you are interestede in TDDFT with GGA, at the moment this is not implemented and actually, it is not in the developing plan, anyway it should not be too hard to implement.

Best,

Daniele
Dr. Daniele Varsano
S3-CNR Institute of Nanoscience and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu/

subhayan
Posts: 24
Joined: Thu Sep 26, 2019 7:48 am

Re: TDDFT with GGA XC-functional

Post by subhayan » Thu Sep 26, 2019 11:54 am

Hi Daniele,

Many thanks for the prompt reply. I am pasting the yambo input, yambo report file and the qe input (nscf) file here. The qe calculation is done with PBE functional. My intention is to use ALDA xc-kernel for TDDFT. Kindly let me know your thoughts.

--------------------------------------------------------yambo input----------------------------------------------------------------------------
optics # [R OPT] Optics
chi # [R CHI] Dyson equation for Chi.
tddft # [R K] Use TDDFT kernel
StdoHash= 40 # [IO] Live-timing Hashes
Nelectro= 18.00000 # Electrons number
ElecTemp= 0.000000 eV # Electronic Temperature
BoseTemp=-1.000000 eV # Bosonic Temperature
OccTresh=0.1000E-4 # Occupation treshold (metallic bands)
DBsIOoff= "none" # [IO] Space-separated list of DB with NO I/O. DB=(DIP,X,HF,COLLs,J,GF,CARRIERs,OBS,W,SC,BS,ALL)
DBsFRAGpm= "none" # [IO] Space-separated list of +DB to FRAG and -DB to NOT FRAG. DB=(DIP,X,W,HF,COLLS,K,BS,QINDX,RT,ELP
FFTGvecs= 135043 RL # [FFT] Plane-waves
#WFbuffIO # [IO] Wave-functions buffered I/O
NonPDirs= "none" # [X/BSS] Non periodic chartesian directions (X,Y,Z,XY...)
Chimod= "ALDA" # [X] IP/Hartree/ALDA/LRC/PF/BSfxc
ChiLinAlgMod= "LIN_SYS" # [X] inversion/lin_sys
FxcGRLc= 1 RL # [TDDFT] XC-kernel RL size
NGsBlkXd= 1 RL # [Xd] Response block size
% QpntsRXd
1 | 1 | # [Xd] Transferred momenta
%
% BndsRnXd
1 | 45 | # [Xd] Polarization function bands
%
GrFnTpXd= "T" # [Xd] Green`s function (T)ordered,(R)etarded,(r)senant,(a)ntiresonant [T, R, r, Ta, Ra]
% EnRngeXd
0.00000 | 10.00000 | eV # [Xd] Energy range
%
% DmRngeXd
0.10000 | 0.10000 | eV # [Xd] Damping range
%
DmERefXd= 0.000000 eV # [Xd] Damping reference energy
CGrdSpXd= 100.0000 # [Xd] [o/o] Coarse grid controller
ETStpsXd= 100 # [Xd] Total Energy steps
EMStpsXd= 100.0000 # [Xd] [o/o] Memory Energy steps
DrudeWXd= ( 0.00 , 0.00 ) eV # [Xd] Drude plasmon
% EhEngyXd
-1.000000 |-1.000000 | eV # [Xd] Electron-hole energy range
%
% LongDrXd
1.000000 | 0.000000 | 0.000000 | # [Xd] [cc] Electric Field
%
#DrClassic # [X] Use a classical model for the drude term
XfnQPdb= "none" # [EXTQP Xd] Database
XfnQP_N= 1 # [EXTQP Xd] Interpolation neighbours
% XfnQP_E
0.000000 | 1.000000 | 1.000000 | # [EXTQP Xd] E parameters (c/v) eV|adim|adim
%
XfnQP_Z= ( 1.000000 , 0.000000 ) # [EXTQP Xd] Z factor (c/v)
XfnQP_Wv_E= 0.000000 eV # [EXTQP Xd] W Energy reference (valence)
% XfnQP_Wv
0.00 | 0.00 | 0.00 | # [EXTQP Xd] W parameters (valence) eV| 1|eV^-1
%
XfnQP_Wv_dos= 0.000000 eV # [EXTQP Xd] W dos pre-factor (valence)
XfnQP_Wc_E= 0.000000 eV # [EXTQP Xd] W Energy reference (conduction)
% XfnQP_Wc
0.00 | 0.00 | 0.00 | # [EXTQP Xd] W parameters (conduction) eV| 1 |eV^-1
%
XfnQP_Wc_dos= 0.000000 eV # [EXTQP Xd] W dos pre-factor (conduction)
DipApproach= "G-space v" # [Xd] [G-space v/R-space x/Covariant/Shifted grids]
#DipPDirect # [Xd] Directly compute <v> also when using other approaches for dipoles
ShiftedPaths= "" # [Xd] Shifted grids paths (separated by a space)
% Qdirection
0.00 | 0.00 | 0.00 | # [Xd] Transferred momentum direction (iku)
%
QShiftOrder= 1 # [Xd] Pick-up the (QShiftOrder)th q+G vector
DbGdQsize= 1.000000 # [X,DbGd][o/o] Percentual of the total DbGd transitions to be used

--------------------------------------------------------yambo report----------------------------------------------------------------------------

* CPU : 1
* THREADS (max): 1
* THREADS TOT(max): 1
* I/O NODES : 1
* Fragmented WFs :yes

CORE databases in .
Additional I/O in .
Communications in .
Input file is yambo.in
Report file is ./r_optics_chi_tddft
Precision is SINGLE
Log files in ./LOG

[RD./SAVE//ns.db1]------------------------------------------
Bands : 45
K-points : 1
G-vectors [RL space]: 1985227
Components [wavefunctions]: 135043
Symmetries [spatial]: 16
Spinor components : 1
Spin polarizations : 1
Temperature [ev]: 0.000000
Electrons : 18.00000
WF G-vectors : 135043
Max atoms/species : 2
No. of atom species : 2
Exact exchange fraction in XC : 0.000000
Exact exchange screening in XC : 0.000000
Magnetic symmetries : no
- S/N 005553 -------------------------- v.04.04.00 r.00148 -

[02] CORE Variables Setup
=========================


[02.01] Unit cells
==================

Unit cell is CUB

... containing 1C2O atoms

... with scaling factors [a.u.]: 20.00000 20.00000 20.00000

Direct Lattice(DL) unit cell [iru / cc(a.u.)]
A1 = 1.000000 0.000000 0.000000 20.00000 0.000000 0.000000
A2 = 0.000000 1.000000 0.000000 0.000000 20.00000 0.000000
A3 = 0.000000 0.000000 1.000000 0.000000 0.000000 20.00000

DL volume [au]: 8000.

Reciprocal Lattice(RL) unit cell [iku / cc]
B1 = 1.000000 0.000000 0.000000 0.314159 0.000000 0.000000
B2 = 0.000000 1.000000 0.000000 0.000000 0.314159 0.000000
B3 = 0.000000 0.000000 1.000000 0.000000 0.000000 0.314159


[02.02] Symmetries
==================

DL (S)ymmetries [cc]
[S1] 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000
[S2]-1.000000 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 0.000000 1.000000
[S3]-1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 -1.000000
[S4] 1.000000 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 0.000000 -1.000000
[S5] 0.000000 1.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.000000 -1.000000
[S6] 0.000000 -1.000000 0.000000 -1.000000 0.000000 0.000000 0.000000 0.000000 -1.000000
[S7] 0.000000 -1.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000
[S8] 0.000000 1.000000 0.000000 -1.000000 0.000000 0.000000 0.000000 0.000000 1.000000
[S9]-1.000000 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 0.000000 -1.000000
[S10] 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 -1.000000
[S11] 1.000000 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 0.000000 1.000000
[S12]-1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000
[S13] 0.000000 -1.000000 0.000000 -1.000000 0.000000 0.000000 0.000000 0.000000 1.000000
[S14] 0.000000 1.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000
[S15] 0.000000 1.000000 0.000000 -1.000000 0.000000 0.000000 0.000000 0.000000 -1.000000
[S16] 0.000000 -1.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.000000 -1.000000

[SYMs] K-space Time-reversal not included
[SYMs] Spatial inversion 9 is a symmetry
[SYMs] Group table built correctly

[02.03] RL shells
=================

Shells, format: [S#] G_RL(mHa)

[S5069]:1985227(0.2999E+6) [S5068]:1984795(0.2999E+6) [S5067]:1984219(0.2998E+6) [S5066]:1983491(0.
[S5065]:1981979(0.2997E+6) [S5064]:1981691(0.2996E+6) [S5063]:1981403(0.2995E+6) [S5062]:1980971(0.
[S5061]:1980155(0.2994E+6) [S5060]:1979579(0.2994E+6) [S5059]:1979219(0.2993E+6) [S5058]:1978355(0.
[S5057]:1977491(0.2992E+6) [S5056]:1977419(0.2991E+6) [S5055]:1976747(0.2991E+6) [S5054]:1975979(0.
[S5053]:1975691(0.2990E+6) [S5052]:1975067(0.2990E+6) [S5051]:1974587(0.2989E+6) [S5050]:1973867(0.
[S5049]:1973267(0.2988E+6) [S5048]:1972307(0.2987E+6) [S5047]:1971707(0.2987E+6) [S5046]:1971515(0.
[S5045]:1971035(0.2986E+6) [S5044]:1970111(0.2985E+6) [S5043]:1969631(0.2985E+6) [S5042]:1969439(0.
...
[S12]:179( 592.1764) [S11]:171( 542.8282) [S10]:147( 493.4803) [S9]:123( 444.1322)
[S8]:93( 394.7842) [S7]:81( 296.0882) [S6]:57( 246.7401) [S5]:33( 197.3921)
[S4]:27( 148.0441) [S3]:19( 98.69605) [S2]:7( 49.34803) [S1]:1( 0.000000)

[02.04] K-grid lattice
======================

Compatible Grid is 0D
K lattice UC volume [au]: 0.03101

[02.05] Energies [ev] & Occupations
===================================

[X]Fermi Level [ev]: -2.297372
[X]VBM / CBm [ev]: -2.297372 -2.297372
[X]Electronic Temp. [ev K]: 0.8617E-5 0.1000
[X]Bosonic Temp. [ev K]: 0.8617E-5 0.1000
[X]Finite Temperature mode: no
[X]El. density [cm-3]: 0.152E+23
[X]States summary : Full Metallic Empty
0001-0008 0009-0010 0011-0045
[X]N of el / N of met el : 18.00000 2.00000
[X]Average metallic occ. : 0.500000

[WARNING][X] Metallic system
X BZ K-points : 1

Energy unit is electronVolt [eV]

*X* K [1] : 0.000000 0.000000 0.000000 ( cc) * Comp.s 135043 * weight 1.000000
0.000000 0.000000 0.000000 (rlu)
E -28.67739 -28.19344 -14.17189 -13.32065 -11.76123 -11.76123 -10.05218 -10.05218
E 0.000000 0.000000 0.120404 2.398679 3.251992 3.251992 3.345981 3.475549
E 3.505038 3.889462 4.485141 4.624875 4.624875 4.668323 4.668323 4.708468
E 4.858829 4.859085 4.909314 4.909314 4.930355 5.449740 6.023182 6.082369
E 6.082372 6.087864 6.189073 6.189075 6.252212 6.495060 6.775066 7.285148
E 7.287811 7.320916 7.320925 7.875601 8.008535

Timing [Min/Max/Average]: 04s/04s/04s

[03] Transferred momenta grid
=============================

[RD./SAVE//ndb.kindx]---------------------------------------
Fragmentation :no
Polarization last K : 1
QP states : 1 1
X grid is uniform :yes
BS scattering :no
COLL scattering :no
- S/N 005553 -------------------------- v.04.04.00 r.00148 -

IBZ Q-points : 1
BZ Q-points : 1

Q [00001] : 0.00 0.00 0.00 (iku) * weight 1.000000

Q [00001] : 0.00 0.00 0.00 (cc ) * weight 1.000000

[04] Optics
===========

[WF-Rho] Performing Wave-Functions I/O from ./SAVE

[FFT-Rho] Mesh size: 63 63 63

[WF-Rho loader] Normalization (few states) min/max :0.7039E-09 1.000

[xc] Functional Perdew, Burke & Ernzerhof(X)+Perdew, Burke & Ernzerhof(C)
[xc] LIBXC used to calculate xc functional

[ERROR] STOP signal received while in :[04] Optics

[ERROR] Fxc not coded for GGA

--------------------------------------------------------QE nscf input file----------------------------------------------------------------------------

&control
calculation='nscf',
restart_mode='from_scratch',
prefix='co2'
pseudo_dir = '/global/homes/s/subhayan/UPF.d',
verbosity = 'high'
wf_collect=.true.
/
&system
ibrav = 1, celldm(1) =20.0, nat= 3, ntyp= 2,
ecutwfc = 100.0, ecutrho = 600.0, nbnd = 45
/
&electrons
mixing_beta = 0.7,
conv_thr = 1.0d-8,
diago_thr_init=5.0e-6,
diago_full_acc=.true.
electron_maxstep = 100,
diagonalization='david'
mixing_mode = 'plain'
/
ATOMIC_SPECIES
C 12.01 c.upf
O 16.01 o_1s1.upf
ATOMIC_POSITIONS (angstrom)
C 0.000000 0.000000 0.000000
O 0.000000 0.000000 1.220000
O 0.000000 0.000000 -1.220000
K_POINTS (automatic)
1 1 1 0 0 0

--------------------------------------------------------------------------------------------------------------------------------

Best regards,
Subhayan
Subhayan Roychoudhury
Postdoctoral researcher
Lawrence Berkeley National Laboratory

User avatar
Daniele Varsano
Posts: 2660
Joined: Tue Mar 17, 2009 2:23 pm
Contact:

Re: TDDFT with GGA XC-functional

Post by Daniele Varsano » Thu Sep 26, 2019 12:48 pm

Dear Subhayan,
The qe calculation is done with PBE functional.
The problem here arises from the fact you used a PBE functional for the ground state.
ALDA, at the moment, works for calculation starting from LDA ground state.
If you really need to perform and ALDA on top of PBE ground state it is possible to hack the code quickly in a dirty way.
In any case, I suggest you to compute the ALDA in transition space instead of reciprocal space as it faster and it is calculated in real space and automatically includes all the gvectors in the kernel (note that you set FxcGRLc=1 which is for sure not converged, note also NGsBlkXd=1 means that you do not include local field effects ).
This can be done by generating input as:

Code: Select all

yambo -o b -k alda -y d
Best,
Daniele
Dr. Daniele Varsano
S3-CNR Institute of Nanoscience and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu/

subhayan
Posts: 24
Joined: Thu Sep 26, 2019 7:48 am

Re: TDDFT with GGA XC-functional

Post by subhayan » Thu Sep 26, 2019 8:01 pm

Hi Daniele,

Many thanks for this. Actually, I had tried running in e-h space first (since I need the e-h amplitudes for future calculations) and experienced similar problem (i.e. f_xc with ALDA is not compatible with GGA v_xc). Any chance you can tell me more about the quick and dirty hack for the code?

Best regards,
Subhayan
Subhayan Roychoudhury
Postdoctoral researcher
Lawrence Berkeley National Laboratory

User avatar
Daniele Varsano
Posts: 2660
Joined: Tue Mar 17, 2009 2:23 pm
Contact:

Re: TDDFT with GGA XC-functional

Post by Daniele Varsano » Fri Sep 27, 2019 9:06 am

Dear Subhayan,
in line of principle, you can cheat the code, but it needs a bit of testing and it is somehow dangerous.
For the moment, I suggest you to start from an LDA ground state.
As soon as I find some time I will code the possibility to run an ALDA calculation on top of any functional, and I will let you know.

Best,
Daniele
Dr. Daniele Varsano
S3-CNR Institute of Nanoscience and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu/

subhayan
Posts: 24
Joined: Thu Sep 26, 2019 7:48 am

Re: TDDFT with GGA XC-functional

Post by subhayan » Fri Sep 27, 2019 9:33 am

Hi Daniele,

That sounds great :-)
Thank you very much.

Best regards,
Subhayan
Subhayan Roychoudhury
Postdoctoral researcher
Lawrence Berkeley National Laboratory

Post Reply