Yambo switching spin up and spin down for BSE

You can find here problems arising when using old releases of Yambo (< 5.0). Issues as parallelization strategy, performance issues and other technical aspects.

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

kli103
Posts: 15
Joined: Wed May 20, 2020 7:25 am
Location: University of California, Santa Cruz

Yambo switching spin up and spin down for BSE

Post by kli103 » Fri Jun 19, 2020 6:49 am

Dear developers,

I used qe 6.1.0 and yambo 4.4.0 to do GW+BSE@PBE0. When doing BSE calculation, I encountered the problem that BSE spectra differed a lot in the following two cases:

1. yambo reading ndb.QP for GW+BSE;
2. using scissor operator that is obtained by subtracting QP correction of VBM from QP correction of CBM, e.g., KfnQP_up_E = QPC(CBM_up) – QPC(VBM_up), KfnQP_dn_E = QPC(CBM_dn) – QPC(VBM_dn), where QPC stands for quasi-particle correction.

In looking for the possible issues that caused the problem, I found that yambo switched the spin up and spin down QP energies in BSE calculation from BSE report and BSE output.

For example, in terms of the triplet state system I am doing, from GW calculation output "o-all_Bz.qp" I get

Code: Select all

#    K-point      Band         Eo           E-Eo         Sc|Eo        Spin_Pol
      1.0000     145.0000      -3.8606       0.8036       2.2319       1.0000
      1.0000     145.0000      -3.7895       0.7925       2.2186      -1.0000
      1.0000     146.0000      -2.2941       1.1091       2.1889       1.0000
      1.0000     146.0000       2.4610       1.1303      -1.8933      -1.0000
      1.0000     147.0000      -2.0422       0.9186       1.7527       1.0000
      1.0000     147.0000       2.7222       1.5460      -2.2168      -1.0000
      1.0000     148.0000       2.0419       1.1566      -1.5933       1.0000
      1.0000     148.0000       3.0862       0.8122      -1.4614      -1.0000
where 148↑ is spin up CBM, 147↑ spin up VBM, 146↓ spin down CBM and 145↓ spin down VBM.

Code: Select all

Then KfnQP_up_E = 1.1566 - 0.9186 = 0.2380 eV and KfnQP_dn_E = 1.1303 - 0.7925 = 0.3378 eV. 
However, in case 1 where yambo read ndb.QP, BSE report "r-x_optics_bse_bsk_bss_rim_cut" shows

Code: Select all

[05.01] External/Internal QP corrections
========================================
...
  = FIT report for E<./all_Bz/ndb.QP[ E-E PPA E-E PPA: 27.21138 XG:  7591 Xb:    1  1000 Scb:    1  1000] =
  = First column (conduction), Second column (valence) =

  = Spin DN ============================================
   Gap correction (database) [ev]: 0.234857
               (FIT, actual) [ev]:  0.06039
   Energies 0th order        [ev]: 1.316240  1.020997
   Energies 1st order            : 0.881223  1.124789
                            Error:   0.0528    0.0071

  = Spin UP ============================================
   Gap correction (database) [ev]: 0.338145
               (FIT, actual) [ev]:  -0.0037
   Energies 0th order        [ev]: 1.164239  0.829788
   Energies 1st order            : 0.828994  1.561357
                            Error:  0.04216   0.05219
We can see that the gap correction for spin up and spin down are switched compared with the KfnQP_up_E and KfnQP_dn_E calculated above. And if looking at the BSE output file of spin up "o-x.-all_Bz-spin-up.data", we can find at line 57 and line 58,

Code: Select all

#    Eo [eV]      DeltaE [eV]
   -3.789545     0.792506
    2.460562     1.131596
These values are actually of VBM (145↓) and CBM (146↓) of spin down.

Please kindly take a look at this problem. Thank you.

Best regards,
Kejun
Kejun Li
PhD student,
Department of Physics,
University of California, Santa Cruz
E-mail: kli103@ucsc.edu

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

Re: Yambo switching spin up and spin down for BSE

Post by Daniele Varsano » Fri Jun 19, 2020 8:20 am

Dear Kejun,
thanks for reporting, we will have a look at this issue as soon as possible and 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/

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

Re: Yambo switching spin up and spin down for BSE

Post by Daniele Varsano » Fri Jun 19, 2020 8:26 am

Dear Kejun,
I just realized you are using the 4.4 release which is quite old.
Can you try to update to a newer release of Yambo and see if the problem persists. If so, we will check the problem in deep.
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/

kli103
Posts: 15
Joined: Wed May 20, 2020 7:25 am
Location: University of California, Santa Cruz

Re: Yambo switching spin up and spin down for BSE

Post by kli103 » Fri Jun 19, 2020 5:38 pm

Dear Daniele,

Yes. I will update yambo and try to do the same calculation again. I will let you know once I get results.

Best,
Kejun
Kejun Li
PhD student,
Department of Physics,
University of California, Santa Cruz
E-mail: kli103@ucsc.edu

