Commit ae409a52 authored by Matthias Redies's avatar Matthias Redies

Merge branch 'develop' into MetaGGA

parents 6696db5d 00e7f072
......@@ -89,8 +89,7 @@ SUBROUTINE hsfock(nk,atoms,hybrid,lapw,dimension,kpts,jsp,input,hybdat,eig_irr,s
INTEGER :: ikpt,ikpt0
INTEGER :: irec
INTEGER :: irecl_olap,irecl_z,irecl_vx
INTEGER :: maxndb, nbasfcn
INTEGER :: nddb
INTEGER :: nbasfcn
INTEGER :: nsymop
INTEGER :: nkpt_EIBZ
INTEGER :: ncstd
......@@ -98,12 +97,11 @@ SUBROUTINE hsfock(nk,atoms,hybrid,lapw,dimension,kpts,jsp,input,hybdat,eig_irr,s
REAL :: a_ex
! local arrays
INTEGER :: degenerat(hybrid%ne_eig(nk))
INTEGER :: nsest(hybrid%nbands(nk)),indx_sest(hybrid%nbands(nk),hybrid%nbands(nk))
INTEGER :: rrot(3,3,sym%nsym)
INTEGER :: psym(sym%nsym) ! Note: psym is only filled up to index nsymop
INTEGER,ALLOCATABLE :: parent(:),symop(:)
INTEGER,ALLOCATABLE :: parent(:)
INTEGER,ALLOCATABLE :: pointer_EIBZ(:)
INTEGER,ALLOCATABLE :: n_q(:)
......@@ -112,7 +110,6 @@ SUBROUTINE hsfock(nk,atoms,hybrid,lapw,dimension,kpts,jsp,input,hybdat,eig_irr,s
TYPE(t_mat) :: olap,trafo,invtrafo,ex,tmp,v_x,z
COMPLEX :: exch(dimension%neigd,dimension%neigd)
COMPLEX,ALLOCATABLE :: carr(:)
COMPLEX,ALLOCATABLE :: rep_c(:,:,:,:,:)
CALL timestart("total time hsfock")
......@@ -149,18 +146,15 @@ SUBROUTINE hsfock(nk,atoms,hybrid,lapw,dimension,kpts,jsp,input,hybdat,eig_irr,s
IF( nk .eq. 1 .and. jsp .eq. 1 .and. input%imix .gt. 10) CALL system('rm -f broyd*')
! calculate all symmetrie operations, which yield k invariant
ALLOCATE( parent(kpts%nkptf),symop(kpts%nkptf) ,stat=ok)
IF( ok .ne. 0 ) STOP 'mhsfock: failure allocation parent/symop'
parent = 0 ; symop = 0
ALLOCATE(parent(kpts%nkptf), stat=ok)
IF(ok.NE.0) STOP 'mhsfock: failure allocation parent'
parent = 0
CALL timestart("symm_hf")
CALL symm_hf_init(sym,kpts,nk,irank2,nsymop,rrot,psym)
ALLOCATE(rep_c(-hybdat%lmaxcd:hybdat%lmaxcd,-hybdat%lmaxcd:hybdat%lmaxcd,0:hybdat%lmaxcd,nsymop,atoms%nat), stat=ok)
IF(ok.NE.0) STOP 'hsfock: failure allocation rep_c'
CALL symm_hf(kpts,nk,sym,dimension,hybdat,eig_irr,atoms,hybrid,cell,lapw,jsp,mpi,irank2,&
rrot,nsymop,psym,nkpt_EIBZ,n_q,parent,symop,degenerat,pointer_EIBZ,maxndb,nddb,nsest,indx_sest,rep_c)
rrot,nsymop,psym,nkpt_EIBZ,n_q,parent,pointer_EIBZ,nsest,indx_sest)
CALL timestop("symm_hf")
! remove weights(wtkpt) in w_iks
......@@ -178,7 +172,6 @@ SUBROUTINE hsfock(nk,atoms,hybrid,lapw,dimension,kpts,jsp,input,hybdat,eig_irr,s
CALL exchange_valence_hf(nk,kpts,nkpt_EIBZ, sym,atoms,hybrid,cell,dimension,input,jsp,hybdat,mnobd,lapw,&
eig_irr,results,parent,pointer_EIBZ,n_q,wl_iks,it,xcpot,noco,nsest,indx_sest,&
mpi,irank2,isize2,comm,ex)
DEALLOCATE (rep_c)
CALL timestop("valence exchange calculation")
WRITE(1224,'(a,i7)') 'kpoint: ', nk
......
......@@ -72,7 +72,7 @@ END SUBROUTINE symm_hf_init
SUBROUTINE symm_hf(kpts,nk,sym,dimension,hybdat,eig_irr,atoms,hybrid,cell,&
lapw,jsp,mpi,irank2,rrot,nsymop,psym,nkpt_EIBZ,n_q,parent,&
symop,degenerat,pointer_EIBZ,maxndb,nddb,nsest,indx_sest,rep_c)
pointer_EIBZ,nsest,indx_sest)
USE m_constants
USE m_types
......@@ -99,21 +99,16 @@ SUBROUTINE symm_hf(kpts,nk,sym,dimension,hybdat,eig_irr,atoms,hybrid,cell,&
INTEGER,INTENT(IN) :: irank2
INTEGER,INTENT(OUT) :: nkpt_EIBZ
INTEGER,INTENT(IN) :: nsymop
INTEGER,INTENT(OUT) :: maxndb,nddb
! - arrays -
INTEGER,INTENT(IN) :: rrot(3,3,sym%nsym)
INTEGER,INTENT(IN) :: psym(sym%nsym)
INTEGER,INTENT(OUT) :: parent(kpts%nkptf)
INTEGER,INTENT(OUT) :: symop(kpts%nkptf)
INTEGER,INTENT(INOUT) :: degenerat(hybrid%ne_eig(nk))
INTEGER,INTENT(OUT) :: nsest(hybrid%nbands(nk)), indx_sest(hybrid%nbands(nk),hybrid%nbands(nk))
INTEGER,ALLOCATABLE,INTENT(OUT) :: pointer_EIBZ(:)
INTEGER,ALLOCATABLE,INTENT(OUT) :: n_q(:)
REAL,INTENT(IN) :: eig_irr(dimension%neigd,kpts%nkpt)
COMPLEX,INTENT(INOUT) :: rep_c(-hybdat%lmaxcd:hybdat%lmaxcd,-hybdat%lmaxcd:hybdat%lmaxcd,&
0:hybdat%lmaxcd,nsymop,atoms%nat)
! - local scalars -
INTEGER :: ikpt,ikpt1,iop,isym,iisym,m
......@@ -126,6 +121,7 @@ SUBROUTINE symm_hf(kpts,nk,sym,dimension,hybdat,eig_irr,atoms,hybrid,cell,&
INTEGER :: n1,n2,nn
INTEGER :: ndb,ndb1,ndb2
INTEGER :: nrkpt
INTEGER :: maxndb, nddb
REAL :: tolerance,pi
......@@ -135,6 +131,7 @@ SUBROUTINE symm_hf(kpts,nk,sym,dimension,hybdat,eig_irr,atoms,hybrid,cell,&
! - local arrays -
INTEGER :: neqvkpt(kpts%nkptf)
INTEGER :: list(kpts%nkptf)
INTEGER :: degenerat(hybrid%ne_eig(nk))
INTEGER,ALLOCATABLE :: help(:)
REAL :: rotkpt(3),g(3)
......@@ -165,7 +162,6 @@ SUBROUTINE symm_hf(kpts,nk,sym,dimension,hybdat,eig_irr,atoms,hybrid,cell,&
list(i) = i-1
END DO
symop = 0
DO ikpt=2,kpts%nkptf
DO iop=1,nsymop
......@@ -188,7 +184,6 @@ SUBROUTINE symm_hf(kpts,nk,sym,dimension,hybdat,eig_irr,atoms,hybrid,cell,&
list(nrkpt) = 0
neqvkpt(ikpt) = neqvkpt(ikpt) + 1
parent(nrkpt) = ikpt
symop(nrkpt) = psym(iop)
END IF
IF ( all(list .eq. 0) ) EXIT
......@@ -259,7 +254,7 @@ SUBROUTINE symm_hf(kpts,nk,sym,dimension,hybdat,eig_irr,atoms,hybrid,cell,&
degenerat = 1
IF ( irank2 == 0 ) THEN
WRITE(6,'(A,f10.8)') ' Tolerance for determining degenerate states=', tolerance
END IF
END IF
DO i=1,hybrid%nbands(nk)
DO j=i+1,hybrid%nbands(nk)
......@@ -548,9 +543,6 @@ SUBROUTINE symm_hf(kpts,nk,sym,dimension,hybdat,eig_irr,atoms,hybrid,cell,&
cdum = exp(-2*pi*img*dot_product(rotkpt,sym%tau(:,iisym)))* &
& exp( 2*pi*img*dot_product(g,atoms%taual(:,ratom)))
rep_c(:,:,:,iop,iatom) = &
& hybrid%d_wgn2(-hybdat%lmaxcd:hybdat%lmaxcd,-hybdat%lmaxcd:hybdat%lmaxcd,0:hybdat%lmaxcd,isym) * cdum
END DO
END DO
iatom0 = iatom0 + atoms%neq(itype)
......
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