w90_readwrite_read_lattice Subroutine

public subroutine w90_readwrite_read_lattice(settings, real_lattice, bohr, error, comm)

Uses

  • proc~~w90_readwrite_read_lattice~~UsesGraph proc~w90_readwrite_read_lattice w90_readwrite_read_lattice module~w90_error w90_error proc~w90_readwrite_read_lattice->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
real(kind=dp), intent(out) :: real_lattice(3,3)
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_lattice~~CallsGraph proc~w90_readwrite_read_lattice w90_readwrite_read_lattice proc~set_error_input set_error_input proc~w90_readwrite_read_lattice->proc~set_error_input proc~w90_readwrite_get_keyword_block w90_readwrite_get_keyword_block proc~w90_readwrite_read_lattice->proc~w90_readwrite_get_keyword_block 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_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_lattice~~CalledByGraph proc~w90_readwrite_read_lattice w90_readwrite_read_lattice proc~w90_postw90_readwrite_read w90_postw90_readwrite_read proc~w90_postw90_readwrite_read->proc~w90_readwrite_read_lattice proc~w90_wannier90_readwrite_read_special w90_wannier90_readwrite_read_special proc~w90_wannier90_readwrite_read_special->proc~w90_readwrite_read_lattice proc~input_reader_special input_reader_special proc~input_reader_special->proc~w90_wannier90_readwrite_read_special proc~w90_input_setopt w90_input_setopt proc~w90_input_setopt->proc~w90_wannier90_readwrite_read_special program~postw90 postw90 program~postw90->proc~w90_postw90_readwrite_read proc~w90_input_setopt_f w90_input_setopt_f proc~w90_input_setopt_f->proc~w90_input_setopt program~wannier wannier program~wannier->proc~input_reader_special

Source Code

  subroutine w90_readwrite_read_lattice(settings, real_lattice, bohr, error, comm)
    use w90_error, only: w90_error_type, set_error_input
    implicit none
    real(kind=dp), intent(out) :: real_lattice(3, 3)
    real(kind=dp) :: real_lattice_tmp(3, 3)
    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

    logical :: found

    call w90_readwrite_get_keyword_block(settings, 'unit_cell_cart', found, 3, 3, bohr, error, &
                                         comm, r_value=real_lattice_tmp)
    if (allocated(error)) return
    real_lattice = transpose(real_lattice_tmp)
    if (.not. found) then
      call set_error_input(error, 'Error: Did not find the cell information in the input file', comm)
      return
    end if
  end subroutine w90_readwrite_read_lattice