Commit 1f33ea5a authored by S.Rost's avatar S.Rost

implementation of unfolding bands a primitive unitcell is created successfully

parent 17b9041e
......@@ -57,7 +57,7 @@ global/enpara.f90 global/chkmt.f90 inpgen/inpgen.f90 inpgen/set_inp.f90 inpgen/i
juDFT/info.F90 juDFT/stop.F90 juDFT/args.F90 juDFT/time.F90 juDFT/init.F90 juDFT/sysinfo.F90 io/w_inpXML.f90 init/julia.f90 global/utility.F90
init/compile_descr.F90 init/kpoints.f90 io/xmlOutput.F90 init/brzone2.f90 cdn/slab_dim.f90 cdn/slabgeom.f90 dos/nstm3.f90 cdn/int_21.f90
cdn/int_21lo.f90 cdn_mt/rhomt21.f90 cdn_mt/rhonmt21.f90 force/force_a21.F90 force/force_a21_lo.f90 force/force_a21_U.f90 force/force_a12.f90
eigen/tlmplm_store.F90)
eigen/tlmplm_store.F90 init/unfoldBandKPTS.f90)
set(fleur_SRC ${fleur_F90} ${fleur_F77})
......
......@@ -57,4 +57,5 @@ init/postprocessInput.F90
init/initParallelProcesses.F90
init/old_inp/fleur_init_old.F90
init/lapw_dim.F90
init/unfoldBandKPTS.f90
)
......@@ -12,6 +12,7 @@ contains
USE m_julia
USE m_kptgen_hybrid
USE m_od_kptsgen
USE m_unfold_band_kpts
implicit none
TYPE(t_input),INTENT(IN) :: input
......@@ -22,6 +23,8 @@ contains
TYPE(t_noco),INTENT(IN) :: noco
TYPE(t_kpts),INTENT(INOUT) :: kpts
LOGICAL,INTENT(IN) :: l_kpts
TYPE(t_kpts) :: p_kpts
TYPE(t_cell) :: p_cell
TYPE(t_sym) :: sym_hlp
......@@ -31,7 +34,43 @@ contains
END IF
END IF
IF (.NOT.l_kpts) THEN
IF (banddos%unfoldband) THEN
CALL unfold_band_kpts(banddos,p_cell,cell,p_kpts,kpts)
IF (.NOT.l_kpts) THEN
IF (.NOT.oneD%odd%d1) THEN
IF (input%l_wann) THEN
sym_hlp=sym
sym_hlp%nop=1
sym_hlp%nop2=1
CALL kptgen_hybrid(p_kpts,sym_hlp%invs,noco%l_soc,sym_hlp%nop,sym_hlp%mrot,sym_hlp%tau)
ELSE IF (.FALSE.) THEN !this was used to generate q-points in jij case
sym_hlp=sym
sym_hlp%nop=1
sym_hlp%nop2=1
CALL julia(sym_hlp,p_cell,input,noco,banddos,p_kpts,.FALSE.,.TRUE.)
ELSE IF (kpts%l_gamma.and.(banddos%ndir.eq.0)) THEN
CALL kptgen_hybrid(p_kpts,sym%invs,noco%l_soc,sym%nop,sym%mrot,sym%tau)
ELSE
CALL julia(sym,p_cell,input,noco,banddos,p_kpts,.FALSE.,.TRUE.)
END IF
ELSE
CALL juDFT_error('Error: No kpoint set generation for 1D systems yet!', calledby = 'kpoints')
CALL od_kptsgen (kpts%nkpt)
END IF
END IF
!Rescale weights and kpoints
p_kpts%wtkpt(:) = p_kpts%wtkpt(:) / sum(p_kpts%wtkpt)
p_kpts%bk(:,:) = p_kpts%bk(:,:) / p_kpts%posScale
p_kpts%posScale = 1.0
IF (p_kpts%nkpt3(3).EQ.0) p_kpts%nkpt3(3) = 1
CALL find_supercell_kpts(banddos,p_cell,cell,p_kpts,kpts)
ELSE
IF (.NOT.l_kpts) THEN
IF (.NOT.oneD%odd%d1) THEN
IF (input%l_wann) THEN
sym_hlp=sym
......@@ -52,7 +91,7 @@ contains
CALL juDFT_error('Error: No kpoint set generation for 1D systems yet!', calledby = 'kpoints')
CALL od_kptsgen (kpts%nkpt)
END IF
END IF
END IF
!Rescale weights and kpoints
......@@ -60,6 +99,7 @@ contains
kpts%bk(:,:) = kpts%bk(:,:) / kpts%posScale
kpts%posScale = 1.0
IF (kpts%nkpt3(3).EQ.0) kpts%nkpt3(3) = 1
END IF
end subroutine kpoints
end module m_kpoints
MODULE m_unfold_band_kpts
CONTAINS
SUBROUTINE unfold_band_kpts(banddos,p_cell,cell,p_kpts,kpts)
USE m_types
USE m_inv3
USE m_constants, ONLY : tpi_const
implicit none
TYPE(t_banddos),INTENT(IN) :: banddos
TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_cell),INTENT(INOUT) :: p_cell
TYPE(t_kpts),INTENT(INOUT) :: p_kpts
TYPE(t_kpts),INTENT(INOUT) :: kpts
INTEGER :: i
DO i =1,3
p_cell%amat(1,i)=cell%amat(1,i)/banddos%s_cell_x
p_cell%amat(2,i)=cell%amat(2,i)/banddos%s_cell_y
p_cell%amat(3,i)=cell%amat(3,i)/banddos%s_cell_z
END DO
CALL inv3(p_cell%amat,p_cell%bmat,p_cell%omtil)
p_cell%bmat=p_cell%bmat*tpi_const
p_cell%latnam=cell%latnam
p_kpts=kpts
write(1088,*) 'banddos%unfoldband: ', banddos%unfoldband
write(1088,*) 'brav. matrix: '
write(1088,'(3f15.8)') cell%amat
write(1088,*) 'brav. rez. matrix: '
write(1088,'(3f15.8)') cell%bmat
write(1088,*) ' primitive brav. matrix: '
write(1088,'(3f15.8)') p_cell%amat
write(1088,*) 'primitive brav. rez. matrix: '
write(1088,'(3f15.8)') p_cell%bmat
write(1088,'(a,i7,a,i7)') 'kpts%nkpt',kpts%nkpt,' p_kpts%nkpt',p_kpts%nkpt
END SUBROUTINE unfold_band_kpts
SUBROUTINE find_supercell_kpts(banddos,p_cell,cell,p_kpts,kpts)
USE m_types
USE m_juDFT
implicit none
TYPE(t_banddos),INTENT(IN) :: banddos
TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_cell),INTENT(IN) :: p_cell
TYPE(t_kpts),INTENT(IN) :: p_kpts
TYPE(t_kpts),INTENT(INOUT) :: kpts
CALL juDFT_error('Not yet implemented', calledby='find_supercell_kpts')
END SUBROUTINE find_supercell_kpts
END MODULE m_unfold_band_kpts
......@@ -136,7 +136,7 @@
atoms%ulo_der = 0
ch_rw = 'w'
sym%namgrp= 'any '
banddos%dos = .false. ; banddos%l_mcd = .false. ; input%secvar = .false.
banddos%dos = .false. ; banddos%l_mcd = .false. ; banddos%unfoldband = .FALSE. ; input%secvar = .false.
input%vchk = .false. ; input%cdinf = .false.
input%l_bmt= .false. ; input%eonly = .false.
input%gauss= .false. ; input%tria = .false.
......
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