### Bugfixes for Vacuum part in spin-spiral calculation. Still not 100% correct as...

`Bugfixes for Vacuum part in spin-spiral calculation. Still not 100% correct as conribution of last k+g that are only present for one spin are missing. Might not be relevant at all since these are expected to be tiny.`
parent f7530b1d
 ... ... @@ -121,14 +121,14 @@ CONTAINS ENDIF !---> update hamiltonian and overlap matrices IF (jspin1==jspin2) THEN DO i = mpi%n_rank+1,lapw%nv(jspin1),mpi%n_size DO i = mpi%n_rank+1,lapw%nv(jspin2),mpi%n_size i0=(i-1)/mpi%n_size+1 !local column index ik = map2(i,jspin1) ik = map2(i,jspin2) DO j = 1,i - 1 !TODO check noco case !---> overlap: only (g-g') parallel=0 ' IF (map2(j,jspin1).EQ.ik) THEN sij = CONJG(a(i,jspin1))*a(j,jspin1) + & CONJG(b(i,jspin1))*b(j,jspin1)*ddnv(ik,jspin1) sij = CONJG(a(i,jspin2))*a(j,jspin2) + & CONJG(b(i,jspin2))*b(j,jspin2)*ddnv(ik,jspin2) !+APW_LO IF (input%l_useapw) THEN apw_lo = CONJG(a(i,jspin1)* uz(ik,jspin1) + b(i,jspin1)* udz(ik,jspin1) ) & ... ... @@ -151,7 +151,7 @@ CONTAINS END IF ENDDO !Diagonal term of Overlapp matrix, Hamiltonian later sij = CONJG(a(i,jspin1))*a(i,jspin1) + CONJG(b(i,jspin1))*b(i,jspin1)*ddnv(ik,jspin1) sij = CONJG(a(i,jspin2))*a(i,jspin2) + CONJG(b(i,jspin2))*b(i,jspin2)*ddnv(ik,jspin2) IF (hmat(1,1)%l_real) THEN smat(s1,s2)%data_r(j,i0) = smat(s1,s2)%data_r(j,i0) + REAL(sij) ELSE ... ... @@ -167,11 +167,11 @@ CONTAINS DO j = 1,MIN(i,lapw%nv(jspin1)) jk = map2(j,jspin1) IF (jspin2>jspin1) THEN hij = CONJG(CONJG(a(j,jspin2))* (tuuv(jk,ik)*a(i,jspin1) +tudv(jk,ik)*b(i,jspin1))& + CONJG(b(j,jspin2))* (tddv(jk,ik)*b(i,jspin1) +tduv(jk,ik)*a(i,jspin1))) hij = CONJG(CONJG(a(j,jspin1))* (tuuv(jk,ik)*a(i,jspin2) +tudv(jk,ik)*b(i,jspin2))& + CONJG(b(j,jspin1))* (tddv(jk,ik)*b(i,jspin2) +tduv(jk,ik)*a(i,jspin2))) ELSE hij = CONJG(a(i,jspin1))* (tuuv(ik,jk)*a(j,jspin2) +tudv(ik,jk)*b(j,jspin2))& + CONJG(b(i,jspin1))* (tddv(ik,jk)*b(j,jspin2) +tduv(ik,jk)*a(j,jspin2)) hij = CONJG(a(i,jspin2))* (tuuv(ik,jk)*a(j,jspin1) +tudv(ik,jk)*b(j,jspin1))& + CONJG(b(i,jspin2))* (tddv(ik,jk)*b(j,jspin1) +tduv(ik,jk)*a(j,jspin1)) ENDIF IF (hmat(1,1)%l_real) THEN hmat(s1,s2)%data_r(j,i0) = hmat(s1,s2)%data_r(j,i0) + REAL(hij) ... ...
 ... ... @@ -53,6 +53,8 @@ CONTAINS REAL u(vacuum%nmzd,dimension%nv2d,input%jspins),ud(vacuum%nmzd,dimension%nv2d,input%jspins) REAL v(3),x(vacuum%nmzd), qssbti(2,2) ! .. tuuv=0.0;tudv=0.0;tddv=0.0;tduv=0.0 udz=0.0;duz=0.0;ddnv=0.0;udz=0.;uz=0. tail = .true. np1 = vacuum%nmzxy + 1 !---> wronksian for the schrodinger equation given by an identity ... ...
 ... ... @@ -267,7 +267,7 @@ MODULE m_types_mat INTEGER:: i1,i2 i1=mat%matsize1-n1+1 !space available for first dimension i2=mat%matsize2-n1+1 i2=mat%matsize2-n2+1 i1=MIN(i1,mat1%matsize1) i2=MIN(i2,mat1%matsize2) IF (mat%l_real) THEN ... ...
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!