Dear Dominik,<div><br></div><div>Thank you very much for the explanation and suggestion.</div><div><br></div><div>I will try more num_bands. Thank you again.</div><div><br></div><div>Kind regards,</div><div><br></div><div>Kenan Song</div><div>Post Doctor in KAUST<br><br>On Thursday, April 1, 2021, Dominik Gresch <<a href="mailto:greschd@gmx.ch">greschd@gmx.ch</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:Verdana;font-size:12.0px"><div>Dear Kenan,</div>
<div> </div>
<div>It seems you may be confusing the "num_wann" and "num_bands" inputs. From the manual: </div>
<div> </div>
<div>- "num_bands" is "Number of bands passed to the code"</div>
<div>- "num_wann" is "Number of WF"</div>
<div> </div>
<div>In other words, "num_bands" are the bands <em>before</em> disentanglement, and "num_wann" the number <em>after</em> disentanglement. Importantly, the number of bands that need to lie within the energy window is "num_wann", not "num_bands".</div>
<div> </div>
<div>The way I understand the error message is this: Of the 96 bands that <em>are</em> passed to the code, there are fewer than "num_wann" inside the given energy window. Increasing "num_bands" can fix this because more bands are passed to Wannier90 to begin with. As an extreme example, if "num_wann" > "num_bands", the calculation will never work regardless of energy windows.</div>
<div> </div>
<div>In general, "num_bands" should be the same as the number of bands produced by the first-principles code, minus the number of "exclude_bands". I'm not sure exactly what happens when this is not the case, but maybe it is silently ignored in your case. </div>
<div>
<div> </div>
<div>Best regards,</div>
<div>Dominik</div>
<div> </div>
<div>---</div>
<div>Dominik Gresch</div>
<div>Simulation Engineer</div>
<div>Microsoft Quantum</div>
<div> </div>
<div>
<div name="quote" style="margin:10px 5px 5px 10px;padding:10px 0 10px 10px;border-left:2px solid #c3d9e5;word-wrap:break-word">
<div name="quoted-content"><br>
<br>
Date: Thu, 1 Apr 2021 17:58:37 +0300<br>
From: Kenan Song <<a href="mailto:kenan.song@kaust.edu.sa" target="_blank">kenan.song@kaust.edu.sa</a>><br>
To: hoangminh nguyenduy <<a href="mailto:nguyenduyhoangminh@gmail.com" target="_blank">nguyenduyhoangminh@gmail.com</a>><br>
Cc: "<a href="mailto:wannier@lists.quantum-espresso.org" target="_blank">wannier@lists.quantum-<wbr>espresso.org</a>"<br>
<<a href="mailto:wannier@lists.quantum-espresso.org" target="_blank">wannier@lists.quantum-<wbr>espresso.org</a>><br>
Subject: Re: [Wannier] Enquiry about the Failure in Wannierization<br>
Calculation<br>
Message-ID:<br>
<CAMbJXZ9w6u-<wbr>bcg7B5YkymnwTYUL8tive=<wbr>xHYpZurj=<a href="mailto:C9aD6PYA@mail.gmail.com" target="_blank">C9aD6PYA@mail.gmail.<wbr>com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Dear Hoangminh,<br>
<br>
Thank you for the suggestion.<br>
<br>
I will check that and change the energy window value, as you suggest.<br>
<br>
On the other hand, I really do not understand why this problem happened. I<br>
did the wannierization two times. First time, I set num_bands = 112 and<br>
dis_win_max = 150.0; then, the calculation could be done successfully. I<br>
think that this means that 150 eV includes more bands than 112 bands;<br>
otherwise, the calculation would report the error message (dis_windows:<br>
Energy window contains fewer states than number of target WFs).<br>
<br>
Second time, I only changed num_bands parameter to 96 and other parameters<br>
remained the same. I suppose that 150 eV should also include far more bands<br>
than 96 bands. Would you please provide me some possible reasons why the<br>
calculation failed, saying 'dis_windows: Energy window contains fewer<br>
states than number of target WFs'?<br>
<br>
Thank you very much again.<br>
<br>
Kind regards,<br>
<br>
Kenan Song<br>
Post Doctor in KAUST<br>
<br>
On Thu, Apr 1, 2021 at 5:06 PM hoangminh nguyenduy <<br>
<a href="mailto:nguyenduyhoangminh@gmail.com" target="_blank">nguyenduyhoangminh@gmail.com</a>> wrote:<br>
<br>
> Dear Kenan,<br>
><br>
><br>
><br>
> Although 150 >> 15, would you mind checking whether the highest level when<br>
> num_bands=96 is still higher than the dis_froz_max value?<br>
><br>
> If the value of dis_froz_max is fine, may you try decreasing the value of<br>
> dis_win_max so that it is just above the 96th band?<br>
><br>
><br>
><br>
> Best,<br>
><br>
> Minh.<br>
><br>
> *From: *Kenan Song <<a href="mailto:kenan.song@kaust.edu.sa" target="_blank">kenan.song@kaust.edu.sa</a>><br>
> *Sent: *Thursday, April 1, 2021 6:03 PM<br>
> *To: *Stepan Tsirkin <<a href="mailto:tsirkinss@gmail.com" target="_blank">tsirkinss@gmail.com</a>><br>
> *Cc: *<a href="mailto:wannier@lists.quantum-espresso.org" target="_blank">wannier@lists.quantum-<wbr>espresso.org</a><br>
> *Subject: *Re: [Wannier] Enquiry about the Failure in Wannierization<br>
> Calculation<br>
><br>
><br>
><br>
> Dear Stepan,<br>
><br>
><br>
><br>
> Thank you for the suggestion.<br>
><br>
><br>
><br>
> I used the same VASP code (version 5.4.4) to do the calculation for these<br>
> two calculations. The only difference is that I set NBANDS flag as 112 and<br>
> 96 respectively in order to interface with WANNIER90 code but I found that<br>
> the first wannierization with num_bands=112 could be done successfully;<br>
> while the second one with num_bands=96 failed. All other parameters in the<br>
> wannierization step are the same.<br>
><br>
><br>
><br>
> In the DFT self-consistent calculation, the fermi energy level is located<br>
> at 8.51 eV and the WANNIER90 code took this value as the Fermi level in its<br>
> calculations. The minimum eigen value/band is located at -55 eV but they<br>
> are just 6 highly localised bands (straight lines) and I am interested in<br>
> bands close to Fermi energy level. This is why I choose dis_win_min as -0.5<br>
> eV.<br>
><br>
><br>
><br>
> I could use larger values (160 ~ 200) for num_bands flag but I am afraid<br>
> that the dis_win_max flag needs to be set up as an even higher value. I am<br>
> not sure whether the same error message (dis_windows: Energy window<br>
> contains fewer states than number of target WFs) would pop up.<br>
><br>
><br>
><br>
> Would you please give me some more suggestions/comments? Thank you so much<br>
> for your help.<br>
><br>
><br>
><br>
> Kind regards,<br>
><br>
><br>
><br>
> Kenan Song<br>
><br>
> Post Doctor in KAUST<br>
><br>
><br>
><br>
> On Thu, Apr 1, 2021 at 12:06 PM Stepan Tsirkin <<a href="mailto:tsirkinss@gmail.com" target="_blank">tsirkinss@gmail.com</a>><br>
> wrote:<br>
><br>
> Dear Kenan,<br>
><br>
> do you meant that hte first (successful) calculation was done with another<br>
> code (not VASP) ?<br>
><br>
> Different codes may produce bandstructures shifted, also depending on<br>
> pseudopotential there might be a different number of semi-core electrons<br>
> included. Are you sure all your bands are above the dis_win_min = -0.5<br>
><br>
> If you remove dis_win_min and dis_win_max - then all bands will be<br>
> included.<br>
><br>
> However, for a good disentanglement, typically a much larger number of<br>
> bands should be included, then the number of Wannier functions. I would<br>
> use at least a double, i.e. num_bands~= 160-200.<br>
><br>
> Regards,<br>
><br>
> Stepan Tsirkin,<br>
> University of Zurich.<br>
> <a href="https://urldefense.com/v3/__http://wannier-berri.org__;!!Nmw4Hv0!gqlLXswbnFUpi5njS6jJ3Udm9LOYzaTQ9gagQUarlBQ0thT3H_yZuHc2JNEEydWv5plF$" target="_blank">http://wannier-berri.org</a><br>
> <<a href="https://urldefense.com/v3/__http:/wannier-berri.org__;!!Nmw4Hv0!mcRhIZFtkkQwIAT8TyKbCdjzSk8IetfWcmjwpRZp-udWAbKcLoQ1Q9Vamt-4HoG-iizG$" target="_blank">https://urldefense.com/v3/__<wbr>http:/wannier-berri.org__;!!<wbr>Nmw4Hv0!<wbr>mcRhIZFtkkQwIAT8TyKbCdjzSk8Iet<wbr>fWcmjwpRZp-udWAbKcLoQ1Q9Vamt-<wbr>4HoG-iizG$</a>><br>
><br>
> On 01.04.21 10:49, Kenan Song wrote:<br>
><br>
> Dear All,<br>
><br>
><br>
><br>
> Can I ask a question?<br>
><br>
><br>
><br>
> I am running the wannierization now and it could be done successfully with<br>
> the following parameter settings in the wannier90.win file.<br>
><br>
><br>
><br>
> num_wann = 80<br>
><br>
> num_bands = 112<br>
><br>
><br>
><br>
> num_iter = 50<br>
><br>
> guiding_centres = .true.<br>
><br>
> dis_num_iter = 1000<br>
><br>
><br>
><br>
> dis_froz_min = -0.5<br>
><br>
> dis_froz_max = 15.0<br>
><br>
> dis_win_min = -0.5<br>
><br>
> dis_win_max = 150.0<br>
><br>
><br>
><br>
> spinors = .true.<br>
><br>
> begin projections<br>
><br>
> Ni : s; p; d<br>
><br>
> N : s; p<br>
><br>
> Mn : s; p; d<br>
><br>
> end projections<br>
><br>
><br>
><br>
> begin unit_cell_cart<br>
><br>
> 3.8784000000 0.0000000000 0.0000000000<br>
><br>
> 0.0000000000 3.8784000000 0.0000000000<br>
><br>
> 0.0000000000 0.0000000000 3.8784000000<br>
><br>
> end unit_cell_cart<br>
><br>
><br>
><br>
> begin atoms_cart<br>
><br>
> Ni 0.000000000 0.000000000 0.000000000<br>
><br>
> N 0.500000000 0.500000000 0.500000000<br>
><br>
> Mn 0.000000000 0.500000000 0.500000000<br>
><br>
> Mn 0.500000000 0.000000000 0.500000000<br>
><br>
> Mn 0.500000000 0.500000000 0.000000000<br>
><br>
> end atoms_cart<br>
><br>
><br>
><br>
> write_hr = .true.<br>
><br>
> bands_plot = .true.<br>
><br>
> bands_num_points = 100<br>
><br>
> begin kpoint_path<br>
><br>
> Gamma 0.0 0.0 0.0 X 0.0 0.5 0.0<br>
><br>
> X 0.0 0.5 0.0 M 0.5 0.5 0.0<br>
><br>
> M 0.5 0.5 0.0 R 0.5 0.5 0.5<br>
><br>
> R 0.5 0.5 0.5 Gamma 0.0 0.0 0.0<br>
><br>
> Gamma 0.0 0.0 0.0 M 0.5 0.5 0.0<br>
><br>
> M 0.5 0.5 0.0 R 0.5 0.5 0.5<br>
><br>
> R 0.5 0.5 0.5 X 0.0 0.5 0.0<br>
><br>
> end kpoint_path<br>
><br>
> bands_plot_format = gnuplot<br>
><br>
><br>
><br>
> mp_grid = 21 21 21<br>
><br>
><br>
><br>
> begin kpoints<br>
><br>
> 0.000000000000 0.000000000000 0.000000000000<br>
><br>
> 0.047619047619 0.000000000000 0.000000000000<br>
><br>
> 0.095238095238 0.000000000000 0.000000000000<br>
><br>
> ...<br>
><br>
> -0.476190476190 0.476190476190 -0.476190476190<br>
><br>
> 0.476190476190 0.476190476190 -0.476190476190<br>
><br>
> -0.476190476190 -0.476190476190 0.476190476190<br>
><br>
> end kpoints<br>
><br>
><br>
><br>
> Then, I re-did the DFT calculation with VASP and set NBANDS to 96 to<br>
> interface with WANNIER90. In the wannierizaion step, I only changed<br>
> num_bands flag from 112 to 96 and kept all other parameter settings the<br>
> same; however, the calculation failed. The wannier90.wout file has the<br>
> following information at the end.<br>
><br>
><br>
><br>
> Error at k-point 1 ndimwin 76 num_wann 80<br>
><br>
> Exiting.......<br>
><br>
> dis_windows: Energy window contains fewer states than number of target WFs<br>
><br>
><br>
><br>
> I do not understand why it is that. I suppose that if the num_bands flag<br>
> with 112 in the previous calculation could be done successfully;<br>
> then, num_bands flag with 96 in this new calculation should be done<br>
> successfully as well because the dis_win_max flag in these two calculations<br>
> always remained 150.0.<br>
><br>
><br>
><br>
> Would anyone please give me some suggestions/comment on this issue? Thank<br>
> you very much.<br>
><br>
><br>
><br>
> Kind regards,<br>
><br>
><br>
><br>
> Kenan Song<br>
><br>
> Post Doctor in KAUST<br>
><br>
><br>
></div>
</div>
</div>
</div></div></div>
</blockquote></div>
<br>
<div><hr></div><font face="Arial" size="1">This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email.</font>