Commit 0d3a1275 authored by Matthias Redies's avatar Matthias Redies

replace read_cmt with calc_cmt in symm_hf

parent bbbe0e5a
......@@ -102,6 +102,8 @@ CONTAINS
INTEGER, ALLOCATABLE :: pointer_EIBZ(:)
INTEGER, ALLOCATABLE :: n_q(:)
complex :: c_phase(hybdat%nbands(nk))
REAL :: wl_iks(input%neig, kpts%nkptf)
TYPE(t_mat) :: olap, trafo, invtrafo, ex, tmp, v_x, z
......@@ -147,10 +149,15 @@ CONTAINS
IF (ok /= 0) call judft_error('mhsfock: failure allocation parent')
parent = 0
call z%init(olap%l_real, nbasfcn, hybdat%nbands(nk))
call read_z(atoms, cell, hybdat, kpts, sym, noco, input, nk, jsp, z, c_phase)
CALL timestart("symm_hf")
CALL symm_hf_init(sym, kpts, nk, nsymop, rrot, psym)
CALL symm_hf(kpts, nk, sym, hybdat, eig_irr, input,atoms, mpdata, hybinp, cell, lapw, jsp, &
CALL symm_hf(kpts, nk, sym, hybdat, eig_irr, input,atoms, mpdata, hybinp, cell, lapw,&
noco, oneD, z, c_phase, jsp, &
rrot, nsymop, psym, nkpt_EIBZ, n_q, parent, pointer_EIBZ, nsest, indx_sest)
CALL timestop("symm_hf")
......@@ -188,9 +195,6 @@ CONTAINS
!calculate trafo from wavefunctions to APW basis
IF (input%neig < hybdat%nbands(nk)) call judft_error(' mhsfock: neigd < nbands(nk) ;trafo from wavefunctions to APW requires at least nbands(nk)')
call z%init(olap%l_real, nbasfcn, hybdat%nbands(nk))
call read_z(atoms, cell, hybdat, kpts, sym, noco, input, nk, jsp, z)
call olap%multiply(z, trafo)
CALL invtrafo%alloc(olap%l_real, hybdat%nbands(nk), nbasfcn)
......
......@@ -72,11 +72,12 @@ CONTAINS
END SUBROUTINE symm_hf_init
SUBROUTINE symm_hf(kpts, nk, sym, hybdat, eig_irr, input, atoms, mpdata, hybinp, cell, &
lapw, jsp, rrot, nsymop, psym, nkpt_EIBZ, n_q, parent, &
lapw, noco, oneD, zmat, c_phase, jsp, rrot, nsymop, psym, nkpt_EIBZ, n_q, parent, &
pointer_EIBZ, nsest, indx_sest)
USE m_olap
USE m_trafo
use m_calc_cmt
IMPLICIT NONE
......@@ -90,6 +91,9 @@ CONTAINS
TYPE(t_kpts), INTENT(IN) :: kpts
TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_lapw), INTENT(IN) :: lapw
type(t_noco), intent(in) :: noco
type(t_oneD), intent(in) :: oneD
type(t_mat), intent(in) :: zmat
! - scalars -
INTEGER, INTENT(IN) :: nk
......@@ -98,6 +102,7 @@ CONTAINS
INTEGER, INTENT(IN) :: nsymop
! - arrays -
complex, intent(in) :: c_phase(hybdat%nbands(nk))
INTEGER, INTENT(IN) :: rrot(:, :, :)
INTEGER, INTENT(IN) :: psym(:)
INTEGER, INTENT(INOUT) :: parent(kpts%nkptf)
......@@ -260,8 +265,8 @@ CONTAINS
END DO
! read in cmt and z at current k-point (nk)
CALL read_cmt(cmt, nk)
call calc_cmt(atoms, cell, input, noco, hybinp, hybdat, mpdata, kpts, &
sym, oneD, zmat, jsp, nk, c_phase, cmt)
IF(allocated(olapmt)) deallocate(olapmt)
allocate(olapmt(maxval(mpdata%num_radfun_per_l), maxval(mpdata%num_radfun_per_l), 0:atoms%lmaxd, atoms%ntype), stat=ok)
......
......@@ -141,6 +141,8 @@ SUBROUTINE rdmft(eig_id,mpi,input,kpts,banddos,sliceplot,cell,atoms,enpara,stars
LOGICAL, ALLOCATABLE :: enabledConstraints(:)
complex :: c_phase(input%neig)
#endif
#ifndef CPP_OLDINTEL
......@@ -529,8 +531,12 @@ SUBROUTINE rdmft(eig_id,mpi,input,kpts,banddos,sliceplot,cell,atoms,enpara,stars
CALL lapw%init(input,noco,kpts,atoms,sym,ikpt,cell,l_zref)
parent = 0
CALL zMat%init(olap%l_real,nbasfcn,input%neig)
call read_z(atoms, cell, hybdat, kpts, sym, noco, input, ikpt, jsp, zMat, c_phase)
CALL symm_hf_init(sym,kpts,ikpt,nsymop,rrot,psym)
CALL symm_hf(kpts,ikpt,sym,hybdat,eig_irr,input,atoms,mpdata,hybinp,cell,lapw,jspin,&
CALL symm_hf(kpts,ikpt,sym,hybdat,eig_irr,input,atoms,mpdata,hybinp,cell,lapw,&
noco, oneD, zMat, c_phase,jspin,&
rrot,nsymop,psym,nkpt_EIBZ,n_q,parent,pointer_EIBZ,nsest,indx_sest)
exMat%l_real=sym%invs
......@@ -562,11 +568,8 @@ SUBROUTINE rdmft(eig_id,mpi,input,kpts,banddos,sliceplot,cell,atoms,enpara,stars
olap%data_c = conjg(olap%data_c)
END IF
CALL zMat%init(olap%l_real,nbasfcn,input%neig)
CALL read_eig(eig_id,ikpt,jspin,list=[(i,i=1,hybdat%nbands(ikpt))],neig=nbands,zmat=zMat)
! call read_z(atoms, cell, hybdat, kpts, sym, noco, input, ikpt, jsp, zMat)
zMat%matsize2 = hybdat%nbands(ikpt) ! reduce "visible matsize" for the following computations
CALL olap%multiply(zMat,trafo)
......
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