w90_postw90_readwrite_readall Subroutine

public subroutine w90_postw90_readwrite_readall(settings, w90_system, dis_manifold, fermi_energy_list, num_bands, num_wann, eigval, real_lattice, kpoint_path, pw90_calculation, pw90_oper_read, scissors_shift, effective_model, pw90_spin, pw90_band_deriv_degen, pw90_kpath, pw90_kslice, pw90_dos, pw90_berry, pw90_spin_hall, pw90_gyrotropic, pw90_geninterp, pw90_boltzwann, pw90_extra_io, error, comm)

Uses

  • proc~~w90_postw90_readwrite_readall~~UsesGraph proc~w90_postw90_readwrite_readall w90_postw90_readwrite_readall module~w90_comms w90_comms proc~w90_postw90_readwrite_readall->module~w90_comms module~w90_error w90_error proc~w90_postw90_readwrite_readall->module~w90_error module~w90_utility w90_utility proc~w90_postw90_readwrite_readall->module~w90_utility 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 module~w90_utility->module~w90_comms module~w90_utility->module~w90_constants

Read parameters and calculate derived values

Note on parallelization: this function should be called from the root node only!

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings

container for input file (.win) data and options set via library interface

type(w90_system_type), intent(in) :: w90_system
type(dis_manifold_type), intent(in) :: dis_manifold
real(kind=dp), intent(in), allocatable :: fermi_energy_list(:)
integer, intent(in) :: num_bands
integer, intent(in) :: num_wann
real(kind=dp), intent(in), pointer :: eigval(:,:)
real(kind=dp), intent(in) :: real_lattice(3,3)
type(kpoint_path_type), intent(inout) :: kpoint_path
type(pw90_calculation_type), intent(inout) :: pw90_calculation
type(pw90_oper_read_type), intent(inout) :: pw90_oper_read
real(kind=dp), intent(inout) :: scissors_shift
logical, intent(inout) :: effective_model
type(pw90_spin_mod_type), intent(inout) :: pw90_spin
type(pw90_band_deriv_degen_type), intent(inout) :: pw90_band_deriv_degen
type(pw90_kpath_mod_type), intent(inout) :: pw90_kpath
type(pw90_kslice_mod_type), intent(inout) :: pw90_kslice
type(pw90_dos_mod_type), intent(inout) :: pw90_dos
type(pw90_berry_mod_type), intent(inout) :: pw90_berry
type(pw90_spin_hall_type), intent(inout) :: pw90_spin_hall
type(pw90_gyrotropic_type), intent(inout) :: pw90_gyrotropic
type(pw90_geninterp_mod_type), intent(inout) :: pw90_geninterp
type(pw90_boltzwann_type), intent(inout) :: pw90_boltzwann
type(pw90_extra_io_type), intent(inout) :: pw90_extra_io
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

Calls

