w90_readwrite_read_explicit_kpath Subroutine

public subroutine w90_readwrite_read_explicit_kpath(settings, kpoint_path, ok, bands_plot, bohr, error, comm)

Uses

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

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
type(kpoint_path_type), intent(inout) :: kpoint_path
logical, intent(out) :: ok
logical, intent(in) :: bands_plot
real(kind=dp), intent(in) :: bohr
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

Calls

proc~~w90_readwrite_read_explicit_kpath~~CallsGraph proc~w90_readwrite_read_explicit_kpath w90_readwrite_read_explicit_kpath proc~set_error_alloc set_error_alloc proc~w90_readwrite_read_explicit_kpath->proc~set_error_alloc proc~set_error_dealloc set_error_dealloc proc~w90_readwrite_read_explicit_kpath->proc~set_error_dealloc proc~w90_readwrite_get_block_length w90_readwrite_get_block_length proc~w90_readwrite_read_explicit_kpath->proc~w90_readwrite_get_block_length proc~w90_readwrite_get_keyword_explicit_kpath w90_readwrite_get_keyword_explicit_kpath proc~w90_readwrite_read_explicit_kpath->proc~w90_readwrite_get_keyword_explicit_kpath proc~w90_readwrite_read_explicit_kpath_points w90_readwrite_read_explicit_kpath_points proc~w90_readwrite_read_explicit_kpath->proc~w90_readwrite_read_explicit_kpath_points proc~comms_sync_error comms_sync_error proc~set_error_alloc->proc~comms_sync_error proc~set_base_error set_base_error proc~set_error_alloc->proc~set_base_error proc~set_error_dealloc->proc~comms_sync_error proc~set_error_dealloc->proc~set_base_error proc~set_error_input set_error_input proc~w90_readwrite_get_block_length->proc~set_error_input proc~w90_readwrite_get_keyword_explicit_kpath->proc~set_error_input proc~w90_readwrite_read_explicit_kpath_points->proc~set_error_alloc proc~w90_readwrite_read_explicit_kpath_points->proc~set_error_dealloc proc~w90_readwrite_read_explicit_kpath_points->proc~w90_readwrite_get_block_length proc~w90_readwrite_read_explicit_kpath_points->proc~set_error_input proc~w90_readwrite_get_keyword_block w90_readwrite_get_keyword_block proc~w90_readwrite_read_explicit_kpath_points->proc~w90_readwrite_get_keyword_block proc~set_error_input->proc~comms_sync_error proc~set_error_input->proc~set_base_error proc~w90_readwrite_get_keyword_block->proc~set_error_input proc~set_error_fatal set_error_fatal proc~w90_readwrite_get_keyword_block->proc~set_error_fatal proc~set_error_fatal->proc~comms_sync_error proc~set_error_fatal->proc~set_base_error

Called by

proc~~w90_readwrite_read_explicit_kpath~~CalledByGraph proc~w90_readwrite_read_explicit_kpath w90_readwrite_read_explicit_kpath proc~w90_wannier90_readwrite_read w90_wannier90_readwrite_read proc~w90_wannier90_readwrite_read->proc~w90_readwrite_read_explicit_kpath proc~w90_input_reader~2 w90_input_reader proc~w90_input_reader~2->proc~w90_wannier90_readwrite_read proc~w90_input_setopt w90_input_setopt proc~w90_input_setopt->proc~w90_wannier90_readwrite_read proc~w90_input_reader w90_input_reader proc~w90_input_reader->proc~w90_input_reader~2 proc~w90_input_setopt_f w90_input_setopt_f proc~w90_input_setopt_f->proc~w90_input_setopt program~wannier wannier program~wannier->proc~w90_input_reader~2

Source Code

  subroutine w90_readwrite_read_explicit_kpath(settings, kpoint_path, ok, bands_plot, bohr, error, comm)
    use w90_error, only: w90_error_type, set_error_input, set_error_alloc, set_error_dealloc
    implicit none
    logical, intent(in) :: bands_plot
    type(kpoint_path_type), intent(inout) :: kpoint_path
    logical, intent(out) :: ok
    real(kind=dp), intent(in) :: bohr
    type(w90_error_type), allocatable, intent(out) :: error
    type(w90_comm_type), intent(in) :: comm
    type(settings_type), intent(inout) :: settings

    integer :: ierr, bands_num_spec_points
    logical :: found

    bands_num_spec_points = 0
    call w90_readwrite_get_block_length(settings, 'explicit_kpath_labels', found, bands_num_spec_points, error, comm)
    if (allocated(error)) return
    if (found) then
      ok = .true.
      kpoint_path%bands_kpt_explicit = .true.
!      bands_num_spec_points = i_temp*2
      if (allocated(kpoint_path%labels)) then
        deallocate (kpoint_path%labels, stat=ierr)
        if (ierr /= 0) then
          call set_error_dealloc(error, 'Error deallocating kpoint_path%labels &
          & in w90_readwrite_read_explicit_kpath', comm)
          return
        end if
      end if
      allocate (kpoint_path%labels(bands_num_spec_points), stat=ierr)
      if (ierr /= 0) then
        call set_error_alloc(error, 'Error allocating kpoint_path%labels &
        & in w90_readwrite_read_explicit_kpath', comm)
        return
      end if
      if (allocated(kpoint_path%points)) then
        deallocate (kpoint_path%points, stat=ierr)
        if (ierr /= 0) then
          call set_error_dealloc(error, 'Error deallocating kpoint_path%points &
          & in w90_readwrite_read_explicit_kpath', comm)
          return
        end if
      end if
      allocate (kpoint_path%points(3, bands_num_spec_points), stat=ierr)
      if (ierr /= 0) then
        call set_error_alloc(error, 'Error allocating kpoint_path%points &
        & in w90_readwrite_read_explicit_kpath', comm)
        return
      end if
      call w90_readwrite_get_keyword_explicit_kpath(settings, kpoint_path, error, comm)
      if (allocated(error)) return
      call w90_readwrite_read_explicit_kpath_points(settings, kpoint_path%bands_kpt_frac, bohr, &
                                                    error, comm)
      if (allocated(error)) return
    else
      ok = .false.
    end if
    ! if (bands_plot) then
    !   if (kpoint_path%num_points_first_segment < 0) then
    !     call set_error_input(error, 'Error: bands_num_points must be positive', comm)
    !     return
    !   endif
    ! endif
  end subroutine w90_readwrite_read_explicit_kpath