[Wien] Almost sure a bug exist in couplx.f of SRC_lapwdm for Wien2k_14.2

Peter Blaha pblaha at theochem.tuwien.ac.at
Fri Jun 23 13:54:09 CEST 2017


Dear Xongxin,

Thank you very much for your report. I'm not the expert in the lapwdm 
code, but a few remarks from my side:

I agree with your test, in principle the definition of Ly should be 
reversed.

However, according to my tests, Ly as defined in couplx.f is used only 
for the expectation values like orbital moment or orbital hyperfine 
field (Rindex,Lsindex=1 3 or 3 3). It is not used for the density matrix 
(0 0).

If I compare the orbital moments of RX,LSX=0 0 and RXLSX=1,3 I can find 
agreement with the original code, but after "fixing" Ly, the orbital 
moment of RX,LSX=1 3 is different from that of the density matrix.

Now we can speculate, which result is correct, but the code history 
shows that LY was redefined ("in the wrong way") in 2007, but from that 
time on the orbital moments agree with the two methods. I thus believe 
that one should NOT change the code (except when you want to use the Ly 
matrices somewhere else in a different code).

My guess is that in the calculation of the expectation values with 
RX,LSX=1,3 there is an "error", which compensates the "wrong" definition 
of Ly.

Regards

On 06/21/2017 11:44 PM, Yongxin Yao wrote:
> Dear all:
>
>      Greetings!
>      I am almost sure that there is a bug in the definition of Lx, Ly in
> file couplx.f of SRC_lapwdm for Wien2k_14.2. As I show in the attached
> Fortran code, [Lx, Ly] = -Lz instead of Lz. The fix is to have
> Ly=transpose(Ly). Please let me know if it is true or not. BTW, I do not
> see any corresponding fix in the release note of 16.1, so I believe it
> remains there.  Thanks.
>
>      Regards, Yongxin
>
>
> _______________________________________________
> Wien mailing list
> Wien at zeus.theochem.tuwien.ac.at
> http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
> SEARCH the MAILING-LIST at:  http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html
>

-- 

                                       P.Blaha
--------------------------------------------------------------------------
Peter BLAHA, Inst.f. Materials Chemistry, TU Vienna, A-1060 Vienna
Phone: +43-1-58801-165300             FAX: +43-1-58801-165982
Email: blaha at theochem.tuwien.ac.at    WIEN2k: http://www.wien2k.at
WWW:   http://www.imc.tuwien.ac.at/TC_Blaha
--------------------------------------------------------------------------


More information about the Wien mailing list