Page 1 of 1

ALDA with spin-polarized calculation

Posted: Sun Dec 22, 2019 1:16 am
by subhayan
Dear developer,

I am trying to run an ALDA yambo calculation in e-h space on top of a pwscf calculation using nspin=2. The yambo output-report shows the warning: "[WARNING]TDDFT/ALDA not implemented for n_spin>1. Switched off". Does this mean that it is essentially using K=0? Could you please let me know if there is any way to perform ALDA-TDDFT calculation is e-h space with a spin-polarized pwscf output?

Best regards,
Subhayan

Re: ALDA with spin-polarized calculation

Posted: Tue Dec 24, 2019 12:14 am
by Davide Sangalli
Dear Subhayan Roychoudhury,
it means it is using K=v as in RPA.
TDDFT with spin it is not officially supported.

However, checking the code, everything seems already in place.
You may try to just switch off the barrier, i.e. replace the line

Code: Select all

 BS_K_is_ALDA=l_alda_fxc.and.n_spin==1
with

Code: Select all

 BS_K_is_ALDA=l_alda_fxc
and remove the warning message, i.e. delete the line

Code: Select all

 if (n_spin>1.and.l_alda_fxc) call warning('TDDFT/ALDA not implemented for n_spin>1. Switched off')
in

Code: Select all

src/bse/K_driver.F
and re-run

Code: Select all

make yambo
It could work.
Please check and let us know if you get reasonable results.

Best,
D.

Re: ALDA with spin-polarized calculation

Posted: Wed Dec 25, 2019 10:22 am
by subhayan
Dear Davide Sangalli,

Thanks a lot for this. Let me give it a try and get back to you as soon as I can.

Best regards,
Subhayan

Re: ALDA with spin-polarized calculation

Posted: Thu Dec 26, 2019 10:42 am
by subhayan
Dear Davide,

The ALDA calculation seems to be crashing when I recompile with the above modifications. I am pasting the error message below (not sure if they will be of any help). Please let me know what you think. Please note that it runs fine with hartree or sex approximation.

The last two lines printed in r_optics_bse_bss_tddft are:

[xc] Functional Slater exchange(X)+Perdew & Zunger(C)
[xc] LIBXC used to calculate xc functional

The error file is pasted below:

[n0237:23479] *** Process received signal ***
[n0237:23479] Signal: Segmentation fault (11)
[n0237:23479] Signal code: Address not mapped (1)
[n0237:23479] Failing at address: (nil)
[n0237:23479] [ 0] /lib64/libpthread.so.0(+0xf630)[0x2b4d023d6630]
[n0237:23479] [ 1] /global/home/users/subhayan/traceback_yambo.d/bin/yambo(__intel_memset+0xac7)[0xaed977]
[n0237:23479] [ 2] /global/home/users/subhayan/traceback_yambo.d/bin/yambo[0x5552d8]
[n0237:23479] [ 3] /global/home/users/subhayan/traceback_yambo.d/bin/yambo[0x54b4d2]
[n0237:23479] [ 4] /global/home/users/subhayan/traceback_yambo.d/bin/yambo[0x54ac68]
[n0237:23479] [ 5] /global/home/users/subhayan/traceback_yambo.d/bin/yambo[0x421206]
[n0237:23479] [ 6] /global/home/users/subhayan/traceback_yambo.d/bin/yambo[0x414cd4]
[n0237:23479] [ 7] /global/home/users/subhayan/traceback_yambo.d/bin/yambo[0x41392e]
[n0237:23479] [ 8] /global/home/users/subhayan/traceback_yambo.d/bin/yambo[0x40bbe2]
[n0237:23479] [ 9] /lib64/libc.so.6(__libc_start_main+0xf5)[0x2b4d02605545]
[n0237:23479] [10] /global/home/users/subhayan/traceback_yambo.d/bin/yambo[0x40aa69]
[n0237:23479] *** End of error message ***


Best regards,
Subhayan

Re: ALDA with spin-polarized calculation

Posted: Thu Sep 24, 2020 3:52 pm
by Davide Sangalli
Dear Subhayan,
I finally had some time to look into the problem.

To fix the crash you experience after removing the barrier you need to do further changes in

Code: Select all

src/bse/K_driver.F
Replace the following line

Code: Select all

 use xc_functionals,ONLY:F_xc,XC_potential_driver
with

Code: Select all

 use xc_functionals,ONLY:F_xc,magn,XC_potential_driver
and replace these lines

Code: Select all

  if (BS_K_is_ALDA) then
   YAMBO_ALLOC(F_xc,(fft_size,n_spin,n_spin))
   call XC_potential_driver(Ken,Xk,WF_KIND,WF_xc_functional,2)
 endif
with

Code: Select all

 if (BS_K_is_ALDA) then
   YAMBO_ALLOC(F_xc,(fft_size,n_spin,n_spin))
   if(n_spin>1) then
     YAMBO_ALLOC(magn,(fft_size,3))
   endif
   call XC_potential_driver(Ken,Xk,WF_KIND,WF_xc_functional,2)
   if(n_spin>1) then
     YAMBO_FREE(magn)
   endif
 endif
Best,
D.