subroutine w90_wannier90_readwrite_read_one_dim(settings, w90_calculation, band_plot, &
real_space_ham, tran_read_ht, error, comm)
!================================================!
use w90_error, only: w90_error_type
implicit none
logical, intent(in) :: tran_read_ht
type(band_plot_type), intent(in) :: band_plot
type(real_space_ham_type), intent(inout) :: real_space_ham
type(settings_type), intent(inout) :: settings
type(w90_calculation_type), intent(in) :: w90_calculation
type(w90_comm_type), intent(in) :: comm
type(w90_error_type), allocatable, intent(out) :: error
logical :: found
character(len=256) :: one_dim_axis
call w90_readwrite_get_keyword(settings, 'one_dim_axis', found, error, comm, c_value=one_dim_axis)
if (allocated(error)) return
if (index(one_dim_axis, 'x') > 0) real_space_ham%one_dim_dir = 1
if (index(one_dim_axis, 'y') > 0) real_space_ham%one_dim_dir = 2
if (index(one_dim_axis, 'z') > 0) real_space_ham%one_dim_dir = 3
if (w90_calculation%transport .and. .not. tran_read_ht .and. &
(real_space_ham%one_dim_dir .eq. 0)) then
call set_error_input(error, 'Error: one_dim_axis not recognised', comm)
return
end if
if (w90_calculation%bands_plot .and. (index(band_plot%mode, 'cut') .ne. 0) .and. &
((real_space_ham%system_dim .ne. 3) .or. &
(index(real_space_ham%dist_cutoff_mode, 'three_dim') .eq. 0)) .and. &
(real_space_ham%one_dim_dir .eq. 0)) then
call set_error_input(error, 'Error: one_dim_axis not recognised', comm)
return
end if
end subroutine w90_wannier90_readwrite_read_one_dim