Page 1 of 1

apparent inconsistency of p2y for spin polarized system

Posted: Sun Aug 14, 2022 5:19 pm
by g.zollo
Dear All,
I'm using PWSCF v.7.0 and YAMBO 5.1.1.
In a spin polarized system (a graphene nanoribbon) I experience an inconsistent r_setup building after p2y and yambo.
I attach the nscf input and output and the r_setup.
In the r_setup you can see that the spin down has wrong bandwidths. Moreover I wander why the electronic temperature is different from the one in the scf/nscf calculations.
Do you think this might affect the calculation (I'm getting strange behavior on the GW calculation of the system, either crushes or hangs)?
Thank you for your indications.
Giuseppe

Re: apparent inconsistency of p2y for spin polarized system

Posted: Tue Aug 16, 2022 10:00 am
by Daniele Varsano
Dear Giuseppe,

Thanks for reporting.

Yambo and QE smearing are different because yambo adopts a Fermi-Dirac distribution with a default value of 300K.
Anyway, this should be harmless when fractional occupations are not present. Now, at a first inspection, I can't see fractional occupation in the qe calculation, while
a very small fraction is present in the yambo setup.

I suggest you repeat the yambo setup by setting the electronic temperature to zero by using "ElecTemp=0 eV" in the setup input file.

About the bandwidth in spin-down channel, there is surely a problem, as well as for the indirect gap, we will check what is happening there, again I think that should not affect the calculation. I suggest you carefully inspect the energy levels obtained by nscf and the ones reported by Yambo (compare the ones obtained at 0K), in order to compare them you will need to apply a rigid shift. I did a rapid check looking at the direct and indirect gap and it seems reasonable.

In brief, the calculation should be correct once energies and occupation are correct, what kind of problem you are experiencing in GW? If you post input/report/log files we will have a look.

Can you report if the bandwidth and indirect gap values in the report are still wrong after the setup is done at 0K?

Best,
Daniele

Re: apparent inconsistency of p2y for spin polarized system

Posted: Wed Aug 17, 2022 8:52 am
by Davide Sangalli
Dear Giuseppe,
the wrong message about the indirect gap and the band width is just a "printing error" in the report file.

Below the patch. It will enter in yambo 5.1.2

Code: Select all

diff --git a/src/common/OCCUPATIONS_Gaps.F b/src/common/OCCUPATIONS_Gaps.F
index 5d1762e3a..21659ecb0 100644
--- a/src/common/OCCUPATIONS_Gaps.F
+++ b/src/common/OCCUPATIONS_Gaps.F
@@ -24,7 +24,7 @@
 subroutine OCCUPATIONS_Gaps(E,E_g_dir,E_g_ind,Nbf,Nbm,I_dir,E_k_dir,E_k_ind)
  !
  use pars,          ONLY:SP
- use electrons,     ONLY:levels,n_sp_pol,n_spin,filled_tresh,spin_occ
+ use electrons,     ONLY:levels,n_sp_pol,filled_tresh,spin_occ
  !
  implicit none
  !
@@ -134,14 +134,15 @@ subroutine OCCUPATIONS_Gaps(E,E_g_dir,E_g_ind,Nbf,Nbm,I_dir,E_k_dir,E_k_ind)
    do i_sp_pol=1,n_sp_pol
      !
      if (Nbf_(i_sp_pol)/=Nbm_(i_sp_pol)) cycle
-     E_g_ind_(i_sp_pol,1)=E_cb_min(i_sp_pol)-E_vb_max(i_sp_pol) 
-     E_g_ind_(i_sp_pol,2)=E_vb_max(i_sp_pol)-E_vb_min(i_sp_pol)
-     E_g_ind_(i_sp_pol,3)=E_cb_max(i_sp_pol)-E_cb_min(i_sp_pol)
+     E_g_ind_(i_sp_pol+1,1)=E_cb_min(i_sp_pol)-E_vb_max(i_sp_pol)
+     E_g_ind_(i_sp_pol+1,2)=E_vb_max(i_sp_pol)-E_vb_min(i_sp_pol)
+     E_g_ind_(i_sp_pol+1,3)=E_cb_max(i_sp_pol)-E_cb_min(i_sp_pol)
      !
    enddo
  endif
  !
- E%E_ind_gap(1:n_sp_pol) =E_g_ind_(1:n_sp_pol,1)
+ if(n_sp_pol==1) E%E_ind_gap(1)  =E_g_ind_(1,1)
+ if(n_sp_pol==2) E%E_ind_gap(1:2)=E_g_ind_(2:3,1)
  ! 
  ! [2] Direct Gaps (min/max)
  !
Best,
D.

Re: apparent inconsistency of p2y for spin polarized system

Posted: Wed Aug 17, 2022 3:45 pm
by g.zollo
Dear Daniele and Davide,
thank you for your reply.
Then there should be another issue related to the crashes I experience.
I'll check again and eventually report to you.
Thank you again
Giuseppe