Hi Krisghosh,
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.
Carla
Seeking suggestion on Wannierization
Moderator: stiwari
-
- Posts: 155
- Joined: Thu Jan 14, 2016 10:52 am
- Affiliation:
Re: Seeking suggestion on Wannierization
Hello Carla and Roxana,
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?
Thanks,
Kris
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?
Thanks,
Kris
-
- Posts: 155
- Joined: Thu Jan 14, 2016 10:52 am
- Affiliation:
Re: Seeking suggestion on Wannierization
Hi,
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?
Carla
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?
Carla
Re: Seeking suggestion on Wannierization
Hello Carla,
Thanks for your reply. I tried without using 'num_bands', and 'exclude_bands'. But it did not work. Here are the input lines
wannierize = .true.
num_iter = 300
iprint = 4
dis_froz_min = 9.5
dis_froz_max= 14.5
proj(1) = 'f=0.658754,0.341246,0.313824:s'
nbndsub = 1
nbndskip = 44
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.
Thanks,
Krishnendu
Thanks for your reply. I tried without using 'num_bands', and 'exclude_bands'. But it did not work. Here are the input lines
wannierize = .true.
num_iter = 300
iprint = 4
dis_froz_min = 9.5
dis_froz_max= 14.5
proj(1) = 'f=0.658754,0.341246,0.313824:s'
nbndsub = 1
nbndskip = 44
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.
Thanks,
Krishnendu
-
- Posts: 155
- Joined: Thu Jan 14, 2016 10:52 am
- Affiliation:
Re: Seeking suggestion on Wannierization
Hi Krisghosh,
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?
Carla
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?
Carla
Re: Seeking suggestion on Wannierization
Hello Carla,
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.
Thanks,
Kris
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.
Thanks,
Kris
-
- Posts: 155
- Joined: Thu Jan 14, 2016 10:52 am
- Affiliation:
Re: Seeking suggestion on Wannierization
Hi Kris,
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.
Hope this helps clarifying?
Best
Carla
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.
Hope this helps clarifying?
Best
Carla
Re: Seeking suggestion on Wannierization
Hello Carla,
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.
Kris
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.
Kris
-
- Posts: 155
- Joined: Thu Jan 14, 2016 10:52 am
- Affiliation:
Re: Seeking suggestion on Wannierization
No worries, I'm glad your issue is solved!
Carla
Carla