Hi,
I am trying to read the ephmat files generated by EPW in binary format using Python. I was reading the source code write_ephmat routine within the io_eliashberg.f90 file. I am doing for GaN with 1 band and there are 12 phonon modes. The dense k and q grid is 40^3. I am using 4 nodes and 16 cores so there are 64 processes. Thus I got 64 ephmat files with 1000 kpts in each of them. I wanted to verify the format of the ephmat file generated by EPW. I am using EPW 5.7 and QE7.2. I am also using a large fsthick to ensure all the k and q points are taken into the calculation
So the first line contains the pool id and the number of k points within the pool right? And after that the matrix elements are written. As far as I understood, the first matrix element is the one corresponding to the 1st kpoint 1st qpoint , 1st band and the 1st mode[/b] right? Then the next elements is 1st kpoint, 1st qpoint,1st band and 2nd mode right? In this way it goes upto 12 modes and then is it is for 1st kpt, 2nd qpt, 1st band and 1st modes right?
It would be really great if someone could verify whether I am understanding it correctly.
Reading electron-phonon matrix elements file by EPW
Moderator: stiwari
Re: Reading electron-phonon matrix elements file by EPW
Hi Animesh,
I would suggest you use the EPW v5.9 as in older versions you might face problems restarting the calculations and other issues.
The superconductivity module, first checks if k and q-points are within the fsthick window or not. Then it maps those k-points within the window. You can verify this in your epw output file.
Yes, the first line contains the pool id and the number of k points within the fsthick window in the pool.
The elements are written for each q-point.
The first element is iq=1, ikfs=1, 1st band, and 1st mode...all the modes. iq=1, ikfs=2, 1st band, 1st mode .. so on (the modes > eps_acoustic).
You can take a look at the read_ephmat subroutine.
Regards,
Shashi
I would suggest you use the EPW v5.9 as in older versions you might face problems restarting the calculations and other issues.
The superconductivity module, first checks if k and q-points are within the fsthick window or not. Then it maps those k-points within the window. You can verify this in your epw output file.
Yes, the first line contains the pool id and the number of k points within the fsthick window in the pool.
The elements are written for each q-point.
The first element is iq=1, ikfs=1, 1st band, and 1st mode...all the modes. iq=1, ikfs=2, 1st band, 1st mode .. so on (the modes > eps_acoustic).
You can take a look at the read_ephmat subroutine.
Regards,
Shashi
Re: Reading electron-phonon matrix elements file by EPW
Hi,
Thanks for the information. In EPW5.9, can you tell me which .f90 file has the write_ephmat and read_ephmat subroutines. It does not have the io_eliashberg.f90 file which used to have the ephmat subroutines?
Thanks
Animesh
Thanks for the information. In EPW5.9, can you tell me which .f90 file has the write_ephmat and read_ephmat subroutines. It does not have the io_eliashberg.f90 file which used to have the ephmat subroutines?
Thanks
Animesh
Re: Reading electron-phonon matrix elements file by EPW
Hi Animesh,
In EPWv5.9, you can look at EPW/src/io/io_supercond.f90, it contains write_ephmat and read_ephmat subroutines.
Regards,
Shashi
In EPWv5.9, you can look at EPW/src/io/io_supercond.f90, it contains write_ephmat and read_ephmat subroutines.
Regards,
Shashi
Re: Reading electron-phonon matrix elements file by EPW
Hi,
Thanks for the information and your help. I had one more question. Let's say I am using nkfs and nqfs as 8^3 grid. And I am using 8 processes.So when I use the tag ephwrite=true and the 8 ephmat files are generated , each containing 64 k points. So does the ephmat1 file contain the first 64 kpoints in the same order as it is written in the egnv file, and ephmat2 contains the next 64 kpoints and so on?
I am asking this because when I change the number of processes to let's say 16 and try to see the electron phonon matrix elements, the values are different as compared to using 8 processes. To verify this I check the first value of the ephmat1 files in both cases and it's different when I change the parallelization i.e from 8 processes to 16 processes.
Thanks for the information and your help. I had one more question. Let's say I am using nkfs and nqfs as 8^3 grid. And I am using 8 processes.So when I use the tag ephwrite=true and the 8 ephmat files are generated , each containing 64 k points. So does the ephmat1 file contain the first 64 kpoints in the same order as it is written in the egnv file, and ephmat2 contains the next 64 kpoints and so on?
I am asking this because when I change the number of processes to let's say 16 and try to see the electron phonon matrix elements, the values are different as compared to using 8 processes. To verify this I check the first value of the ephmat1 files in both cases and it's different when I change the parallelization i.e from 8 processes to 16 processes.
Re: Reading electron-phonon matrix elements file by EPW
Hi Animesh,
The writing to ephmatf depends on the number of pools. When you change the number of processors from 8 to 16, the number of k-points per pool differs. Therefore, it is hard to compare the ephmatf1 from both these calculations. So, if you want to verify your results using different sets of processes you can compare valuable quantities like e-ph coupling strength or gap values rather than comparing directly the ephmatf files.
In your case, kmesh is 8x8x8 = 512 and I suspect you might have used a large fsthick window. When you use 8procs., the number of ephmatf per process is 512/8=64. While using 16 procs., # of ephmat per pool is 512/16 = 32. In the first case, your ephmatf1 file corresponds to 64 k-points while in the second case, it contains 32k-points e-ph matrices. So the ephmatf1 in each case is different.
The eigv file contains the eigen energies for 512 k-points in your case. So this number is not the same as ephmatf. When ephmatf files are written it checks for the criteria E_k and E_k+q are within the fsthick window and then stores the element.
Please let me know if you want to clarify anything else.
Regards,
Shashi
The writing to ephmatf depends on the number of pools. When you change the number of processors from 8 to 16, the number of k-points per pool differs. Therefore, it is hard to compare the ephmatf1 from both these calculations. So, if you want to verify your results using different sets of processes you can compare valuable quantities like e-ph coupling strength or gap values rather than comparing directly the ephmatf files.
In your case, kmesh is 8x8x8 = 512 and I suspect you might have used a large fsthick window. When you use 8procs., the number of ephmatf per process is 512/8=64. While using 16 procs., # of ephmat per pool is 512/16 = 32. In the first case, your ephmatf1 file corresponds to 64 k-points while in the second case, it contains 32k-points e-ph matrices. So the ephmatf1 in each case is different.
The eigv file contains the eigen energies for 512 k-points in your case. So this number is not the same as ephmatf. When ephmatf files are written it checks for the criteria E_k and E_k+q are within the fsthick window and then stores the element.
Please let me know if you want to clarify anything else.
Regards,
Shashi
Re: Reading electron-phonon matrix elements file by EPW
Hi,
Yes I understand that the number of k points will be different. So the nkf and nqf grids are generated from kmesh.pl which stays the same irrespective of the number of processes that I am using. So in the ephmat1 file , the first el-ph matrix element should be the value for the 1st kpoint(from nkf),1st qpoint(from nqf) and the 1st mode right irrespective of the number of kpoints in the file and irrespective of the number of processes that I use right?
Yes I understand that the number of k points will be different. So the nkf and nqf grids are generated from kmesh.pl which stays the same irrespective of the number of processes that I am using. So in the ephmat1 file , the first el-ph matrix element should be the value for the 1st kpoint(from nkf),1st qpoint(from nqf) and the 1st mode right irrespective of the number of kpoints in the file and irrespective of the number of processes that I use right?
Re: Reading electron-phonon matrix elements file by EPW
Hi Animesh,
Your understanding is mostly correct, but keep in mind that the header of ephmat files contains two integers. These integers ensure the files are read correctly, even when a different number of pools is used.
https://gitlab.com/QEF/q-e/-/blob/qe-7.4.1/EPW/src/io/io_supercond.f90#L2288
(This applies to EPW v5.9(QE v7.4.1). With future updates, the file format specifications may also change.)
Best,
Hitoshi
Your understanding is mostly correct, but keep in mind that the header of ephmat files contains two integers. These integers ensure the files are read correctly, even when a different number of pools is used.
https://gitlab.com/QEF/q-e/-/blob/qe-7.4.1/EPW/src/io/io_supercond.f90#L2288
(This applies to EPW v5.9(QE v7.4.1). With future updates, the file format specifications may also change.)
Best,
Hitoshi