diff --git a/cdn_mt/orbMagMoms.f90 b/cdn_mt/orbMagMoms.f90 index c0dd05374d61035bf6e294eff7883f6f98ad98d2..bbbced1717b8da875579b331a31eaada6279f69f 100644 --- a/cdn_mt/orbMagMoms.f90 +++ b/cdn_mt/orbMagMoms.f90 @@ -41,9 +41,9 @@ SUBROUTINE orbMagMoms(input,atoms,noco,clmom) phii = noco%alph(iType) !Fix of sign of moment in first variation calculations. Perhaps it would be better to understand this :-( - slxmom=-1*slxmom - slymom=-1*slymom - slmom=-1*slmom + !slxmom=-1*slxmom + !slymom=-1*slymom + !slmom=-1*slmom END IF ! rotation: orbital moment || spin moment (extended to incude phi - hopefully) diff --git a/eigen/eigen.F90 b/eigen/eigen.F90 index affc2c4304b4edbdcd27e52d7de0e44177c4f623..f9f0a7c3b139596274598efa9c2e43e36f49673d 100644 --- a/eigen/eigen.F90 +++ b/eigen/eigen.F90 @@ -222,9 +222,9 @@ CONTAINS #else ne_found=ne_all #endif - !IF (.NOT.zMat%l_real) THEN - ! zMat%data_c(:lapw%nmat,:ne_found) = CONJG(zMat%data_c(:lapw%nmat,:ne_found)) - !END IF + IF (.NOT.zMat%l_real) THEN + zMat%data_c(:lapw%nmat,:ne_found) = CONJG(zMat%data_c(:lapw%nmat,:ne_found)) + END IF IF (mpi%n_rank == 0) THEN ! Only process 0 writes out the value of ne_all and the ! eigenvalues. diff --git a/eigen/hs_int.F90 b/eigen/hs_int.F90 index 00fef4deccc6b699783c19f4fda91fab8540a479..253c03969882ab06e3e693569ca578f6f3145093 100644 --- a/eigen/hs_int.F90 +++ b/eigen/hs_int.F90 @@ -48,13 +48,13 @@ CONTAINS ii=-1*ii in = stars%ig(ii(1),ii(2),ii(3)) IF (in.EQ.0) CYCLE - th = stars%rgphs(ii(1),ii(2),ii(3))*vpw(in,3) + th = stars%rgphs(ii(1),ii(2),ii(3))*conjg(vpw(in,3)) ts=0.0 ELSEIF(ispin==2.and.jspin==1) THEN ! ii = -1*ii in = stars%ig(ii(1),ii(2),ii(3)) IF (in.EQ.0) CYCLE - th = stars%rgphs(ii(1),ii(2),ii(3))*conjg(vpw(in,3)) + th = stars%rgphs(ii(1),ii(2),ii(3))*vpw(in,3) ts=0.0 ELSE !--> determine index and phase factor diff --git a/eigen/hsmt_soc_offdiag.f90 b/eigen/hsmt_soc_offdiag.f90 index 5eceb3743c222fb3a2f632671c42c678883098a3..edd42f695dcbdfcc1ce18d6ef3c14d5a0dd96feb 100644 --- a/eigen/hsmt_soc_offdiag.f90 +++ b/eigen/hsmt_soc_offdiag.f90 @@ -37,8 +37,7 @@ CONTAINS COMPLEX:: chi(2,2,2,2),angso(lapw%nv(1),2,2) REAL, ALLOCATABLE :: plegend(:,:),dplegend(:,:) COMPLEX, ALLOCATABLE :: cph(:) - - + CALL timestart("offdiagonal soc-setup") DO l = 0,atoms%lmaxd @@ -87,6 +86,7 @@ CONTAINS DO l = 1,atoms%lmax(n) DO j1=1,2 DO j2=1,2 + !DO j2=j1,j1 DO kj = 1,ki fct =cph(kj) * dplegend(kj,l)*fl2p1(l)*(& fj(ki,l,j1)*fj(kj,l,j2) *td%rsoc%rsopp(n,l,j1,j2) + & diff --git a/eigen/hsmt_spinor.F90 b/eigen/hsmt_spinor.F90 index d3db36d30fa3aa24f675a19fd35ea1f911a73bf7..870af9b4ef7b9e97b29636f46d5da1a9c5a56ee2 100644 --- a/eigen/hsmt_spinor.F90 +++ b/eigen/hsmt_spinor.F90 @@ -24,21 +24,21 @@ CONTAINS !---> set up the spinors of this atom within global !---> spin-coordinateframe - chi(1,1) = exp(-ImagUnit*noco%alph(n)/2)*cos(noco%beta(n)/2) - chi(1,2) = -exp(-ImagUnit*noco%alph(n)/2)*sin(noco%beta(n)/2) - chi(2,1) = exp(ImagUnit*noco%alph(n)/2)*sin(noco%beta(n)/2) - chi(2,2) = exp(ImagUnit*noco%alph(n)/2)*cos(noco%beta(n)/2) + chi(1,1) = exp(ImagUnit*noco%alph(n)/2)*cos(noco%beta(n)/2) + chi(1,2) = -EXP(ImagUnit*noco%alph(n)/2)*SIN(noco%beta(n)/2) + chi(2,1) = EXP(-ImagUnit*noco%alph(n)/2)*SIN(noco%beta(n)/2) + chi(2,2) = EXP(-ImagUnit*noco%alph(n)/2)*COS(noco%beta(n)/2) !---> and determine the prefactors for the Hamitonian- and !---> overlapp-matrix elements IF (isp<3) THEN isp1=isp isp2=isp ELSEIF(isp==3) THEN - isp1=1 - isp2=2 - ELSE isp1=2 isp2=1 + ELSE + isp1=1 + isp2=2 ENDIF chi_mat(1,1) = chi(1,isp1)*CONJG(chi(1,isp2)) @@ -77,10 +77,10 @@ CONTAINS !---> set up the spinors of this atom within global !---> spin-coordinateframe - chi(1,1) = exp(-ImagUnit*noco%alph(n)/2)*cos(noco%beta(n)/2) - chi(1,2) = -exp(-ImagUnit*noco%alph(n)/2)*sin(noco%beta(n)/2) - chi(2,1) = exp(ImagUnit*noco%alph(n)/2)*sin(noco%beta(n)/2) - chi(2,2) = EXP(ImagUnit*noco%alph(n)/2)*COS(noco%beta(n)/2) + chi(1,1) = exp(ImagUnit*noco%alph(n)/2)*cos(noco%beta(n)/2) + chi(1,2) = -EXP(ImagUnit*noco%alph(n)/2)*SIN(noco%beta(n)/2) + chi(2,1) = EXP(-ImagUnit*noco%alph(n)/2)*SIN(noco%beta(n)/2) + chi(2,2) = EXP(-ImagUnit*noco%alph(n)/2)*COS(noco%beta(n)/2) isigma_x=MATMUL(CONJG(TRANSPOSE(chi)), MATMUL(isigma(:,:,1),chi)) isigma_y=MATMUL(CONJG(TRANSPOSE(chi)), MATMUL(isigma(:,:,2),chi)) diff --git a/eigen/vacfun.f90 b/eigen/vacfun.f90 index e83399645f3506acc95f56cda9e1015f4c4bdcb9..caa5b2b9a7d27e1b53bc2c7c199f356b6f5b1763 100644 --- a/eigen/vacfun.f90 +++ b/eigen/vacfun.f90 @@ -53,7 +53,7 @@ CONTAINS REAL u(vacuum%nmzd,size(duz,1),input%jspins),ud(vacuum%nmzd,size(duz,1),input%jspins) REAL v(3),x(vacuum%nmzd), qssbti(2,2) ! .. - fac=MERGE(1.0,-1.0,jspin1<=jspin2) + fac=MERGE(1.0,-1.0,jspin1>=jspin2) ipot=MERGE(jspin1,3,jspin1==jspin2) tuuv=0.0;tudv=0.0;tddv=0.0;tduv=0.0