e-ph matrix calculation for certain q-point and k-point mesh

Post here questions linked with issue while running the EPW code

Moderator: stiwari

Post Reply
dongws

e-ph matrix calculation for certain q-point and k-point mesh

Post by dongws »

Dear EPW developers,

Is it possible to calculate e-ph interaction coefficients <k+q|delta_V|k> only for certain k-point value, and a user-defined q-point mesh (not the entire BZ)?
I tried to use the parameters "filkf" and "filkq", but encountered two problems:
1. If I do not specify nkf and nqf, even if I use filkf and filkq, the code will run into the problem of "integer divided by zero".
2. I then specified nkf and nqf to 1 1 1, then I run into "k+q does not fall on k-grid".
So I am wondering if there is a way to do e-ph calculation for certain q-point and k-point mesh with the EPW code right now?

Thanks very much!
sponce
Site Admin
Posts: 616
Joined: Wed Jan 13, 2016 7:25 pm
Affiliation: EPFL

Re: e-ph matrix calculation for certain q-point and k-point

Post by sponce »

Dear dongws,

For the two coarse meshes (nk and nq) you have to provide homogeneous meshes. For the q-grid you can use IBZ.

For the two fine meshes you can use homogeneous meshes (nkf and nqf) or arbitrary meshes ("filkf" and "filkq").

So if you are talking about fine meshes, yes you can define any k or q-points (arbitrary ones).
The code should not give "integer divided by zero". Please give more detail on that (input files etc).

Best,

Samuel
Prof. Samuel Poncé
Chercheur qualifié F.R.S.-FNRS / Professeur UCLouvain
Institute of Condensed Matter and Nanosciences
UCLouvain, Belgium
Web: https://www.samuelponce.com
dongws

Re: e-ph matrix calculation for certain q-point and k-point

Post by dongws »

Dear Samuel,

Thank you for your reply! Here is the input file that uses "filkf" and "filkq", without setting nkf and nqf:

Code: Select all

--
&inputepw
  prefix      = 'gr'
  amass(1)    = 12
  outdir      = './'

  elph        = .true.
  epbwrite    = .true.
  epbread     = .false.
  epwwrite    = .true. !the electron-phonon matrix elements in the coarse Wannier representation and relevant data (dyn matrices) are written to disk.
  epwread     = .false.
  efermi_read = .true.
  fermi_energy = -0.600986
  etf_mem     = .false. !If .false., matrix elements are written to disk and read directly when needed.

  wannierize  = .true.
  nbndsub     =  2
  nbndskip    =  0
  dis_froz_max     =    2.600  ! Top of the inner (frozen) energy window
  dis_froz_min     =   -3.687  ! Bottom of the inner (frozen) energy window
  dis_win_max      =   17.022  ! Top of the outer energy window
  dis_win_min      =  -20.209  ! Bottom of the outer energy window
  proj(1)     = 'C:pz'
  wdata(1)    = 'num_bands : 12'
  wdata(2)    = 'wannier_plot : true'
  wdata(3)    = 'hr_plot : true'
  wdata(4)    = 'dis_num_iter = 2000'
  write_wfn   = .true. ! output UNK files

  ephwrite    = .true. !Writes 4 files that are required when solving the Eliashberg equations. .ephmat files with e-ph matrix elements within the Fermi window (fsthick) on fine k and q meshes on the disk. .ephmat are pool dependent files. .freq file contains the phonon frequencies; .egnv file contains the eigenvalues within the Fermi window, and .ikmap file contains the index of the k-point on the irreducible grid within the Fermi window.

  dvscf_dir   = '../ph/save'

  filkf       = 'mesh.dat'
  filqf       = 'mesh.dat'

  nk1         = 12
  nk2         = 12
  nk3         = 1

  nq1         = 12
  nq2         = 12
  nq3         = 1

!  mp_mesh_k   = .true.
!  nkf1        = 1
!  nkf2        = 1
!  nkf3        = 1

