Commit 83ef2efe authored by S.Rost's avatar S.Rost

gnuplot output for unfolding bands added - bandstructure unfolding works for Si without lo's

parent 6f927e33
......@@ -40,6 +40,8 @@ CONTAINS
USE m_mpi_bc_potden
#endif
USE m_symmetrize_matrix
USE m_unfold_band_kpts !used for unfolding bands
USE m_types_mpimat
IMPLICIT NONE
......@@ -91,6 +93,7 @@ CONTAINS
TYPE(t_lapw) :: lapw
CLASS(t_mat), ALLOCATABLE :: zMat
CLASS(t_mat), ALLOCATABLE :: hmat,smat
CLASS(t_mat), ALLOCATABLE :: smat_unfold !used for unfolding bandstructure
! Variables for HF or hybrid functional calculation
INTEGER :: comm(kpts%nkpt),irank2(kpts%nkpt),isize2(kpts%nkpt)
......@@ -163,6 +166,23 @@ CONTAINS
!Try to symmetrize matrix
CALL symmetrize_matrix(mpi,noco,kpts,nk,hmat,smat)
IF (banddos%unfoldband) THEN
select type(smat)
type is (t_mat)
allocate(t_mat::smat_unfold)
select type(smat_unfold)
type is (t_mat)
smat_unfold=smat
end select
type is (t_mpimat)
allocate(t_mpimat::smat_unfold)
select type(smat_unfold)
type is (t_mpimat)
smat_unfold=smat
end select
end select
END IF
CALL eigen_diag(hmat,smat,nk,jsp,iter,ne_all,eig,zMat)
DEALLOCATE(hmat,smat)
......@@ -187,6 +207,12 @@ CONTAINS
CALL MPI_BARRIER(mpi%MPI_COMM,ierr)
#endif
CALL timestop("EV output")
IF (banddos%unfoldband) THEN
CALL calculate_plot_w_n(banddos,cell,kpts,smat_unfold,zMat,lapw,nk,jsp,eig,results)
DEALLOCATE(smat_unfold)
END IF
END DO k_loop
END DO ! spin loop ends
......
......@@ -7,12 +7,12 @@
MODULE m_bandstr1
use m_juDFT
USE m_types
use m_unfold_band_kpts
!----------------------------------------------------------------------
!----------------------------------------------------------------------
CONTAINS
SUBROUTINE bandstr1(
> idsyst,idtype,bmat,kpts,input,l_fillArrays)
> idsyst,idtype,bmat,kpts,input,l_fillArrays,banddos)
IMPLICIT NONE
TYPE(t_input),INTENT(IN) :: input
......@@ -21,6 +21,7 @@
INTEGER, INTENT (IN) :: idsyst,idtype
REAL, INTENT (IN) :: bmat(3,3)
LOGICAL, INTENT (IN) :: l_fillArrays
TYPE(t_banddos),INTENT(IN) :: banddos
REAL, POINTER :: syp(:,:)
CHARACTER(len=1), POINTER :: ssy(:)
......@@ -110,9 +111,13 @@
CLOSE (41)
END IF
CALL write_gnu(
IF (banddos%unfoldband) THEN
CALL write_gnu_sc(
> nosyp,d,ssy,input)
ELSE
CALL write_gnu(
> nosyp,d,ssy,input)
END IF
DEALLOCATE ( rsyp,syp,del,nk,ssy,d,bkTemp )
END SUBROUTINE bandstr1
......
......@@ -154,7 +154,7 @@
!-------------------- Want to make a Bandstructure ? --------
!
IF (banddos%ndir == -4) THEN
CALL bandstr1(idsyst,idtype,cell%bmat,kpts,input,l_fillArrays)
CALL bandstr1(idsyst,idtype,cell%bmat,kpts,input,l_fillArrays,banddos)
RETURN
ENDIF
!
......
......@@ -64,10 +64,12 @@ contains
END IF
!Rescale weights and kpoints
kpts%wtkpt(:) = kpts%wtkpt(:) / sum(kpts%wtkpt)
kpts%bk(:,:) = kpts%bk(:,:) / kpts%posScale
kpts%posScale = 1.0
IF (kpts%nkpt3(3).EQ.0) kpts%nkpt3(3) = 1
IF (.not.banddos%unfoldband) THEN
kpts%wtkpt(:) = kpts%wtkpt(:) / sum(kpts%wtkpt)
END IF
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
......
This diff is collapsed.
......@@ -29,6 +29,7 @@ MODULE m_types_kpts
REAL ,ALLOCATABLE :: specialPoints(:,:)
INTEGER,ALLOCATABLE :: ntetra(:,:)
REAL ,ALLOCATABLE :: voltet(:)
REAL ,ALLOCATABLE :: sc_list(:,:) !list for all information about folding of bandstructure (need for unfoldBandKPTS)((k(x,y,z),K(x,y,z),m(g1,g2,g3)),(nkpt))
ENDTYPE t_kpts
......
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