diff --git a/src/parameters.F90 b/src/parameters.F90 index 23ab9e188..d1f187433 100644 --- a/src/parameters.F90 +++ b/src/parameters.F90 @@ -36,7 +36,7 @@ module w90_parameters !! Read the wvfn from fortran formatted file logical, public, save :: spn_formatted !! Read the spin from fortran formatted file - logical, public, save :: berry_uHu_formatted + logical, public, save :: uHu_formatted !! Read the uHu from fortran formatted file integer, public, save :: spin !! Spin up=1 down=2 @@ -545,8 +545,8 @@ subroutine param_read ( ) spn_formatted = .false. ! formatted or "binary" file call param_get_keyword('spn_formatted',found,l_value=spn_formatted) - berry_uHu_formatted = .false. ! formatted or "binary" file - call param_get_keyword('berry_uHu_formatted',found,l_value=berry_uHu_formatted) + uHu_formatted = .false. ! formatted or "binary" file + call param_get_keyword('uhu_formatted',found,l_value=uHu_formatted) spin=1 call param_get_keyword('spin',found,c_value=spin_str) @@ -2613,6 +2613,11 @@ subroutine param_postw90_write else write(stdout,'(1x,a46,7x,a11,13x,a1)') '| Spn file-type :','unformatted','|' endif + if(uHu_formatted) then + write(stdout,'(1x,a46,9x,a9,13x,a1)') '| uHu file-type :','formatted','|' + else + write(stdout,'(1x,a46,7x,a11,13x,a1)') '| uHu file-type :','unformatted','|' + endif end if if (size(fermi_energy_list) == 1) then @@ -5428,7 +5433,7 @@ subroutine param_dist call comms_bcast(length_unit,1) call comms_bcast(wvfn_formatted,1) call comms_bcast(spn_formatted,1) - call comms_bcast(berry_uHu_formatted,1) + call comms_bcast(uHu_formatted,1) call comms_bcast(spin,1) call comms_bcast(num_dump_cycles,1) call comms_bcast(num_print_cycles,1) diff --git a/src/postw90/get_oper.F90 b/src/postw90/get_oper.F90 index 73dbd0c2f..81ef73a22 100644 --- a/src/postw90/get_oper.F90 +++ b/src/postw90/get_oper.F90 @@ -669,7 +669,7 @@ subroutine get_CC_R use w90_parameters, only : num_kpts,nntot,nnlist,num_wann,& num_bands,ndimwin,wb,bk,& have_disentangled,timing_level,& - scissors_shift, berry_uHu_formatted + scissors_shift, uHu_formatted use w90_postw90_common, only : nrpts,v_matrix use w90_io, only : stdout,io_error,io_stopwatch,io_file_unit,& seedname @@ -713,7 +713,7 @@ subroutine get_CC_R enddo uHu_in=io_file_unit() - if (berry_uHu_formatted) then + if (uHu_formatted) then open(unit=uHu_in, file=trim(seedname)//".uHu",form='formatted',& status='old',action='read',err=105) write(stdout,'(/a)',advance='no')& @@ -752,10 +752,10 @@ subroutine get_CC_R ! Read from .uHu file the matrices ! between the original ab initio eigenstates ! - if (berry_uHu_formatted) then + if (uHu_formatted) then do m=1,num_bands do n=1,num_bands - read(uHu_in,'(2ES20.10)',err=106,end=106) c_real,c_img + read(uHu_in,*,err=106,end=106) c_real,c_img Ho_qb1_q_qb2(n,m) = cmplx(c_real,c_img,dp) end do end do