!  nqf1        = 1
!  nqf2        = 1
!  nqf3        = 1
 /
  19 cartesian
   0.000000000000000E+00   0.000000000000000E+00   0.000000000000000E+00  0.053
   0.000000000000000E+00   0.962250448808160E-01   0.000000000000000E+00  0.053
   0.000000000000000E+00   0.192450089761632E+00   0.000000000000000E+00  0.053
   0.000000000000000E+00   0.288675134642448E+00   0.000000000000000E+00  0.053
   0.000000000000000E+00   0.384900179523264E+00   0.000000000000000E+00  0.053
   0.000000000000000E+00   0.481125224404080E+00   0.000000000000000E+00  0.053
   0.000000000000000E+00   0.577350269284896E+00   0.000000000000000E+00  0.053
   0.833333333333333E-01   0.144337567301446E+00   0.000000000000000E+00  0.053
   0.833333333333333E-01   0.240562612182262E+00   0.000000000000000E+00  0.053
   0.833333333333333E-01   0.336787657063078E+00   0.000000000000000E+00  0.053
   0.833333333333333E-01   0.433012701943894E+00   0.000000000000000E+00  0.053
   0.833333333333333E-01   0.529237746824710E+00   0.000000000000000E+00  0.053
   0.166666666666667E+00   0.288675134602892E+00   0.000000000000000E+00  0.053
   0.166666666666667E+00   0.384900179483708E+00   0.000000000000000E+00  0.053
   0.166666666666667E+00   0.481125224364524E+00   0.000000000000000E+00  0.053
   0.166666666666667E+00   0.577350269245340E+00   0.000000000000000E+00  0.053
   0.250000000000000E+00   0.433012701904338E+00   0.000000000000000E+00  0.053
   0.250000000000000E+00   0.529237746785154E+00   0.000000000000000E+00  0.053
   0.333333333333333E+00   0.577350269205784E+00   0.000000000000000E+00  0.053

And output file:

