subroutine w90_wannier90_readwrite_read_dist_cutoff(settings, real_space_ham, error, comm)
!================================================!
use w90_error, only: w90_error_type
implicit none
type(real_space_ham_type), intent(inout) :: real_space_ham
type(settings_type), intent(inout) :: settings
type(w90_comm_type), intent(in) :: comm
type(w90_error_type), allocatable, intent(out) :: error
logical :: found
call w90_readwrite_get_keyword(settings, 'dist_cutoff_mode', found, error, comm, &
c_value=real_space_ham%dist_cutoff_mode)
if (allocated(error)) return
if ((index(real_space_ham%dist_cutoff_mode, 'three_dim') .eq. 0) &
.and. (index(real_space_ham%dist_cutoff_mode, 'two_dim') .eq. 0) &
.and. (index(real_space_ham%dist_cutoff_mode, 'one_dim') .eq. 0)) then
call set_error_input(error, 'Error: dist_cutoff_mode not recognised', comm)
return
end if
call w90_readwrite_get_keyword(settings, 'dist_cutoff', found, error, comm, &
r_value=real_space_ham%dist_cutoff)
if (allocated(error)) return
real_space_ham%dist_cutoff_hc = real_space_ham%dist_cutoff
call w90_readwrite_get_keyword(settings, 'dist_cutoff_hc', found, error, comm, &
r_value=real_space_ham%dist_cutoff_hc)
if (allocated(error)) return
call w90_readwrite_get_keyword(settings, 'hr_cutoff', found, error, comm, &
r_value=real_space_ham%hr_cutoff)
if (allocated(error)) return
call w90_readwrite_get_keyword(settings, 'bands_plot_dim', found, error, comm, &
i_value=real_space_ham%system_dim)
if (allocated(error)) return
end subroutine w90_wannier90_readwrite_read_dist_cutoff