The phonons exported by epw cannot match the phonons exported by matdyn.

Post here questions linked with issue while running the EPW code

Moderator: stiwari

Post Reply
Yao Wei
Posts: 5
Joined: Sat Apr 29, 2023 8:40 pm
Affiliation: King's College London

The phonons exported by epw cannot match the phonons exported by matdyn.

Post by Yao Wei »

Dear there

Nowadays I would like to use epw to calculate the linewidth for phonon. I tried to calculate the material of In5Sb3.

I tried to use Quantum Espresso to plot the phonon first, the input files are attached

Code: Select all

! generated by QEtk 2023-06-08 07:37:20 UTC+8
&CONTROL
  title='Compound 2:bulk:(In 5)(Bi 3)2:tI(7):I4/mcm (140):primitive',
  calculation='scf', pseudo_dir='./', outdir='./',prefix='insb'
  tprnfor=.true., tstress=.true., forc_conv_thr=1.0d-15, etot_conv_thr = 1.0d-15,
/
&SYSTEM
  ibrav= 0, nat= 16, ntyp= 2,
  occupations = 'smearing', smearing='marzari-vanderbilt',degauss=0.05
  ecutwfc = 60, ecutrho = 360,
/
&ELECTRONS
  conv_thr = 1.0d-15
/
&IONS
/
ATOMIC_SPECIES
  In 114.818 In.pbe-dn-kjpaw_psl.1.0.0.UPF
  Sb 121.76 Sb.pbe-n-kjpaw_psl.1.0.0.UPF
CELL_PARAMETERS (angstrom)
  -4.1700000000  4.1700000000  6.1700000000
   4.1700000000 -4.1700000000  6.1700000000
   4.1700000000  4.1700000000 -6.1700000000
ATOMIC_POSITIONS (crystal)
In           -0.0000000000       -0.0000000000       -0.0000000000
Sb            0.2500000000        0.2500000000        0.0000000000
In            0.5000000000        0.5000000000        0.0000000000
Sb            0.7500000000        0.7500000000       -0.0000000000
In            0.1920107763        0.6920107763        0.2058426455
In            0.5138318692        1.0138318692        0.2058426455
Sb            0.8456999354        0.3456999354        0.1913998708
Sb            0.3456999354        0.1543000646        0.5000000000
In           -0.0138318692        0.1920107763        0.5000000000
In            0.3079892237        0.5138318692        0.5000000000
In            0.6920107763        0.4861681308        0.5000000000
In            1.0138318692        0.8079892237        0.5000000000
Sb            0.6543000646        0.8456999354        0.5000000000
Sb            0.1543000646        0.6543000646        0.8086001292
In            0.4861681308       -0.0138318692        0.7941573545
In            0.8079892237        0.3079892237        0.7941573545
K_POINTS {automatic}
  6 6 6 0 0 0

Code: Select all

Phonon
&inputph
tr2_ph=1.0d-22,
prefix='insb',
amass(1)=114.818,
amass(2)=121.76,
outdir='./'
fildvscf='dvscf',
fildyn='insb.dyn.xml',
trans=.true.,
ldisp=.true.,
nq1=2,nq2=2,nq3=2
alpha_mix(1)=0.2
/
This is the phonon dispersion from matdyn
This is the phonon dispersion from matdyn
matdyn.png (28.17 KiB) Viewed 24343 times
Then, the EPW input file is

Code: Select all

epw 
&inputepw
  prefix      = 'insb'
  amass(1)    = 114.818
  amass(2)    = 121.76
  outdir      = './'
  dvscf_dir   = './save'

  ep_coupling = .true.
  elph        = .true.
  epbwrite    = .true.
  epbread     = .false.

