w90_wannier90_readwrite_read_pw90_kpath Subroutine

private subroutine w90_wannier90_readwrite_read_pw90_kpath(settings, pw90_calculation, pw90_kpath, kpoint_path, error, comm)

Uses

  • proc~~w90_wannier90_readwrite_read_pw90_kpath~~UsesGraph proc~w90_wannier90_readwrite_read_pw90_kpath w90_wannier90_readwrite_read_pw90_kpath module~w90_comms w90_comms proc~w90_wannier90_readwrite_read_pw90_kpath->module~w90_comms module~w90_error w90_error proc~w90_wannier90_readwrite_read_pw90_kpath->module~w90_error module~w90_constants w90_constants module~w90_comms->module~w90_constants module~w90_error_base w90_error_base module~w90_comms->module~w90_error_base module~w90_error->module~w90_comms module~w90_error->module~w90_error_base

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
type(pw90_calculation_type), intent(in) :: pw90_calculation
type(pw90_kpath_mod_type), intent(inout) :: pw90_kpath
type(kpoint_path_type), intent(in) :: kpoint_path
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

Calls

proc~~w90_wannier90_readwrite_read_pw90_kpath~~CallsGraph proc~w90_wannier90_readwrite_read_pw90_kpath w90_wannier90_readwrite_read_pw90_kpath proc~set_error_input set_error_input proc~w90_wannier90_readwrite_read_pw90_kpath->proc~set_error_input proc~w90_readwrite_get_keyword w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_pw90_kpath->proc~w90_readwrite_get_keyword proc~comms_sync_error comms_sync_error proc~set_error_input->proc~comms_sync_error proc~set_base_error set_base_error proc~set_error_input->proc~set_base_error proc~w90_readwrite_get_keyword->proc~set_error_input proc~set_error_fatal set_error_fatal proc~w90_readwrite_get_keyword->proc~set_error_fatal proc~set_error_fatal->proc~comms_sync_error proc~set_error_fatal->proc~set_base_error

Called by

proc~~w90_wannier90_readwrite_read_pw90_kpath~~CalledByGraph proc~w90_wannier90_readwrite_read_pw90_kpath w90_wannier90_readwrite_read_pw90_kpath proc~w90_postw90_readwrite_read w90_postw90_readwrite_read proc~w90_postw90_readwrite_read->proc~w90_wannier90_readwrite_read_pw90_kpath proc~w90_postw90_readwrite_readall w90_postw90_readwrite_readall proc~w90_postw90_readwrite_readall->proc~w90_wannier90_readwrite_read_pw90_kpath program~postw90 postw90 program~postw90->proc~w90_postw90_readwrite_read

Source Code

  subroutine w90_wannier90_readwrite_read_pw90_kpath(settings, pw90_calculation, pw90_kpath, &
                                                     kpoint_path, error, comm)
    !================================================!

    use w90_error, only: w90_error_type
    use w90_comms, only: w90_comm_type

    implicit none

    type(pw90_calculation_type), intent(in) :: pw90_calculation
    type(pw90_kpath_mod_type), intent(inout) :: pw90_kpath
    type(kpoint_path_type), intent(in) :: kpoint_path
    type(w90_error_type), allocatable, intent(out) :: error
    type(w90_comm_type), intent(in) :: comm
    type(settings_type), intent(inout) :: settings

    logical :: found

    call w90_readwrite_get_keyword(settings, 'kpath_task', found, error, comm, &
                                   c_value=pw90_kpath%task)
    if (allocated(error)) return
    if (pw90_calculation%kpath .and. index(pw90_kpath%task, 'bands') == 0 .and. &
        index(pw90_kpath%task, 'curv') == 0 .and. &
        index(pw90_kpath%task, 'morb') == 0 .and. &
        index(pw90_kpath%task, 'shc') == 0) then
      call set_error_input(error, 'Error: value of kpath_task not recognised in w90_wannier90_readwrite_read', comm)
      return
    end if
    if (.not. allocated(kpoint_path%labels) .and. pw90_calculation%kpath) then
      call set_error_input(error, 'Error: a kpath plot has been requested but there is no kpoint_path block', comm)
      return
    end if

    call w90_readwrite_get_keyword(settings, 'kpath_num_points', found, error, comm, &
                                   i_value=pw90_kpath%num_points)
    if (allocated(error)) return
    if (pw90_kpath%num_points < 0) then
      call set_error_input(error, 'Error: kpath_num_points must be positive', comm)
      return
    end if

    call w90_readwrite_get_keyword(settings, 'kpath_bands_colour', found, error, comm, &
                                   c_value=pw90_kpath%bands_colour)
    if (allocated(error)) return
    if (pw90_calculation%kpath .and. index(pw90_kpath%bands_colour, 'none') == 0 .and. &
        index(pw90_kpath%bands_colour, 'spin') == 0 .and. &
        index(pw90_kpath%bands_colour, 'shc') == 0) then
      call set_error_input(error, 'Error: value of kpath_bands_colour not recognised in w90_wannier90_readwrite_read', comm)
      return
    end if
    if (pw90_calculation%kpath .and. index(pw90_kpath%task, 'shc') > 0 .and. &
        index(pw90_kpath%task, 'spin') > 0) then
      call set_error_input(error, "Error: kpath_task cannot include both 'shc' and 'spin'", comm)
      return
    end if

  end subroutine w90_wannier90_readwrite_read_pw90_kpath