[Wannier] Problem with use_ws_distance

Lorenzo Paulatto lorenzo.paulatto at impmc.upmc.fr
Wed Feb 15 13:32:29 CET 2017


On Tuesday, February 14, 2017 9:51:50 PM CET Dominik Gresch wrote:
> Dear Wannier90 community,
> 
> While running Wannier90 with the 'use_ws_distance = .TRUE.' flag, I
> encounter the error 'wrong irdist_ws'. Does anyone know the nature of
> this error?

This error should never happen, although if the position of the centres of the WFs are very 
noisy it may pop up. It is difficult to tell without having the slightest detail about your 
calculation. 

Could you please provide us the files necessary to reproduce you calculation (ie. all the file 
seedname.*, except the UNK files).

As a quick workaround, you can go in the file src/ws_distance.F90 and around line 156 
change this check:
   IF(ANY(ABS(DBLE(irdist_ws)-irdist_real)>1.d-6)) & 
call io_error('wrong irdist_ws')
allowing for a larger tolerance, something like 1.d-4 or 1.d-3. If then the code runs to the end, 
it is just a problem of numerical noise/minimisation not being tight enough.

If this does not help, we definitely need to reproduce the calculation in order to be able to 
help.

> Important things to note:
>      - The error seems to appear also for 'use_ws_distance = .FALSE.',
> but in that case the output files are still written

Yes, there is a place where the subroutine causing the error is called even when that option is 
false. This occurence arrives later in the code, hence I can see how the output files are written 
in this case. To avoid this problem, you can change src/plot.F90 around line 80, from
if ( write_hr.or.write_rmn.or.write_tb ) then 
if (.not.done_ws_distance) call ws_translate_dist(nrpts,irvec) 
call ws_write_vec(nrpts,irvec) 
end if

to

if ( (write_hr.or.write_rmn.or.write_tb) .and. use_ws_distance) then 
if (.not.done_ws_distance) call ws_translate_dist(nrpts,irvec) 
call ws_write_vec(nrpts,irvec) 
end if

And, of course, recompile (I have not tested this, but it should work).

>      - My input files were generated with VASP (meaning, for Wannier90
> v.1), which could be the source of the problem

I do not think this makes any difference.


hth
-- 
Dr. Lorenzo Paulatto 
IdR @ IMPMC -- CNRS & Université Paris 6
phone: +33 (0)1 442 79822 / skype: paulatz
www:   http://www-int.impmc.upmc.fr/~paulatto/
mail:  23-24/423 Boîte courrier 115, 4 place Jussieu 75252 Paris Cédex 05
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/wannier/attachments/20170215/6adcec2d/attachment.html>


More information about the Wannier mailing list