Code: Select all

                                       ``:oss/                                        
                           `.+s+.     .+ys--yh+     `./ss+.                           
                          -sh//yy+`   +yy   +yy    -+h+-oyy                           
                          -yh- .oyy/.-sh.   .syo-.:sy-  /yh                           
                 `.-.`    `yh+   -oyyyo.     `/syys:    oys      `.`                 
               `/+ssys+-` `sh+      `                   oys`   .:osyo`               
               -yh- ./syyooyo`                          .sys+/oyo--yh/               
               `yy+    .-:-.                             `-/+/:`  -sh-               
                /yh.                                              oys                 
          ``..---hho---------`   .---------..`      `.-----.`    -hd+---.             
       `./osmNMMMMMMMMMMMMMMMs. +NNMMMMMMMMNNmh+.   yNMMMMMNm-  oNMMMMMNmo++:`       
       +sy--/sdMMMhyyyyyyyNMMh- .oyNMMmyyyyyhNMMm+` -yMMMdyyo:` .oyyNMMNhs+syy`       
       -yy/   /MMM+.`-+/``mMMy-   `mMMh:`````.dMMN:` `MMMy-`-dhhy```mMMy:``+hs       
        -yy+` /MMMo:-mMM+`-oo/.    mMMh:     `dMMN/`  dMMm:`dMMMMy..MMMo-.+yo`       
         .sys`/MMMMNNMMMs-         mMMmyooooymMMNo:   oMMM/sMMMMMM++MMN//oh:         
          `sh+/MMMhyyMMMs- `-`     mMMMMMMMMMNmy+-`   -MMMhMMMsmMMmdMMd/yy+           
    `-/+++oyy-/MMM+.`/hh/.`mNm:`   mMMd+/////:-.`      NMMMMMd/:NMMMMMy:/yyo/:.`     
   +os+//:-..-oMMMo:--:::-/MMMo. .-mMMd+---`           hMMMMN+. oMMMMMo. `-+osyso:`   
   syo     `mNMMMMMNNNNNNNNMMMo.oNNMMMMMNNNN:`         +MMMMs:`  dMMMN/`     ``:syo   
   /yh`     :syyyyyyyyyyyyyyyy+.`+syyyyyyyyo:`         .oyys:`   .oyys:`        +yh   
   -yh-        ````````````````    `````````              ``        ``          oys   
   -+h/------------------------::::::::://////++++++++++++++++++++++///////::::/yd:   
   shdddddddddddddddddddddddddddddhhhhhhhhyyyyyssssssssssssssssyyyyyyyhhhhhhhddddh`   
                                                                                     
  S. Ponce, E. R. Margine, C. Verdi, and F. Giustino,                                 
                                          http://dx.doi.org/10.1016/j.cpc.2016.07.028
                                                                                     

     Program EPW v.4.1.0 (svn rev. 13079) starts on 27Feb2017 at 11:26:48

     This program is part of the open-source Quantum ESPRESSO suite
     for quantum simulation of materials; please cite
         "P. Giannozzi et al., J. Phys.:Condens. Matter 21 395502 (2009);
          URL http://www.quantum-espresso.org",
     in publications or presentations arising from this work. More details at
     http://www.quantum-espresso.org/quote

     Parallel version (MPI & OpenMP), running on       1 processor cores
     Number of MPI processes:                 1
     Threads/MPI process:                     1
forrtl: severe (71): integer divide by zero
Image              PC                Routine            Line        Source             
epw.x              0000000000CD0615  Unknown               Unknown  Unknown
epw.x              0000000000CCE237  Unknown               Unknown  Unknown
epw.x              0000000000C6BBA4  Unknown               Unknown  Unknown
epw.x              0000000000C6B9B6  Unknown               Unknown  Unknown
epw.x              0000000000BD7B69  Unknown               Unknown  Unknown
epw.x              0000000000BDF766  Unknown               Unknown  Unknown
libpthread.so.0    00007F90227177E0  Unknown               Unknown  Unknown
epw.x              000000000045A596  epw_readin_               494  epw_readin.f90
epw.x              0000000000408F62  MAIN__                     91  epw.f90
epw.x              000000000040871E  Unknown               Unknown  Unknown
libc.so.6          00007F9021DCAD5D  Unknown               Unknown  Unknown
epw.x              0000000000408629  Unknown               Unknown  Unknown
carla.verdi
Posts: 155
Joined: Thu Jan 14, 2016 10:52 am
Affiliation:

Re: e-ph matrix calculation for certain q-point and k-point

Post by carla.verdi »

Hi,
the code gives an error because (line 494 in epw_readin.f90):
IF (ephwrite .and. (mod(nkf1,nqf1) .ne. 0 .OR. mod(nkf2,nqf2) .ne. 0 .OR. mod(nkf3,nqf3) .ne. 0 ) ) &
CALL errore('epw_readin', 'ephwrite requires nkf1,nkf2,nkf3 to be multiple of nqf1,nqf2,nqf3',1)
I suppose you find the "integer divide by zero" error because in your case nqf/nkf are zero. So if you want to have ephwrite=.true. you need to have nkf1,nkf2,nkf3 to be multiple of nqf1,nqf2,nqf3.

Best
Carla
roxana
Posts: 172
Joined: Fri Jan 22, 2016 6:48 pm
Affiliation:

Re: e-ph matrix calculation for certain q-point and k-point

Post by roxana »

Hi,

The job is crashing because you are using the ephwrite = .true. flag. This flag only works with uniform meshes as in the example for MgB2. It doesn't work for meshes provided through the filkf and filqf.

Best,
Roxana
Roxana Margine
Associate Professor
Department of Physics, Applied Physics and Astronomy
Binghamton University, State University of New York
dongws

Re: e-ph matrix calculation for certain q-point and k-point

Post by dongws »

Hi Carla and Roxana, thanks to you both. So I guess with the flag ephwrite = .true., I will only need to specify nkf and nqf, and use a uniform mesh But is it possible to do the calculation for the e-ph coefficients matrix without setting ephwrite = .true.?
roxana
Posts: 172
Joined: Fri Jan 22, 2016 6:48 pm
Affiliation:

Re: e-ph matrix calculation for certain q-point and k-point

Post by roxana »

Yes, it is possible depending of want you plan to calculate.
ephwrite flag is only used in conjunction with solving the anisotropic Migdal equations for superconductivity (MgB2 example).

Roxana
Roxana Margine
Associate Professor
Department of Physics, Applied Physics and Astronomy
Binghamton University, State University of New York
dongws

Re: e-ph matrix calculation for certain q-point and k-point

Post by dongws »

Hi Roxana,
I try to calculate the value of e-ph coupling matrix elements for certain k-points. I find in the code that:

Code: Select all

       IF (ephwrite) THEN
          IF ( iq .eq. 1 ) THEN
             CALL kmesh_fine
             CALL kqmap_fine
          ENDIF
          CALL write_ephmat( iq )
          CALL count_kpoints(iq)
       ENDIF

So I guess the ephwrite flag has to be set to .true. in order to do that calculation. Are you aware of other possible ways to do that?
roxana
Posts: 172
Joined: Fri Jan 22, 2016 6:48 pm
Affiliation:

Re: e-ph matrix calculation for certain q-point and k-point

Post by roxana »

ephwrite flag only writes the electron-phonon matrix on the file to be used when solving the Eliashberg equations.

phonselfen and elecselfen flags for example calculate electron-phonon matrix elements

What are you planning to calculate?
Roxana Margine
Associate Professor
Department of Physics, Applied Physics and Astronomy
Binghamton University, State University of New York
dongws

Re: e-ph matrix calculation for certain q-point and k-point

Post by dongws »

Hi Roxana, I guess just want to calculate the e-ph coupling matrix elements, instead of solving the Eliashberg equations. It's good to know that the phonselfen and elecselfen flags can also do the e-ph matrix calculation, without using ephwrite. Thanks so much for your help!
Post Reply