[Wien] bug in lapw5

Peter Blaha pblaha at theochem.tuwien.ac.at
Thu Sep 18 08:49:56 CEST 2014


I report here a bug which was found by Gavin Abo in lapw5:

It concerns the units when "ANG" was demanded in case.in5, where the 
conversion was done with a multiplication instead of a division.
It has no effect when using the default "ATU".

Fix: Please make the following changes in main1.f and recompile:
349c349
<       IF(IUNIT.EQ.'ANG ') FAK=Bohr**3          ! old and wrong
---
 >       IF(IUNIT.EQ.'ANG ') FAK=1.D0/Bohr**3      ! new
376c376
<         if(IUNIT.EQ.'ANG ')CTarget=CTarget/FAK
---
 >         if(IUNIT.EQ.'ANG ')CTarget=CTarget*FAK  ! Change to avoid 
altering output

Alternatively you can also apply the attached patch.
patch -b main1.f main1.patch

N.B., don't forget to recompile with siteconfig after applying the patch
-- 
Peter Blaha
Inst.Materials Chemistry
TU Vienna
Getreidemarkt 9
A-1060 Vienna
Austria
+43-1-5880115671
-------------- next part --------------
349c349
<       IF(IUNIT.EQ.'ANG ') FAK=Bohr**3
---
>       IF(IUNIT.EQ.'ANG ') FAK=1.D0/Bohr**3      ! Change to avoid altering lapw5 output (fix to WIEN2k 14.1): Was 6.7551d0 in WIEN2k 13.1 (and likely in verisons < 13.1) but changed to increase accuracy
376c376
<         if(IUNIT.EQ.'ANG ')CTarget=CTarget/FAK
---
>         if(IUNIT.EQ.'ANG ')CTarget=CTarget*FAK  ! Change to avoid altering output


More information about the Wien mailing list