apparent inconsistency of p2y for spin polarized system

Come here to discuss issues with using the p2y converter from PWscf to Yambo, how to best run PWscf , link with the IOTK library, and so on.

Moderators: andrea.ferretti, Conor Hogan

Forum rules
Before posting, make sure to first read carefully all the detailed steps and suggestions given in the main documentation:
https://www.yambo-code.eu/learn/#learn-forum
Post Reply
g.zollo
Posts: 8
Joined: Thu Sep 19, 2019 11:04 am

apparent inconsistency of p2y for spin polarized system

Post by g.zollo » Sun Aug 14, 2022 5:19 pm

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

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

Re: apparent inconsistency of p2y for spin polarized system

Post by Daniele Varsano » Tue Aug 16, 2022 10:00 am

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
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: 610
Joined: Tue May 29, 2012 4:49 pm
Location: Via Salaria Km 29.3, CP 10, 00016, Monterotondo Stazione, Italy
Contact:

Re: apparent inconsistency of p2y for spin polarized system

Post by Davide Sangalli » Wed Aug 17, 2022 8:52 am

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.
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/

g.zollo
Posts: 8
Joined: Thu Sep 19, 2019 11:04 am

Re: apparent inconsistency of p2y for spin polarized system

Post by g.zollo » Wed Aug 17, 2022 3:45 pm

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

Post Reply