proc~~w90_postw90_readwrite_readall~~CallsGraph proc~w90_postw90_readwrite_readall w90_postw90_readwrite_readall proc~utility_recip_lattice utility_recip_lattice proc~w90_postw90_readwrite_readall->proc~utility_recip_lattice proc~w90_wannier90_readwrite_read_berry w90_wannier90_readwrite_read_berry proc~w90_postw90_readwrite_readall->proc~w90_wannier90_readwrite_read_berry proc~w90_wannier90_readwrite_read_boltzwann w90_wannier90_readwrite_read_boltzwann proc~w90_postw90_readwrite_readall->proc~w90_wannier90_readwrite_read_boltzwann proc~w90_wannier90_readwrite_read_dos w90_wannier90_readwrite_read_dos proc~w90_postw90_readwrite_readall->proc~w90_wannier90_readwrite_read_dos proc~w90_wannier90_readwrite_read_effective_model w90_wannier90_readwrite_read_effective_model proc~w90_postw90_readwrite_readall->proc~w90_wannier90_readwrite_read_effective_model proc~w90_wannier90_readwrite_read_energy_range w90_wannier90_readwrite_read_energy_range proc~w90_postw90_readwrite_readall->proc~w90_wannier90_readwrite_read_energy_range proc~w90_wannier90_readwrite_read_geninterp w90_wannier90_readwrite_read_geninterp proc~w90_postw90_readwrite_readall->proc~w90_wannier90_readwrite_read_geninterp proc~w90_wannier90_readwrite_read_global_kmesh w90_wannier90_readwrite_read_global_kmesh proc~w90_postw90_readwrite_readall->proc~w90_wannier90_readwrite_read_global_kmesh proc~w90_wannier90_readwrite_read_gyrotropic w90_wannier90_readwrite_read_gyrotropic proc~w90_postw90_readwrite_readall->proc~w90_wannier90_readwrite_read_gyrotropic proc~w90_wannier90_readwrite_read_kslice w90_wannier90_readwrite_read_kslice proc~w90_postw90_readwrite_readall->proc~w90_wannier90_readwrite_read_kslice proc~w90_wannier90_readwrite_read_local_kmesh w90_wannier90_readwrite_read_local_kmesh proc~w90_postw90_readwrite_readall->proc~w90_wannier90_readwrite_read_local_kmesh proc~w90_wannier90_readwrite_read_oper w90_wannier90_readwrite_read_oper proc~w90_postw90_readwrite_readall->proc~w90_wannier90_readwrite_read_oper proc~w90_wannier90_readwrite_read_pw90_calcs w90_wannier90_readwrite_read_pw90_calcs proc~w90_postw90_readwrite_readall->proc~w90_wannier90_readwrite_read_pw90_calcs proc~w90_wannier90_readwrite_read_pw90_kpath w90_wannier90_readwrite_read_pw90_kpath proc~w90_postw90_readwrite_readall->proc~w90_wannier90_readwrite_read_pw90_kpath proc~w90_wannier90_readwrite_read_pw90ham w90_wannier90_readwrite_read_pw90ham proc~w90_postw90_readwrite_readall->proc~w90_wannier90_readwrite_read_pw90ham proc~w90_wannier90_readwrite_read_pw90spin w90_wannier90_readwrite_read_pw90spin proc~w90_postw90_readwrite_readall->proc~w90_wannier90_readwrite_read_pw90spin proc~w90_wannier90_readwrite_read_scissors_shift w90_wannier90_readwrite_read_scissors_shift proc~w90_postw90_readwrite_readall->proc~w90_wannier90_readwrite_read_scissors_shift proc~w90_wannier90_readwrite_read_smearing w90_wannier90_readwrite_read_smearing proc~w90_postw90_readwrite_readall->proc~w90_wannier90_readwrite_read_smearing proc~w90_wannier90_readwrite_read_spin_hall w90_wannier90_readwrite_read_spin_hall proc~w90_postw90_readwrite_readall->proc~w90_wannier90_readwrite_read_spin_hall proc~set_error_fatal set_error_fatal proc~utility_recip_lattice->proc~set_error_fatal proc~utility_recip_lattice_base utility_recip_lattice_base proc~utility_recip_lattice->proc~utility_recip_lattice_base proc~set_error_alloc set_error_alloc proc~w90_wannier90_readwrite_read_berry->proc~set_error_alloc proc~set_error_input set_error_input proc~w90_wannier90_readwrite_read_berry->proc~set_error_input proc~w90_readwrite_get_keyword w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_berry->proc~w90_readwrite_get_keyword proc~w90_readwrite_get_keyword_vector w90_readwrite_get_keyword_vector proc~w90_wannier90_readwrite_read_berry->proc~w90_readwrite_get_keyword_vector proc~w90_readwrite_get_range_vector w90_readwrite_get_range_vector proc~w90_wannier90_readwrite_read_berry->proc~w90_readwrite_get_range_vector proc~w90_readwrite_get_smearing_index w90_readwrite_get_smearing_index proc~w90_wannier90_readwrite_read_berry->proc~w90_readwrite_get_smearing_index proc~w90_wannier90_readwrite_read_boltzwann->proc~set_error_input proc~w90_wannier90_readwrite_read_boltzwann->proc~w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_boltzwann->proc~w90_readwrite_get_smearing_index proc~w90_wannier90_readwrite_read_dos->proc~set_error_alloc proc~w90_wannier90_readwrite_read_dos->proc~set_error_input proc~w90_wannier90_readwrite_read_dos->proc~w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_dos->proc~w90_readwrite_get_range_vector proc~w90_wannier90_readwrite_read_dos->proc~w90_readwrite_get_smearing_index proc~w90_wannier90_readwrite_read_effective_model->proc~w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_energy_range->proc~set_error_alloc proc~w90_wannier90_readwrite_read_energy_range->proc~set_error_input proc~w90_wannier90_readwrite_read_energy_range->proc~w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_geninterp->proc~w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_global_kmesh->proc~set_error_input proc~w90_wannier90_readwrite_read_global_kmesh->proc~w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_global_kmesh->proc~w90_readwrite_get_keyword_vector proc~w90_readwrite_get_vector_length w90_readwrite_get_vector_length proc~w90_wannier90_readwrite_read_global_kmesh->proc~w90_readwrite_get_vector_length proc~w90_readwrite_set_kmesh w90_readwrite_set_kmesh proc~w90_wannier90_readwrite_read_global_kmesh->proc~w90_readwrite_set_kmesh proc~w90_wannier90_readwrite_read_gyrotropic->proc~set_error_alloc proc~w90_wannier90_readwrite_read_gyrotropic->proc~set_error_input proc~w90_wannier90_readwrite_read_gyrotropic->proc~w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_gyrotropic->proc~w90_readwrite_get_keyword_vector proc~w90_wannier90_readwrite_read_gyrotropic->proc~w90_readwrite_get_range_vector proc~w90_wannier90_readwrite_read_gyrotropic->proc~w90_readwrite_get_smearing_index proc~w90_wannier90_readwrite_read_kslice->proc~set_error_input proc~w90_wannier90_readwrite_read_kslice->proc~w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_kslice->proc~w90_readwrite_get_keyword_vector proc~w90_wannier90_readwrite_read_kslice->proc~w90_readwrite_get_vector_length proc~get_module_kmesh get_module_kmesh proc~w90_wannier90_readwrite_read_local_kmesh->proc~get_module_kmesh proc~w90_wannier90_readwrite_read_oper->proc~w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_pw90_calcs->proc~w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_pw90_kpath->proc~set_error_input proc~w90_wannier90_readwrite_read_pw90_kpath->proc~w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_pw90ham->proc~w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_pw90spin->proc~set_error_input proc~w90_wannier90_readwrite_read_pw90spin->proc~w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_scissors_shift->proc~w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_smearing->proc~set_error_input proc~w90_wannier90_readwrite_read_smearing->proc~w90_readwrite_get_keyword proc~w90_wannier90_readwrite_read_smearing->proc~w90_readwrite_get_smearing_index proc~w90_wannier90_readwrite_read_spin_hall->proc~set_error_input proc~w90_wannier90_readwrite_read_spin_hall->proc~w90_readwrite_get_keyword proc~get_module_kmesh->proc~set_error_input proc~get_module_kmesh->proc~w90_readwrite_get_keyword proc~get_module_kmesh->proc~w90_readwrite_get_keyword_vector proc~get_module_kmesh->proc~w90_readwrite_get_vector_length proc~get_module_kmesh->proc~w90_readwrite_set_kmesh 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_fatal->proc~comms_sync_error proc~set_error_fatal->proc~set_base_error proc~set_error_input->proc~comms_sync_error proc~set_error_input->proc~set_base_error proc~utility_inv3 utility_inv3 proc~utility_recip_lattice_base->proc~utility_inv3 proc~w90_readwrite_get_keyword->proc~set_error_fatal proc~w90_readwrite_get_keyword->proc~set_error_input proc~w90_readwrite_get_keyword_vector->proc~set_error_fatal proc~w90_readwrite_get_keyword_vector->proc~set_error_input proc~w90_readwrite_get_range_vector->proc~set_error_input proc~w90_readwrite_get_range_vector->proc~w90_readwrite_get_keyword_vector proc~w90_readwrite_get_range_vector->proc~w90_readwrite_get_vector_length proc~w90_readwrite_get_smearing_index->proc~set_error_input proc~w90_readwrite_get_vector_length->proc~set_error_fatal proc~w90_readwrite_get_vector_length->proc~set_error_input