kli103
Posts: 15
Joined: Wed May 20, 2020 7:25 am
Location: University of California, Santa Cruz

Re: Yambo switching spin up and spin down for BSE

Post by kli103 » Mon Jun 22, 2020 5:06 am

Dear Daniele,

I used yambo 4.5 to do GW+BSE@PBE0 by reading ndb.QP. The issue still exists. Please see the details in the following.

In the GW output,

Code: Select all

#    K-point      Band         Eo           E-Eo         Sc|Eo        Spin_Pol
      1.0000     145.0000      -3.8606       0.7765       2.2027       1.0000
      1.0000     145.0000      -3.7895       0.7651       2.1892      -1.0000
      1.0000     146.0000      -2.2941       1.1091       2.1915       1.0000
      1.0000     146.0000       2.4610       1.1204      -1.9043      -1.0000
      1.0000     147.0000      -2.0422       0.9188       1.7670       1.0000
      1.0000     147.0000       2.7222       1.5279      -2.2299      -1.0000
      1.0000     148.0000       2.0419       1.1453      -1.6057       1.0000
      1.0000     148.0000       3.0862       0.7972      -1.4774      -1.0000
so KfnQP_up_E = 1.1453 - 0.9188 = 0.2265 eV and KfnQP_dn_E = 1.1204 - 0.7651 = 0.3553 eV.

However, in the BSE report "r-y_optics_bse_bss_dipoles_rim_cut",

Code: Select all

  [05.01] External/Internal QP corrections
  ========================================
  ...
  = Spin DN ============================================
   Gap correction (database) [ev]: 0.224908
               (FIT, actual) [ev]:  0.01708
   Energies 0th order        [ev]: 1.264105  1.022116
   Energies 1st order            : 0.844842  1.137899
                            Error:   0.0982    0.0072

  = Spin UP ============================================
   Gap correction (database) [ev]: 0.355695
               (FIT, actual) [ev]: 0.152204
   Energies 0th order        [ev]: 1.306532  0.798633
   Energies 1st order            : 0.469601  1.524406
                            Error:  0.08890   0.04830
In the BSE output "o-y.-all_Bz-spin-up.data", at line 58 and 59,

Code: Select all

#    Eo [eV]      DeltaE [eV]
   -3.789545     0.765113
    2.460562     1.121890
The results from BSE report and output are reverse of those from GW.

Best,
Kejun
You do not have the required permissions to view the files attached to this post.
Kejun Li
PhD student,
Department of Physics,
University of California, Santa Cruz
E-mail: kli103@ucsc.edu

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

Re: Yambo switching spin up and spin down for BSE

Post by Daniele Varsano » Mon Jun 22, 2020 7:48 am

Dear Kejun,
thanks for reporting, we will inspect this soon.

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/

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

Re: Yambo switching spin up and spin down for BSE

Post by Davide Sangalli » Wed Jun 24, 2020 5:10 pm

Dear Kejun,
can you try the patch you find in this post for version 4.5 viewtopic.php?p=8565#p8565

For version 4.4 it is instead attached here.

Best,
D.
You do not have the required permissions to view the files attached to this post.
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/

kli103
Posts: 15
Joined: Wed May 20, 2020 7:25 am
Location: University of California, Santa Cruz

Re: Yambo switching spin up and spin down for BSE

Post by kli103 » Thu Jun 25, 2020 10:25 pm

Dear Davide,

Yes, I can try the patch. Could you tell me the reason of trying the patch?

Best,
Kejun
Kejun Li
PhD student,
Department of Physics,
University of California, Santa Cruz
E-mail: kli103@ucsc.edu

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

Re: Yambo switching spin up and spin down for BSE

Post by Daniele Varsano » Fri Jun 26, 2020 7:28 am

Dear Kejun,
the reason is that this could fix the problem, as there were some problems in spin-polarized calculations when reading the QP databases, which are solved applying this patch (see the thread indicated by Davide). If the problem still persists please let us know.

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/

kli103
Posts: 15
Joined: Wed May 20, 2020 7:25 am
Location: University of California, Santa Cruz

Re: Yambo switching spin up and spin down for BSE

Post by kli103 » Mon Jul 13, 2020 7:08 pm

Dear Daniele and Davide,

I modified yambo-4.4.0 codes and tested. The issue is still there. Spin up and spin down data switch. Corrected gap information in section [05.01] External/Internal QP corrections of BSE report is correct after code modification.

[K]Indirect Gaps [ev]: 4.317925 4.333777
[K] [spin up]: 4.317925 4.333777
[K] [spin dn]: 6.588544 6.822598
[K]Direct Gaps [ev]: 4.318357 4.338337
[K] [spin up]: 4.318357 4.338337
[K] [spin dn]: 6.588544 6.830115

The attached files contain diff between code before and after the modification.

I am testing yambo-4.5.0. I will tell result to you as soon as it is done.

Best,
Kejun
You do not have the required permissions to view the files attached to this post.
Kejun Li
PhD student,
Department of Physics,
University of California, Santa Cruz
E-mail: kli103@ucsc.edu

Locked