!  nest_fn     = .true.

  epwwrite = .true.
  epwread  = .false.
  etf_mem     = 1

  efermi_read = .true.
  fermi_energy = 9.0178

  wannierize  = .true.
  nbndsub     =  64
  num_iter    =  200
  dis_froz_max=  11.0
  dis_froz_min=  0.00
  bands_skipped='exclude_bands=1-5'
 

  proj(1)     = 'In:s,p'
  proj(2)     = 'Sb:s,p'

  wdata(1) = 'bands_plot = .true.'
  wdata(2) = 'begin kpoint_path'
  wdata(3) = 'G 0.00 0.00 0.00  X 0.00 0.00 0.50'
  wdata(4) = 'X 0.00 0.00 0.50  P 0.25 0.25 0.25'
  wdata(5) = 'P 0.25 0.25 0.25  N 0.00 0.50 0.00'
  wdata(6) = 'end kpoint_path'
  wdata(7) = 'bands_plot_format = gnuplot'

  elecselfen  = .false.
  phonselfen  = .true.
  a2f         = .false.

  fsthick     = 0.8  ! eV
  degaussw    = 0.2 ! eV

  degaussq     = 0.5 ! meV
 
 
  nk1         = 4
  nk2         = 4
  nk3         = 4

  nq1         = 2
  nq2         = 2
  nq3         = 2

  nkf1 = 4
  nkf2 = 4
  nkf3 = 4

  dvscf_dir   = './save'
!  filukk      = './insb.ukk'
  filqf       = 'path.dat'
 /
In order to make sure the correct of winner, I compared the DFT electronic band with wannier output insb_band.dat(from epw)
wannier.png
wannier.png (29.14 KiB) Viewed 24343 times
It shows the electronic bands fit very well

However, when I make the path.dat according to the 'insb_band.kpt' and then run EPW to get the 'linewidth.phself.300.000K'
epw_phonon.png
epw_phonon.png (40.73 KiB) Viewed 24343 times
The phonon shape could not fit the one from matdyn

Could someone give me some suggestions, Thanks

Yao

stiwari
Posts: 29
Joined: Mon Jun 26, 2023 9:48 pm
Affiliation: UT Austin

Re: The phonons exported by epw cannot match the phonons exported by matdyn.

Post by stiwari »

Hi Yao,

Your coarse q-grid seems a bit too coarse (2 2 2). Can you increase the coarse q-grid and see if the mismatch persists?
Also, share your .wout and epw.out files in case this problem persists.

Best regards,
Sabya.

Yao Wei
Posts: 5
Joined: Sat Apr 29, 2023 8:40 pm
Affiliation: King's College London

Re: The phonons exported by epw cannot match the phonons exported by matdyn.

Post by Yao Wei »

Hi Sabya

Thanks for your reply, may I ask what q-grid I need increase? both ph.in (nq1=2,nq2=2,nq3=2) and nq1 nq2 nq3 in epw.in?

Best

Yao

stiwari
Posts: 29
Joined: Mon Jun 26, 2023 9:48 pm
Affiliation: UT Austin

Re: The phonons exported by epw cannot match the phonons exported by matdyn.

Post by stiwari »

Hi Yao,

Yes, you need to increase the both (nq1,nq2,nq3 for epw.in should be the same as ph.in).

Best,
Sabya.

Yao Wei
Posts: 5
Joined: Sat Apr 29, 2023 8:40 pm
Affiliation: King's College London

Re: The phonons exported by epw cannot match the phonons exported by matdyn.

Post by Yao Wei »

Hi Sabya

Thanks for your reply,

Now I am doing the precise calculation, I try to add SOC in this calculation
And I set the SOC parameter in scf.in

Code: Select all

  noncolin=.true.,lspinorb=.true.
Also changed the epw input file as below

Code: Select all

epw
&inputepw
  prefix      = 'insb'
  amass(1)    = 114.818
  amass(2)    = 121.76
  outdir      = './'
  dvscf_dir   = './save'

  ep_coupling = .true.
  elph        = .true.
  epbwrite    = .true.
  epbread     = .false.

