Page 1 of 2

SOC removes LO-TO splitting in GaN

Posted: Thu Dec 07, 2017 1:31 am
by Vahid
Dear EPW Users,

Similar to an earlier post (viewtopic.php?f=6&t=354&p=1288&hilit=soc#p1288), when SOC is used with GaN, the LO-TO splitting appears to vanish.

I used the GaN test case (with epsil=true and lpolar=true) and added SOC tags (lspinorb and noncolin) to all the scf and nscf files. I used fully relativistic PSPs Ga.rel-pz-n-nc.UPF and N.rel-pz-nc.UPF.

To ensure that EPW (version 4.1) reads the dielectric tensor, I added the following write statements in io_dynmat2.f90

Code: Select all

   WRITE(*,*) "epsil=", epsil
   WRITE(*,*) "zstareu(:,:,:)=", zstareu(:,:,:)
   ENDIF
   RETURN
   END SUBROUTINE read_dyn_mat_header


In the output, I get the correct epsilon and zstareu. This shows that EPW reads the dyn.xml files correctly.

Then I added the following write statements in the dynwan2bloch.f90 to see what epsi and zstar values enter the rgd_blk subroutine:

Code: Select all

  IF (lpolar) THEN
    ! xq has to be in 2pi/a
    IF (mpime.eq.ionode_id) THEN   
    WRITE(*,*) "epsi=",epsi
    WRITE(*,*) "zstar=",zstar
    ENDIF
    CALL rgd_blk (nq1,nq2,nq3,nat,chf,xq,tau,epsi,zstar,+1.d0)
    !
  ENDIF


In the output, for all q values in the list, the epsi and zstar matrices are all zero.

I may be missing something here but it seems that when using SOC (xml extension for .dyn files), the dielectric matrix and charges are read correctly but not broadcast.

Thank you,

Vahid

Vahid Askarpour
Department of Physics and Atmospheric Science
Dalhousie University,
Halifax, NS, Canada

Re: SOC removes LO-TO splitting in GaN

Posted: Thu Dec 07, 2017 9:59 am
by carla.verdi
Dear Vahid,

I double checked and they seem to be broadcasted correctly (it's in elphon_shuffle_wrap, and later in ephwann_shuffle).
Could you please print also the value of 'lrigid' as passed in readmat_shiffle2? It's a logical variable set to T if the info on dielectric constant / effective charges are read in read_dyn_mat_header. If that's T, then these matrices are stored in zstar, epsi in readmat_shuffle2.f90. Similarly, could you print zstar, epsi within readmat_shuffle2?

Thanks
Carla

Re: SOC removes LO-TO splitting in GaN

Posted: Thu Dec 07, 2017 12:58 pm
by Vahid
Dear Carla,

For the Gamma q-point, I get lrigid=T and correct epsi and zstar values. For the other 3 q-points, I get lrigid=F and epsi and zstar are zero.

I printed these values in the following part of readmat_shuffle2.f90:

Code: Select all

    WRITE(*,*) "lrigid=",lrigid
    WRITE(*,*) "epsi=", epsi
    WRITE(*,*) "zstar=", zstar
    IF (lrigid) THEN


Thanks,

Vahid

Re: SOC removes LO-TO splitting in GaN

Posted: Fri Dec 08, 2017 8:56 am
by Vahid
Dear Carla,

I managed to restore the LO-TO splitting by commenting out the following lines in io_dyn_mat2:

Code: Select all

        !  ELSE
        !  IF (PRESENT(epsil)) epsil=0.0_DP
        !     IF (PRESENT(zstareu)) zstareu=0.0_DP
        !     IF (PRESENT(ramtns))  ramtns=0.0_DP
          ENDIF
       ENDIF
    ENDIF
    RETURN
    END SUBROUTINE read_dyn_mat_header


However, because lrigid=T for the first q-point only, the other q-points do not go through this part of the readmat_shuffle2:

Code: Select all

   IF (lrigid) THEN
       WRITE (6,'(8x,a)') 'Read dielectric tensor and effective charges'
       !ASR on effective charges
        DO i=1,3
           DO j=1,3
              sumz=0.0d0
              DO na=1,nat
                 sumz = sumz + zstar(i,j,na)
              ENDDO
              DO na=1,nat
                 zstar(i,j,na) = zstar(i,j,na) - sumz/nat
              ENDDO
           ENDDO
        ENDDO
    ENDIF


Once I get lrigid=T for all the q-points, I think the issue is resolved.

Best,

Vahid

Re: SOC removes LO-TO splitting in GaN

Posted: Fri Dec 08, 2017 9:04 am
by carla.verdi
I see, when I looked I didn't think that was a problem because zstar, epsi are global arrays and are not put to zero again after being read for the first q (gamma) but clearly there was a bug! Thanks, we will fix this in the trunk.

Best,
Carla

Re: SOC removes LO-TO splitting in GaN

Posted: Mon Dec 11, 2017 4:24 pm
by sponce
Dear Vahid,

The implementation looks correct to me.

In the case of SOC, the first q-point should be \Gamma and have

lrigid = .true.
zstar_ = finite value
epsi_ = finite value
zstar = finite value
epsi = finite value.

Now, in the case of other q-point, you should have

lrigid = .false.
zstar_ = 0
epsi_ = 0
zstar = finite value
epsi = finite value.

Because zstar and epsi are not re-written, they should still contain the values obtained from \Gamma.

PS: Make sure to use the latest EPW from QE 6.2. Could you try printing the 5 above quantities and told us what you get ?
Thanks

Best,
Samuel

Re: SOC removes LO-TO splitting in GaN

Posted: Mon Dec 11, 2017 6:05 pm
by Vahid
Dear Samuel,

I was using QE-6.0. Since I had made many changes to the code, I was hoping to debug that version. However, I am in the process of installing qe-6.2 and may have to redo all the phonon calculations. I will try 6.2 version and let you know what I get.

Thanks,

Vahid

Re: SOC removes LO-TO splitting in GaN

Posted: Mon Dec 11, 2017 10:48 pm
by Vahid
Dear Samuel,

I successfully installed qe-6.2 and redid all the phonon, scf, and nscf calculations with the new module.

For the first q-point, I get lrigid=T and finite epsi, epsi_, zstar and zstar_ as below:

Code: Select all

     Reading interatomic force constants
  IFC last  -1.724147163949322E-003
  Imposed simple ASR
     Finished reading ifcs
  IFC   0.571022823490833      -1.724147163949322E-003
     Symmetries of bravais lattice:  24
     Symmetries of crystal:          12
     ===================================================================
     irreducible q point #    1
     ===================================================================
     Symmetries of small group of q: 12
          in addition sym. q -> -q+G:
     Number of q in the star =    1
     List of q in the star:
          1   0.000000000   0.000000000   0.000000000
 lrigid= T
 epsi_=   5.11840665057653       1.332267629550188E-015  0.000000000000000E+000
  0.000000000000000E+000   5.11840665057594       1.638402241680176E-018
  0.000000000000000E+000 -8.192011208400879E-019   5.22614916364484     

 zstar_=   2.64425871368051       1.110223024625157E-016  0.000000000000000E+000
  2.775557561562891E-017   2.64425871368055       1.228801681260132E-018
 -1.418897962912504E-018 -9.011212329240969E-018   2.76558298757655     
  -2.65141561513640       8.881784197001252E-016 -1.418897962912504E-018
  8.881784197001252E-016  -2.65141561513531      -9.011212329240968E-018
  1.064173472184378E-018  1.024001401050110E-018  -2.76566632193173     
   2.64425871368051      -5.551115123125783E-017  0.000000000000000E+000
 -5.551115123125783E-017   2.64425871368055       8.192011208400879E-019
  0.000000000000000E+000 -1.638402241680176E-018   2.76558298757655     
  -2.65141561513640       8.881784197001252E-016  0.000000000000000E+000
  8.881784197001252E-016  -2.65141561513531      -6.553608966720703E-018
  2.837795925825008E-018 -8.192011208400883E-019  -2.76566632193173     
        Read dielectric tensor and effective charges
 epsi=   5.11840665057653       1.332267629550188E-015  0.000000000000000E+000
  0.000000000000000E+000   5.11840665057594       1.638402241680176E-018
  0.000000000000000E+000 -8.192011208400879E-019   5.22614916364484     

 zstar=   2.64425871368051       1.110223024625157E-016  0.000000000000000E+000
  2.775557561562891E-017   2.64425871368055       1.228801681260132E-018
 -1.418897962912504E-018 -9.011212329240969E-018   2.76558298757655     
  -2.65141561513640       8.881784197001252E-016 -1.418897962912504E-018
  8.881784197001252E-016  -2.65141561513531      -9.011212329240968E-018
  1.064173472184378E-018  1.024001401050110E-018  -2.76566632193173     
   2.64425871368051      -5.551115123125783E-017  0.000000000000000E+000
 -5.551115123125783E-017   2.64425871368055       8.192011208400879E-019
  0.000000000000000E+000 -1.638402241680176E-018   2.76558298757655     
  -2.65141561513640       8.881784197001252E-016  0.000000000000000E+000
  8.881784197001252E-016  -2.65141561513531      -6.553608966720703E-018
  2.837795925825008E-018 -8.192011208400883E-019  -2.76566632193173     
        Imposing acoustic sum rule on the dynamical matrix
  Dyn mat calculated from ifcs
     Frequencies of the matrix for the current q in the star
    -0.00001     0.00001     0.00001    93.79061    93.79061   379.23722
   705.32159   727.15966   727.15966   743.47383   743.47383   835.33459
        q(    1 ) = (   0.0000000   0.0000000   0.0000000 )


However, for the second q-point, I get the following error:

Code: Select all

     ===================================================================
     irreducible q point #    2
     ===================================================================
     Symmetries of small group of q: 12
          in addition sym. q -> -q+G:
     Number of q in the star =    1
     List of q in the star:
          1   0.000000000   0.000000000  -0.306727120
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     Error in routine readmat_shuffle2 (1):
     You set lpolar = .true. but did not put epsil = true in the PH calculation at Gamma.
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     stopping ...


Looking at the readmat_shuffle2.f90, the error comes from the following line:

Code: Select all

IF (lpolar .and. .not. lrigid) CALL errore('readmat_shuffle2', &
       &'You set lpolar = .true. but did not put epsil = true in the PH calculation at Gamma. ',1)
    ! These 3 lines are the only additions I made to qe-6.2
    WRITE(*,*) "lrigid=",lrigid
    WRITE(*,*) "epsi_=", epsi_
    WRITE(*,*) "zstar_=", zstar_
    IF (lrigid) THEN


Since I have set lpolar=.true. in my epw.in and epsil=.true. in ph.in, the error arises because lrigid=F (as you mentioned) and .not. lrigid=T for the second q-point.

Best,

Vahid

Re: SOC removes LO-TO splitting in GaN

Posted: Wed Dec 13, 2017 11:55 am
by sponce
Dear Vahid,

Oh, off course. I meant "can you download the latest QE version". The latest version is 6.2.1 and not 6.2.

In the latest version, the code should be as follow:

Code: Select all

      IF ( abs(q(1,iq)).lt.eps .and. abs(q(2,iq)).lt.eps .and. abs(q(3,iq)).lt.eps ) THEN
        WRITE(6,'(8x,a)') 'Imposing acoustic sum rule on the dynamical matrix'
        IF (lpolar .and. .not. lrigid) CALL errore('readmat_shuffle2', &
          &'You set lpolar = .true. but did not put epsil = true in the PH calculation at Gamma. ',1)
      ENDIF


PS: You do not have to redo the phonon and stuff I think. Just re-run EPW with 6.2.1.

Best,
Samuel

Re: SOC removes LO-TO splitting in GaN

Posted: Wed Dec 13, 2017 6:32 pm
by Vahid
Dear Samuel,

I printed lrigid, epsi_, and zstar_ before the IF (lrigid) section and lrigid, epsi, and zstar after the IF (lrigid) section of the readmat_shuffle2.f90.

For the first q, lrigid is T and the other parameters are finite.

For other q-points, lrigid is F, epsi_ and zstar_ are zero and epsi and zstar are finite.

It seems that I need to inevitably migrate my changes to the latest version.

Thanks for your help,

Vahid