subroutine w90_wannier90_readwrite_read_outfiles(settings, output_file, num_kpts, &
num_valence_bands, disentanglement, gamma_only, &
error, comm)
!================================================!
use w90_error, only: w90_error_type
implicit none
integer, intent(in) :: num_kpts
integer, intent(in) :: num_valence_bands
logical, intent(in) :: disentanglement, gamma_only
type(output_file_type), intent(inout) :: output_file
type(settings_type), intent(inout) :: settings
type(w90_comm_type), intent(in) :: comm
type(w90_error_type), allocatable, intent(out) :: error
logical :: found, hr_plot
call w90_readwrite_get_keyword(settings, 'write_xyz', found, error, comm, &
l_value=output_file%write_xyz)
if (allocated(error)) return
call w90_readwrite_get_keyword(settings, 'write_r2mn', found, error, comm, &
l_value=output_file%write_r2mn)
if (allocated(error)) return
call w90_readwrite_get_keyword(settings, 'write_proj', found, error, comm, &
l_value=output_file%write_proj)
if (allocated(error)) return
call w90_readwrite_get_keyword(settings, 'write_hr_diag', found, error, comm, &
l_value=output_file%write_hr_diag)
if (allocated(error)) return
hr_plot = .false.
call w90_readwrite_get_keyword(settings, 'hr_plot', found, error, comm, l_value=hr_plot)
if (allocated(error)) return
if (found) then
call set_error_input(error, 'Input parameter hr_plot is no longer used. Please use write_hr instead.', comm)
return
end if
call w90_readwrite_get_keyword(settings, 'write_hr', found, error, comm, &
l_value=output_file%write_hr)
if (allocated(error)) return
call w90_readwrite_get_keyword(settings, 'write_rmn', found, error, comm, &
l_value=output_file%write_rmn)
if (allocated(error)) return
call w90_readwrite_get_keyword(settings, 'write_tb', found, error, comm, &
l_value=output_file%write_tb)
if (allocated(error)) return
call w90_readwrite_get_keyword(settings, 'dump_inputs', found, error, comm, &
l_value=output_file%write_win_ammats)
if (allocated(error)) return
!%%%%%%%%%%%%%%%%
! Other Stuff
!%%%%%%%%%%%%%%%%
! aam: vdW
call w90_readwrite_get_keyword(settings, 'write_vdw_data', found, error, comm, &
l_value=output_file%write_vdw_data)
if (allocated(error)) return
if (output_file%write_vdw_data) then
if ((.not. gamma_only) .or. (num_kpts .ne. 1)) then
call set_error_input(error, 'Error: write_vdw_data may only be used with a single k-point at Gamma', comm)
return
end if
if (disentanglement .and. num_valence_bands <= 0) then
call set_error_input(error, 'If writing vdw data and disentangling then num_valence_bands must be defined', comm)
return
end if
end if
call w90_readwrite_get_keyword(settings, 'write_u_matrices', found, error, comm, &
l_value=output_file%write_u_matrices)
if (allocated(error)) return
call w90_readwrite_get_keyword(settings, 'write_bvec', found, error, comm, &
l_value=output_file%write_bvec)
if (allocated(error)) return
end subroutine w90_wannier90_readwrite_read_outfiles