Commit 0f8686af authored by Matteo Gerosa's avatar Matteo Gerosa
Browse files

Bug fix in noncollinear case: wavefunctions are now correctly multiplied by phase

parent 844c9536
......@@ -396,7 +396,7 @@ SUBROUTINE calc_exx2_k( sigma_exx, nb1, nb2 )
CALL single_invfft_k(dffts,npwkq,npwx,evckmq(1 ,iv_glob),pertr_nc(1,1),'Wave',igk_k(1,ikqs))
CALL single_invfft_k(dffts,npwkq,npwx,evckmq(1+npwx,iv_glob),pertr_nc(1,2),'Wave',igk_k(1,ikqs))
DO ir=1,dffts%nnr
pertr_nc(ir,1)=DCONJG(psic_nc(ir,1))*pertr_nc(ir,1)+DCONJG(psic_nc(ir,2))*pertr_nc(ir,2)
pertr_nc(ir,1)=DCONJG(pertr_nc(ir,1)*phase(ir))*psic_nc(ir,1)+DCONJG(pertr_nc(ir,2)*phase(ir))*psic_nc(ir,2)
ENDDO
CALL single_fwfft_k(dffts,ngms,ngms,pertr_nc(1,1),pertg,'Smooth') ! no igk
ELSE
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment