[xcrysden] A small bug in wn_readbakgen.f

Tone Kokalj xcrysden@democritos.it
Fri, 26 Aug 2005 11:26:24 +0200


On Wed, 2005-08-24 at 17:21 +0800, xianghjun wrote:
> Dear all,
>   Today I want to calculate the fermi surface using wien2k, I encounter 
> an error
> just before the fermi surface plotting. I find that in
> "~/xcrys_tmp/xc_13519/FS/FS.outputfs", it reads:
>  ...
>  ...
>   0.113965000000000        0.00000000000000D+000   0.00000000000000D+000
>    0.00000000000000D+000  0.185889000000000        0.00000000000000D+000
>    0.00000000000000D+000   0.00000000000000D+000  0.130882000000000
> ...
> 
> It seems that "D+000" is the source of the error since by replacing 'D' 
> with 'E',
> the error disappears.
> 
> Finally I replace some codes in wn_readbakgen.f with the following codes:
> C xhj add here
> !      write(10,*) 0.0,0.0,0.0  !origin
>       write(10,'(3f16.9)') 0.0,0.0,0.0

You are absolutely right, thank you. By writing with the free format its
up to "compiler" how to write these real numbers, and the exponential
form with "D", i.e. 1.234D+002, is not recognised by C-language, hence
the error. I will adapt the code accordingly.

Best regards, Tone