!  nest_fn     = .true.

  epwwrite = .true.
  epwread  = .false.
  etf_mem     = 1

  efermi_read = .true.
  fermi_energy = 9.0190

  wannierize  = .true.
  nbndsub     =  128
  num_iter    =  200
  dis_win_max =  20
  dis_froz_max=  15
  dis_froz_min=  2
  dis_win_min =  2


  proj(1)     = 'In:s,p'
  proj(2)     = 'Sb:s,p'

  wdata(1) = 'bands_plot = .true.'
  wdata(2) = 'begin kpoint_path'
  wdata(3) = 'G 0.00 0.00 0.00  X 0.00 0.00 0.50'
  wdata(4) = 'X 0.00 0.00 0.50  P 0.25 0.25 0.25'
  wdata(5) = 'P 0.25 0.25 0.25  N 0.00 0.50 0.00'
  wdata(6) = 'end kpoint_path'
  wdata(7) = 'bands_plot_format = gnuplot'

  elecselfen  = .false.
  phonselfen  = .true.
  a2f         = .false.

  fsthick     = 0.8  ! eV
  degaussw    = 0.2 ! eV

  degaussq     = 0.5 ! meV
 
 
  nk1         = 6
  nk2         = 6
  nk3         = 6

  nq1         = 3
  nq2         = 3
  nq3         = 3

  nkf1 = 6
  nkf2 = 6
  nkf3 = 6

  dvscf_dir   = './save'
!  filukk      = './insb.ukk'
  filqf       = 'path.dat'
 /
However, when the epw solves the irreducible q-point, it is too slow, I used 864 CPU on a very quick machine(Archer2), and it could just solve the irreducible 3 q-point in 48 hours. I wonder if there is any problem of my input file?

Code: Select all

     Calculating kgmap

     Progress kgmap: ########################################
     kmaps        :      0.74s CPU      1.06s WALL (       1 calls)
     Symmetries of Bravais lattice:  16
     Symmetries of crystal:          16


     ===================================================================
     irreducible q point #    1
     ===================================================================

     Symmetries of small group of q: 16
          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
     Imposing acoustic sum rule on the dynamical matrix

        q(    1 ) = (   0.0000000   0.0000000   0.0000000 )


     ===================================================================
     irreducible q point #    2
     ===================================================================

     Symmetries of small group of q:  4

     Number of q in the star =    4
     List of q in the star:
          1   0.341128210   0.341128210  -0.000000000
          2   0.341128210  -0.341128210  -0.000000000
          3  -0.341128210   0.341128210   0.000000000
          4  -0.341128210  -0.341128210  -0.000000000

        q(    2 ) = (   0.3411282   0.3411282  -0.0000000 )
        q(    3 ) = (   0.3411282  -0.3411282  -0.0000000 )
        q(    4 ) = (  -0.3411282   0.3411282   0.0000000 )
        q(    5 ) = (  -0.3411282  -0.3411282   0.0000000 )


     ===================================================================
     irreducible q point #    3
     ===================================================================

     Symmetries of small group of q:  2

     Number of q in the star =    8
     List of q in the star:
          1   0.341128210   0.000000000   0.230551805
          2   0.000000000   0.341128210   0.230551805
          3   0.000000000   0.341128210  -0.230551805
          4  -0.000000000  -0.341128210   0.230551805
          5   0.341128210   0.000000000  -0.230551805
          6  -0.341128210  -0.000000000  -0.230551805
          7  -0.341128210  -0.000000000   0.230551805
          8  -0.000000000  -0.341128210  -0.230551805

        q(    6 ) = (   0.3411282   0.0000000   0.2305518 )
        q(    7 ) = (   0.0000000   0.3411282   0.2305518 )
        q(    8 ) = (   0.0000000   0.3411282  -0.2305518 )
        q(    9 ) = (  -0.0000000  -0.3411282   0.2305518 )
        q(   10 ) = (   0.3411282   0.0000000  -0.2305518 )
        q(   11 ) = (  -0.3411282  -0.0000000  -0.2305518 )
        q(   12 ) = (  -0.3411282  -0.0000000   0.2305518 )  

stiwari
Posts: 29
Joined: Mon Jun 26, 2023 9:48 pm
Affiliation: UT Austin

Re: The phonons exported by epw cannot match the phonons exported by matdyn.

Post by stiwari »

Hi Yao,

Indeed, that is quite long but what I can see in your input is that you are using 128 bands. That is quite a lot!.

Also, keep in mind that epw is only parallelized over the k-points. Therefore, since you have very few k-points (ignoring symmetries: 216) most of the processors are probably not doing anything.

I would suggest that you run epw for long time without using so many cores. Otherwise, if those many number of bands are not needed, try to reduce the number of bands.

Best,
Sabya.

Post Reply