Commit 62febca6 authored by Matthias Redies's avatar Matthias Redies

Merge branch 'develop' of iffgit.fz-juelich.de:fleur/fleur into develop

parents 807133c6 667e57d0
...@@ -27,16 +27,17 @@ MODULE m_banddos_io ...@@ -27,16 +27,17 @@ MODULE m_banddos_io
CONTAINS CONTAINS
SUBROUTINE openBandDOSFile(fileID, input, atoms, cell, kpts) SUBROUTINE openBandDOSFile(fileID, input, atoms, cell, kpts, banddos)
USE m_types USE m_types
USE hdf5 USE hdf5
USE m_cdn_io USE m_cdn_io
TYPE(t_input), INTENT(IN) :: input TYPE(t_input), INTENT(IN) :: input
TYPE(t_atoms), INTENT(IN) :: atoms TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_cell), INTENT(IN) :: cell TYPE(t_cell), INTENT(IN) :: cell
TYPE(t_kpts), INTENT(IN) :: kpts TYPE(t_kpts), INTENT(IN) :: kpts
TYPE(t_banddos), INTENT(IN) :: banddos
INTEGER(HID_T), INTENT(OUT) :: fileID INTEGER(HID_T), INTENT(OUT) :: fileID
...@@ -67,6 +68,7 @@ MODULE m_banddos_io ...@@ -67,6 +68,7 @@ MODULE m_banddos_io
INTEGER :: hdfError, dimsInt(7) INTEGER :: hdfError, dimsInt(7)
INTEGER :: version INTEGER :: version
INTEGER :: fakeLogical
REAL :: eFermiPrev REAL :: eFermiPrev
LOGICAL :: l_error LOGICAL :: l_error
...@@ -98,6 +100,9 @@ MODULE m_banddos_io ...@@ -98,6 +100,9 @@ MODULE m_banddos_io
CALL h5gcreate_f(fileID, '/general', generalGroupID, hdfError) CALL h5gcreate_f(fileID, '/general', generalGroupID, hdfError)
CALL io_write_attint0(generalGroupID,'spins',input%jspins) CALL io_write_attint0(generalGroupID,'spins',input%jspins)
CALL io_write_attreal0(generalGroupID,'lastFermiEnergy',eFermiPrev) CALL io_write_attreal0(generalGroupID,'lastFermiEnergy',eFermiPrev)
fakeLogical = 0
IF (banddos%unfoldband) fakeLogical = 1
CALL io_write_attint0(generalGroupID,'bandUnfolding',fakeLogical)
CALL h5gclose_f(generalGroupID, hdfError) CALL h5gclose_f(generalGroupID, hdfError)
CALL h5gcreate_f(fileID, '/cell', cellGroupID, hdfError) CALL h5gcreate_f(fileID, '/cell', cellGroupID, hdfError)
...@@ -236,12 +241,14 @@ MODULE m_banddos_io ...@@ -236,12 +241,14 @@ MODULE m_banddos_io
INTEGER(HID_T), INTENT(IN) :: fileID INTEGER(HID_T), INTENT(IN) :: fileID
INTEGER(HID_T) :: eigenvaluesGroupID INTEGER(HID_T) :: eigenvaluesGroupID
INTEGER(HID_T) :: bandUnfoldingGroupID
INTEGER(HID_T) :: eigenvaluesSpaceID, eigenvaluesSetID INTEGER(HID_T) :: eigenvaluesSpaceID, eigenvaluesSetID
INTEGER(HID_T) :: numFoundEigsSpaceID, numFoundEigsSetID INTEGER(HID_T) :: numFoundEigsSpaceID, numFoundEigsSetID
INTEGER(HID_T) :: lLikeChargeSpaceID, lLikeChargeSetID INTEGER(HID_T) :: lLikeChargeSpaceID, lLikeChargeSetID
INTEGER(HID_T) :: jsymSpaceID, jsymSetID INTEGER(HID_T) :: jsymSpaceID, jsymSetID
INTEGER(HID_T) :: ksymSpaceID, ksymSetID INTEGER(HID_T) :: ksymSpaceID, ksymSetID
INTEGER(HID_T) :: bUWeightsSpaceID, bUWeightsSetID
INTEGER :: hdfError, dimsInt(7) INTEGER :: hdfError, dimsInt(7)
...@@ -296,6 +303,20 @@ MODULE m_banddos_io ...@@ -296,6 +303,20 @@ MODULE m_banddos_io
CALL h5gclose_f(eigenvaluesGroupID, hdfError) CALL h5gclose_f(eigenvaluesGroupID, hdfError)
IF (banddos%unfoldband) THEN
CALL h5gcreate_f(fileID, '/bandUnfolding', bandUnfoldingGroupID, hdfError)
dims(:3)=(/neigd,kpts%nkpt,input%jspins/)
dimsInt = dims
CALL h5screate_simple_f(3,dims(:3),bUWeightsSpaceID,hdfError)
CALL h5dcreate_f(bandUnfoldingGroupID, "weights", H5T_NATIVE_DOUBLE, bUWeightsSpaceID, buWeightsSetID, hdfError)
CALL h5sclose_f(bUWeightsSpaceID,hdfError)
CALL io_write_real3(bUWeightsSetID,(/1,1,1/),dimsInt(:3), REAL(results%unfolding_weights(:neigd,:,:)))
CALL h5dclose_f(bUWeightsSetID, hdfError)
CALL h5gclose_f(bandUnfoldingGroupID, hdfError)
END IF
END SUBROUTINE END SUBROUTINE
SUBROUTINE io_write_string1(datasetID,dims,stringLength,dataArray) SUBROUTINE io_write_string1(datasetID,dims,stringLength,dataArray)
......
...@@ -209,17 +209,20 @@ CONTAINS ...@@ -209,17 +209,20 @@ CONTAINS
LOGICAL :: write_to_file=.false. LOGICAL :: write_to_file=.false.
CLASS(t_mat), ALLOCATABLE :: zMat_s CLASS(t_mat), ALLOCATABLE :: zMat_s
CALL build_primitive_cell(banddos,p_cell,cell) ! method_rubel=.true. !this switch is to switch between overlap matrix and rubel method (without overlap matrix)
DO j = 1, lapw%nv(jsp) CALL build_primitive_cell(banddos,p_cell,cell)
DO i = 1, j-1 IF (.not. method_rubel) THEN
IF(smat_unfold%l_real) THEN DO j = 1, lapw%nv(jsp)
smat_unfold%data_r(j,i) = smat_unfold%data_r(i,j) DO i = 1, j-1
ELSE IF(smat_unfold%l_real) THEN
smat_unfold%data_c(j,i) = CONJG(smat_unfold%data_c(i,j)) smat_unfold%data_r(j,i) = smat_unfold%data_r(i,j)
END IF ELSE
END DO smat_unfold%data_c(j,i) = CONJG(smat_unfold%data_c(i,j))
END DO END IF
END DO
END DO
END IF
! write_to_file=.true. ! write_to_file=.true.
IF (write_to_file) THEN IF (write_to_file) THEN
IF (i_kpt==1) THEN IF (i_kpt==1) THEN
...@@ -233,7 +236,6 @@ CONTAINS ...@@ -233,7 +236,6 @@ CONTAINS
! write(222,'(234f15.8)') zMat%data_r ! write(222,'(234f15.8)') zMat%data_r
! write(223,'(234f15.8)') smat_unfold%data_r ! write(223,'(234f15.8)') smat_unfold%data_r
! method_rubel=.true. !this switch is to switch between overlap matrix and rubel method (without overlap matrix)
IF (zmat%l_real) THEN IF (zmat%l_real) THEN
ALLOCATE(w_n(zMat%matsize2)) ALLOCATE(w_n(zMat%matsize2))
......
...@@ -116,7 +116,7 @@ SUBROUTINE cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,& ...@@ -116,7 +116,7 @@ SUBROUTINE cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,&
CALL write_band_sc(kpts,results,eFermiPrev) CALL write_band_sc(kpts,results,eFermiPrev)
END IF END IF
#ifdef CPP_HDF #ifdef CPP_HDF
CALL openBandDOSFile(banddosFile_id,input,atoms,cell,kpts) CALL openBandDOSFile(banddosFile_id,input,atoms,cell,kpts,banddos)
CALL writeBandDOSData(banddosFile_id,input,atoms,cell,kpts,results,banddos,dos,vacuum) CALL writeBandDOSData(banddosFile_id,input,atoms,cell,kpts,results,banddos,dos,vacuum)
CALL closeBandDOSFile(banddosFile_id) CALL closeBandDOSFile(banddosFile_id)
#endif #endif
......
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