ALDA with spin-polarized calculation

Deals with issues related to computation of optical spectra, solving the Bethe-Salpeter equation.

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

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

ALDA with spin-polarized calculation

Post by subhayan » Sun Dec 22, 2019 1:16 am

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
Subhayan Roychoudhury
Postdoctoral researcher
Lawrence Berkeley National Laboratory

User avatar
Davide Sangalli
Posts: 610
Joined: Tue May 29, 2012 4:49 pm
Location: Via Salaria Km 29.3, CP 10, 00016, Monterotondo Stazione, Italy
Contact:

Re: ALDA with spin-polarized calculation

Post by Davide Sangalli » Tue Dec 24, 2019 12:14 am

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.
Davide Sangalli, PhD
CNR-ISM, Division of Ultrafast Processes in Materials (FLASHit) and MaX Centre
https://sites.google.com/view/davidesangalli
http://www.max-centre.eu/

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

Re: ALDA with spin-polarized calculation

Post by subhayan » Wed Dec 25, 2019 10:22 am

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
Subhayan Roychoudhury
Postdoctoral researcher
Lawrence Berkeley National Laboratory

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

Re: ALDA with spin-polarized calculation

Post by subhayan » Thu Dec 26, 2019 10:42 am

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
Subhayan Roychoudhury
Postdoctoral researcher
Lawrence Berkeley National Laboratory

User avatar
Davide Sangalli
Posts: 610
Joined: Tue May 29, 2012 4:49 pm
Location: Via Salaria Km 29.3, CP 10, 00016, Monterotondo Stazione, Italy
Contact:

Re: ALDA with spin-polarized calculation

Post by Davide Sangalli » Thu Sep 24, 2020 3:52 pm

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.
Davide Sangalli, PhD
CNR-ISM, Division of Ultrafast Processes in Materials (FLASHit) and MaX Centre
https://sites.google.com/view/davidesangalli
http://www.max-centre.eu/

Post Reply