Source Code

  subroutine w90_postw90_readwrite_readall(settings, w90_system, dis_manifold, fermi_energy_list, &
                                           num_bands, num_wann, eigval, real_lattice, kpoint_path, &
                                           pw90_calculation, pw90_oper_read, scissors_shift, &
                                           effective_model, pw90_spin, pw90_band_deriv_degen, &
                                           pw90_kpath, pw90_kslice, pw90_dos, pw90_berry, &
                                           pw90_spin_hall, pw90_gyrotropic, pw90_geninterp, &
                                           pw90_boltzwann, pw90_extra_io, error, comm)
    !================================================!
    !
    !! Read parameters and calculate derived values
    !!
    !! Note on parallelization: this function should be called
    !! from the root node only!
    !!
    !
    !================================================
    use w90_utility, only: utility_recip_lattice
    use w90_error, only: w90_error_type
    use w90_comms, only: w90_comm_type
    implicit none

    ! arguments
    type(settings_type), intent(inout) :: settings
    !! container for input file (.win) data and options set via library interface
    type(pw90_berry_mod_type), intent(inout) :: pw90_berry
    type(pw90_boltzwann_type), intent(inout) :: pw90_boltzwann
    type(dis_manifold_type), intent(in) :: dis_manifold
    type(pw90_dos_mod_type), intent(inout) :: pw90_dos
    type(pw90_geninterp_mod_type), intent(inout) :: pw90_geninterp
    type(pw90_gyrotropic_type), intent(inout) :: pw90_gyrotropic
    type(pw90_kpath_mod_type), intent(inout) :: pw90_kpath
    type(pw90_kslice_mod_type), intent(inout) :: pw90_kslice
    type(pw90_band_deriv_degen_type), intent(inout) :: pw90_band_deriv_degen
    type(pw90_oper_read_type), intent(inout) :: pw90_oper_read
    type(pw90_spin_mod_type), intent(inout) :: pw90_spin
    type(pw90_calculation_type), intent(inout) :: pw90_calculation
    type(pw90_extra_io_type), intent(inout) :: pw90_extra_io
    type(kpoint_path_type), intent(inout) :: kpoint_path
    type(pw90_spin_hall_type), intent(inout) :: pw90_spin_hall
    type(w90_system_type), intent(in) :: w90_system
    type(w90_error_type), allocatable, intent(out) :: error
    type(w90_comm_type), intent(in) :: comm

    integer, intent(in) :: num_bands
    integer, intent(in) :: num_wann

    real(kind=dp), pointer, intent(in) :: eigval(:, :)
    real(kind=dp), intent(in) :: real_lattice(3, 3)
    real(kind=dp), intent(inout) :: scissors_shift
    real(kind=dp), allocatable, intent(in) :: fermi_energy_list(:)

    logical, intent(inout) :: effective_model

    ! local variables
    real(kind=dp) :: recip_lattice(3, 3), volume
    logical :: dos_plot
    logical :: found_fermi_energy
    logical :: disentanglement

    pw90_kslice%corner = 0.0_dp
    pw90_kslice%b1 = [1.0_dp, 0.0_dp, 0.0_dp]
    pw90_kslice%b2 = [0.0_dp, 1.0_dp, 0.0_dp]
    pw90_kslice%kmesh2d = 50
    call w90_wannier90_readwrite_read_pw90_calcs(settings, pw90_calculation, error, comm)
    if (allocated(error)) return
    call w90_wannier90_readwrite_read_effective_model(settings, effective_model, error, comm)
    if (allocated(error)) return
    !call w90_readwrite_read_units(print_output%lenconfac, print_output%length_unit, energy_unit, &
    !                              bohr, error, comm)
    !if (allocated(error)) return
    call w90_wannier90_readwrite_read_oper(settings, pw90_oper_read, error, comm)
    if (allocated(error)) return
    if (allocated(error)) return
    disentanglement = (num_bands > num_wann)
    call w90_wannier90_readwrite_read_kslice(settings, pw90_calculation%kslice, pw90_kslice, &
                                             error, comm)
    if (allocated(error)) return
    call w90_wannier90_readwrite_read_smearing(settings, pw90_extra_io%smear, error, comm)
    if (allocated(error)) return
    call w90_wannier90_readwrite_read_scissors_shift(settings, scissors_shift, error, comm)
    if (allocated(error)) return
    call w90_wannier90_readwrite_read_pw90spin(settings, pw90_calculation%spin_moment, &
                                               pw90_calculation%spin_decomp, pw90_spin, &
                                               w90_system%num_elec_per_state, error, comm)
    if (allocated(error)) return
    call w90_wannier90_readwrite_read_gyrotropic(settings, pw90_gyrotropic, num_wann, &
                                                 pw90_extra_io%smear%fixed_width, &
                                                 pw90_extra_io%smear%type_index, error, comm)
    if (allocated(error)) return
    call w90_wannier90_readwrite_read_berry(settings, pw90_calculation, pw90_berry, &
                                            pw90_extra_io%smear, error, comm)
    if (allocated(error)) return
    call w90_wannier90_readwrite_read_spin_hall(settings, pw90_calculation, scissors_shift, &
                                                pw90_spin_hall, pw90_berry%task, error, comm)
    if (allocated(error)) return
    call w90_wannier90_readwrite_read_pw90ham(settings, pw90_band_deriv_degen, error, comm)
    if (allocated(error)) return
    call w90_wannier90_readwrite_read_pw90_kpath(settings, pw90_calculation, pw90_kpath, &
                                                 kpoint_path, error, comm)
    if (allocated(error)) return
    call w90_wannier90_readwrite_read_dos(settings, pw90_calculation, pw90_dos, &
                                          found_fermi_energy, num_wann, pw90_extra_io%smear, &
                                          dos_plot, error, comm)
    call w90_wannier90_readwrite_read_geninterp(settings, pw90_geninterp, error, comm)
    if (allocated(error)) return
    call w90_wannier90_readwrite_read_boltzwann(settings, pw90_boltzwann, eigval, &
                                                pw90_extra_io%smear, pw90_calculation%boltzwann, &
                                                pw90_extra_io%boltz_2d_dir, error, comm)
    if (allocated(error)) return
    call w90_wannier90_readwrite_read_energy_range(settings, pw90_berry, pw90_dos, &
                                                   pw90_gyrotropic, dis_manifold, &
                                                   fermi_energy_list, eigval, pw90_extra_io, &
                                                   error, comm)
    if (allocated(error)) return
    call utility_recip_lattice(real_lattice, recip_lattice, volume, error, comm)
    if (allocated(error)) return
    call w90_wannier90_readwrite_read_global_kmesh(settings, pw90_extra_io%global_kmesh_set, &
                                                   pw90_extra_io%global_kmesh, recip_lattice, &
                                                   error, comm)
    if (allocated(error)) return
    call w90_wannier90_readwrite_read_local_kmesh(settings, pw90_calculation, pw90_berry, &
                                                  pw90_dos, pw90_spin, pw90_gyrotropic, &
                                                  pw90_boltzwann, recip_lattice, &
                                                  pw90_extra_io%global_kmesh_set, &
                                                  pw90_extra_io%global_kmesh, error, comm)
    if (allocated(error)) return
  end subroutine w90_postw90_readwrite_readall