w90_wannier90_readwrite_read_outfiles Subroutine

private subroutine w90_wannier90_readwrite_read_outfiles(settings, output_file, num_kpts, num_valence_bands, disentanglement, gamma_only, error, comm)

Uses

  • proc~~w90_wannier90_readwrite_read_outfiles~~UsesGraph proc~w90_wannier90_readwrite_read_outfiles w90_wannier90_readwrite_read_outfiles module~w90_error w90_error proc~w90_wannier90_readwrite_read_outfiles->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(output_file_type), intent(inout) :: output_file
integer, intent(in) :: num_kpts
integer, intent(in) :: num_valence_bands
logical, intent(in) :: disentanglement
logical, intent(in) :: gamma_only
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

Calls

proc~~w90_wannier90_readwrite_read_outfiles~~CallsGraph proc~w90_wannier90_readwrite_read_outfiles w90_wannier90_readwrite_read_outfiles proc~set_error_input set_error_input proc~w90_wannier90_readwrite_read_outfiles->proc~set_error_input proc~w90_readwrite_get_keyword w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_outfiles->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_outfiles~~CalledByGraph proc~w90_wannier90_readwrite_read_outfiles w90_wannier90_readwrite_read_outfiles proc~w90_wannier90_readwrite_read w90_wannier90_readwrite_read proc~w90_wannier90_readwrite_read->proc~w90_wannier90_readwrite_read_outfiles 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_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