Commit 4dc29f4b authored by Daniel Wortmann's avatar Daniel Wortmann Committed by Miriam Hinzen

Bugfixes for LO part of Hamiltonian setup. Was broken for multiple atoms with...

Bugfixes for LO part of Hamiltonian setup. Was broken for multiple atoms with LOs and inversion symmetry...


(cherry picked from commit 87f4143a)
parent ecddcbb4
...@@ -58,7 +58,7 @@ CONTAINS ...@@ -58,7 +58,7 @@ CONTAINS
ALLOCATE(ax(MAXVAL(lapw%nv)),bx(MAXVAL(lapw%nv)),cx(MAXVAL(lapw%nv))) ALLOCATE(ax(MAXVAL(lapw%nv)),bx(MAXVAL(lapw%nv)),cx(MAXVAL(lapw%nv)))
ALLOCATE(abclo(3,-atoms%llod:atoms%llod,2*(2*atoms%llod+1),atoms%nlod,2)) ALLOCATE(abclo(3,-atoms%llod:atoms%llod,2*(2*atoms%llod+1),atoms%nlod,2))
DO i=MIN(iintsp,jintsp),MAX(iintsp,jintsp) DO i=MIN(iintsp,jintsp),MAX(iintsp,jintsp)
CALL hsmt_ab(sym,atoms,noco,isp,iintsp,ntyp,na,cell,lapw,fj,gj,ab(:,:),ab_size,.TRUE.,abclo(:,:,:,:,i),alo1,blo1,clo1) CALL hsmt_ab(sym,atoms,noco,isp,i,ntyp,na,cell,lapw,fj,gj,ab(:,:),ab_size,.TRUE.,abclo(:,:,:,:,i),alo1,blo1,clo1)
ENDDO ENDDO
......
...@@ -89,7 +89,7 @@ CONTAINS ...@@ -89,7 +89,7 @@ CONTAINS
DO lo = 1,atoms%nlo(n) DO lo = 1,atoms%nlo(n)
l = atoms%llo(lo,n) l = atoms%llo(lo,n)
DO nkvec=1,invsfct*(2*l+1) DO nkvec=1,invsfct*(2*l+1)
IF (lapw%kvec(nkvec,lo,n)==k) THEN !This k-vector is used in LO IF (lapw%kvec(nkvec,lo,na)==k) THEN !This k-vector is used in LO
ll1 = l*(l+1) + 1 ll1 = l*(l+1) + 1
DO m = -l,l DO m = -l,l
lm = ll1 + m lm = ll1 + m
......
...@@ -86,7 +86,7 @@ CONTAINS ...@@ -86,7 +86,7 @@ CONTAINS
IF (MOD(locol-1,mpi%n_size).EQ.mpi%n_rank) THEN IF (MOD(locol-1,mpi%n_size).EQ.mpi%n_rank) THEN
locol=(locol-1)/mpi%n_size+1 !this is the column in local storage locol=(locol-1)/mpi%n_size+1 !this is the column in local storage
!-t3e !-t3e
k = lapw%kvec(nkvec,lo,ntyp) k = lapw%kvec(nkvec,lo,na)
!---> calculate the overlap matrix elements with the regular !---> calculate the overlap matrix elements with the regular
!---> flapw basis-functions !---> flapw basis-functions
DO kp = 1,lapw%nv(jintsp) DO kp = 1,lapw%nv(jintsp)
...@@ -118,7 +118,7 @@ CONTAINS ...@@ -118,7 +118,7 @@ CONTAINS
blo1(lo)*ud%dulon(lop,ntyp,isp)+& blo1(lo)*ud%dulon(lop,ntyp,isp)+&
clo1(lo)*ud%uloulopn(lop,lo,ntyp,isp))) clo1(lo)*ud%uloulopn(lop,lo,ntyp,isp)))
DO nkvecp = 1,invsfct* (2*lp+1) DO nkvecp = 1,invsfct* (2*lp+1)
kp = lapw%kvec(nkvecp,lop,ntyp) kp = lapw%kvec(nkvecp,lop,na)
lorow=lapw%nv(jintsp)+lapw%index_lo(lop,na)+nkvecp lorow=lapw%nv(jintsp)+lapw%index_lo(lop,na)+nkvecp
dotp = dot_PRODUCT(lapw%gk(:,k,iintsp),lapw%gk(:,kp,jintsp)) dotp = dot_PRODUCT(lapw%gk(:,k,iintsp),lapw%gk(:,kp,jintsp))
IF (smat%l_real) THEN IF (smat%l_real) THEN
...@@ -135,7 +135,7 @@ CONTAINS ...@@ -135,7 +135,7 @@ CONTAINS
!---> calculate the overlap matrix elements of one local !---> calculate the overlap matrix elements of one local
!---> orbital with itself !---> orbital with itself
DO nkvecp = 1,nkvec DO nkvecp = 1,nkvec
kp = lapw%kvec(nkvecp,lo,ntyp) kp = lapw%kvec(nkvecp,lo,na)
lorow=lapw%nv(jintsp)+lapw%index_lo(lo,na)+nkvecp lorow=lapw%nv(jintsp)+lapw%index_lo(lo,na)+nkvecp
dotp = dot_PRODUCT(lapw%gk(:,k,iintsp),lapw%gk(:,kp,jintsp)) dotp = dot_PRODUCT(lapw%gk(:,k,iintsp),lapw%gk(:,kp,jintsp))
IF (smat%l_real) THEN IF (smat%l_real) THEN
......
...@@ -384,6 +384,7 @@ CONTAINS ...@@ -384,6 +384,7 @@ CONTAINS
DO n=1,atoms%ntype DO n=1,atoms%ntype
DO nn=1,atoms%neq(n) DO nn=1,atoms%neq(n)
na=na+1 na=na+1
if (atoms%invsat(na)>1) cycle
!np = MERGE(oneD%ods%ngopr(na),sym%invtab(atoms%ngopr(na)),oneD%odi%d1) !np = MERGE(oneD%ods%ngopr(na),sym%invtab(atoms%ngopr(na)),oneD%odi%d1)
np=sym%invtab(atoms%ngopr(na)) np=sym%invtab(atoms%ngopr(na))
CALL priv_vec_for_lo(atoms,sym,na,n,np,noco,lapw,cell) CALL priv_vec_for_lo(atoms,sym,na,n,np,noco,lapw,cell)
......
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