Commit eeee5a5a authored by Matthias Redies's avatar Matthias Redies

going now now. doesn't compile. don't care

parent b1abe4d7
......@@ -109,7 +109,7 @@ CONTAINS
CALL z%init(olap%l_real, nbasfcn, input%neig)
CALL read_z(hybdat, kpts,nk,jsp,z)
CALL read_z(atoms, cell, mpdata, hybdat, hybinp, kpts, sym, noco, input, lapw, nk, jsp, z)
! calculate exchange contribution of current k-point nk to total energy (te_hfex)
! in the case of a spin-unpolarized calculation the factor 2 is added in eigen.F90
......
......@@ -228,7 +228,7 @@
allocate(carr2(maxval(hybdat%nbands), (atoms%lmaxd + 1)**2))
allocate(carr3(maxval(hybdat%nbands), (atoms%lmaxd + 1)**2))
DO ikpt = 1, nkpti
call read_z(hybdat, kpts,ikpt,jsp,z(ikpt))
call read_z(atoms, cell, mpdata, hybdat, hybinp, kpts, sym, noco, input, lapw, ikpt, jsp, z(ikpt))
END DO
iatom = 0
......
......@@ -258,7 +258,7 @@ CONTAINS
DO ikpt = 1, kpts%nkptf
IF ((kpts%bkp(ikpt) == ikpt0) .AND. (ikpt0 /= ikpt)) THEN
iop = kpts%bksym(ikpt)
CALL waveftrafo_genwavf(cmt, zmat(ikpt0), ikpt0,iop, atoms,&
CALL waveftrafo_genwavf(cmt, zmat(ikpt0), ikpt0, iop, atoms,&
mpdata, hybinp, kpts, sym, jsp, input, &
hybdat%nbands(ikpt0), lapw(ikpt0), lapw(ikpt),cmthlp, zhlp)
......
......@@ -186,7 +186,7 @@ CONTAINS
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, input%neig)
call read_z(hybdat, kpts,nk,jsp,z)
call read_z(atoms, cell, mpdata, hybdat, hybinp, kpts, sym, noco, input, lapw, nk, jsp, z)
z%matsize2 = hybdat%nbands(nk) ! reduce "visible matsize" for the following computations
call olap%multiply(z, trafo)
......
......@@ -104,7 +104,7 @@ CONTAINS
! read in z coefficient from direct access file z at k-point nk
call read_z(hybdat, kpts,nk,jsp,z)
call read_z(atoms, cell, mpdata, hybdat, hybinp, kpts, sym, noco, input, lapw, nk, jsp, z)
! construct local orbital consisting of radial function times spherical harmonic
! where the radial function vanishes on the MT sphere boundary
......@@ -845,7 +845,7 @@ CONTAINS
! read in z coefficients from direct access file z at kpoint nk
call read_z(hybdat, kpts,nk,jsp,z)
call read_z(atoms, cell, mpdata, hybdat, hybinp, kpts, sym, noco, input, lapw, nk, jsp, z)
!CALL intgrf_init(atoms%ntype,atoms%jmtd,atoms%jri,atoms%dx,atoms%rmsh,hybdat%gridf)
gpt(:, 1:lapw%nv(jsp)) = lapw%gvec(:, 1:lapw%nv(jsp), jsp)
......
......@@ -123,8 +123,8 @@ CONTAINS
! read in z at k-point nk and nkqpt
call timestart("read_z")
CALL read_z(hybdat, kpts,nk,jsp,z_nk)
call read_z(hybdat, kpts,nkqpt,jsp,z_kqpt)
CALL read_z(atoms, cell, mpdata, hybdat, hybinp, kpts, sym, noco, input, lapw, nk, jsp, z_nk)
call read_z(atoms, cell, mpdata, hybdat, hybinp, kpts, sym, noco, input, lapw, nkqpt, jsp, z_kqpt)
call timestop("read_z")
g = maxval(abs(lapw%gvec(:, :lapw%nv(jsp), jsp)), dim=2) &
......
......@@ -126,8 +126,8 @@ CONTAINS
! read in z at k-point ik and nkqpt
call timestart("read_z")
call read_z(hybdat, kpts,ik,jsp,z_nk)
call read_z(hybdat, kpts,nkqpt,jsp,z_kqpt)
call read_z(atoms, cell, mpdata, hybdat, hybinp, kpts, sym, noco, input, lapw, ik, jsp, z_nk)
call read_z(atoms, cell, mpdata, hybdat, hybinp, kpts, sym, noco, input, lapw, nkqpt, jsp, z_kqpt)
call timestop("read_z")
g = maxval(abs(lapw%gvec(:,:lapw%nv(jsp), jsp)), dim=2) &
......
......@@ -179,23 +179,50 @@ contains
CALL write_matrix(mat, rec, id_olap)
END subroutine write_olap
subroutine read_z(hybdat, kpts, ik, jsp, mat)
subroutine read_z(atoms, cell, mpdata, hybdat, hybinp, kpts, sym, noco, input, lapw, ik, jsp, z_out)
USE m_eig66_io
use m_types_kpts
implicit none
type(t_atoms), intent(in) :: atoms
type(t_cell), intent(in) :: cell
type(t_mpdata), intent(in) :: mpdata
type(t_hybdat), intent(in) :: hybdat
type(t_hybinp), intent(in) :: hybinp
type(t_kpts), intent(in) :: kpts
type(t_sym), intent(in) :: sym
type(t_noco), intent(in) :: noco
type(t_input), intent(in) :: input
type(t_lapw), intent(in) :: lapw(:)
integer, intent(in) :: ik, jsp
TYPE(t_mat), INTENT(INOUT) :: mat
TYPE(t_mat), INTENT(INOUT) :: z_out
INTEGER :: rec
INTEGER :: ikp, iop
type(t_mat) :: tmp_mat
complex :: cmt(input%neig,hybdat%maxlmindx,atoms%nat)
complex :: cmthlp(input%neig,hybdat%maxlmindx,atoms%nat)
type(t_lapw) :: lapw_ik, lapw_ikp
rec = kpts%nkptf * (jsp - 1) + ik
cmt=0;cmthlp=0
!rec = kpts%nkptf * (jsp - 1) + ik
if(ik <= kpts%nkpt) then
call read_eig(hybdat%eig_id,ik,jsp,zmat=mat)
call read_eig(hybdat%eig_id,ik,jsp,zmat=z_out)
else
CALL read_matrix(mat, rec, id_z)
ikp = kpts%bkp(ik) ! parrent k-point
iop = kpts%bksym(ik) ! connecting symm
call tmp_mat%init(z_out)
call read_eig(hybdat%eig_id,ikp, jsp,zmat=tmp_mat)
CALL lapw_ik%init(input, noco, kpts, atoms, sym, ik, cell, sym%zrfs)
CALL lapw_ikp%init(input, noco, kpts, atoms, sym, ikp, cell, sym%zrfs)
CALL waveftrafo_genwavf(cmt, tmp_mat, ikp, iop, atoms,&
mpdata, hybinp, kpts, sym, jsp, input, &
hybdat%nbands(ikp), lapw(ikp), lapw(ik),cmthlp, z_out)
!CALL read_matrix(mat, rec, id_z)
endif
END subroutine read_z
......
......@@ -564,7 +564,7 @@ SUBROUTINE rdmft(eig_id,mpi,input,kpts,banddos,sliceplot,cell,atoms,enpara,stars
CALL read_eig(eig_id,ikpt,jspin,list=[(i,i=1,hybdat%nbands(ikpt))],neig=nbands,zmat=zMat)
! CALL read_z(hybdat, kpts,ikpt,jsp,zMat)
! CALL read_z(atoms, cell, mpdata, hybdat, hybinp, kpts, sym, noco, input, lapw, 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