I am a graduate student at the University at Buffalo?.I am using the EPW package to do electron-phonon interaction calculation. I have a doubt regarding the Wannierization scheme implemented in EPW.
Whenever I am using the input parameter , ‘exclude_bands’ for the .win file, the pw2wan90epw.f90 gets stuck possibly at the phases_a_m subroutine. I do not get any error message at the .out file but the program execution stops. I guess the possible reason is that the wave-function phases (umat) are defined as nbndnbndnks, but the amn and mmn matrices have the dimension of num_bands*num_bands. Here, nbnd is the number of bands from pwscf, while num_bands is the number of bands after cutting off ‘excluded_bands’. In my opinion, due to this mismatch in dimension the matrix multiplication done in the subroutine phases_a_m fails. Now, if I want to change the dimension of umat, then all such dimensions are to be changed (like the epmat on coarse mesh). Could you please suggest me any possible way to fix this, or if I am going wrong somewhere else?
Thanks,
Krishnendu
Krishnendu Ghosh, Graduate Student
Electrical Engineering Department
University at Buffalo
The State University of New York
Buffalo, NY 14260
[code:11r8qx6n]wannierize = .true.
num_iter = 300
nbndsub = 2
nbndskip = 44
iprint = 4
dis_win_max = XX
dis_win_min = XX
dis_froz_min= XX
dis_froz_max= XX
proj(1) = ‘f=0.658754,0.341246,0.313824:s’[/code:11r8qx6n]
Where you have to replace the XX by values relevant to your problem.
What I usually recommend if you have a problem at the Wannier level is to first try to do a bandstructure interpolation using the Wannier90 code that you can download there [url:11r8qx6n]http://wannier.org/[/url:11r8qx6n].
If that is working, then there should not be any issue at the EPW level since we call a Wannier library to perform that step.
Thank you for your reply. I tried with disentanglement, but it did not give me correct result (to be more precise, the energy eigen values from the exact DFT calculation is isotropic near the Gamma point, but the Wannier interpolated values become anisotropic).
When I try that on Wannier90, it works fine though.
Regarding the input that you suggested, I need to project on one orbital only, so nbndsub should be 1 for my case and the energy window that I am interested in has one energy band only from exact DFT calculation. Do I still require distanglement?
Your calculation will be successful if you follow Roxana’s suggestion above. This is because EPW is not compatible with the option exclude_bands. This option indeed has no effect on the calculation itself, it just means that the code does not calculate the overlaps Amn and Mmn for the excluded bands. You can still skip these bands in the wannierization though, as you are correctly trying to do.
Thank you for your replies. First of all, in my understanding, the parameter nbndskip is used only for the Fermi Level calculation, it is not used anywhere in the Wannerization process (please correct me if I am wrong and also please let me know which subroutine in the Wannerization process it is used )
Now if I do not specify num_bands, Wannier90 makes num_bands = num_wann (see param_read subroutine in Wannier90). There comes the problem. The projection is done only with the first band of the system since I specified nbndsub=1 (which means num_wann=1). But I am interested with the 45th band.
Added to that, Wannier90 turns off the disentanglement when num_wann = num_bands (which makes sense). So specifying disentanglement parameters does not work under such circumstance. Then how do I choose my Wannier subspace to be the 45th band?
Yes what you say is correct, I only stressed that you shouldn’t use the option "exclude_bands" (for a proper explanation of the meaning of that variable you can check the W90 user guide). Then, as you were correctly doing, specifying nbndsub allows you to extract a number of Wannier bands smaller than the number of DFT KS states. This normally needs to have a disentanglement window specified.
Do not use num_bands too, as Roxana was saying. It is not true that the code will try to do the projection with the first band instead of the 45th you are interested in: this will be dictated by your chosen energy window.
You mentioned that the wannierization works within W90, but not EPW. Did you run EPW without the "exclude_bands" and "num_bands" options? If no, please try to. If yes, could you post the relevant input lines, and the initial projections / final states within the two codes?
For your information, in the above case disentanglement was off; the reason being num_bands=num_wann (nbndsub), since num_bands is not explicitly specified. On the other hand, while running Wannier90, either I explicitly specified num_bands (for disentanglement) or I specified exclude_bands.
If you ran the nscf calculation with 45 bands then that should be the number of total bands. In fact, in pw2wan90epw there’s a call to wannier_setup with ‘nbnd’ (=tot KS bands) in the input arguments. num_bands is in the output arguments, and it is the same as nbnd if you haven’t excluded any bands (no exclude_bands parameter).
In the EPW output, after the initial Wannier projections you should have lines that read:
- Number of bands is ( XX)
- Number of wannier functions is ( XX)
what does it say for you?
Thanks for your reply. The epw.out file does say number of bands is 45 and number of wannier function is 1, which is fine. Which means the num_bands output from wannier_setup is indeed 45. But the problem arises after wannier_run is called. num_bands is passed as an input to wannier_run, however wannier_run (around line 276) calls param_read where num_bands is set to num_wann. Wannier90 tutorial does say that if we do not specify a num_bands in the .win file, num_bands will be num_wann.
That is correct, however if you check the routine param_read you can see that num_bands is set to num_wann only if num_bands is not specified AND library is false. The parameter ‘library’ is true in our case.
When you run epw you should also have a file prefix.win and prefix.wout created before/after the wannierization. If you look for ‘MAIN’ in prefix.wout you should see the number of wannier functions and of input bloch states.
You are correct. I overlooked the condition on library. Actually something was going wrong with the disentanglement window and so I was lost there. Sorry about the trouble and many thanks for your help.