w90_postw90_readwrite Module

Read/write routines specific to postw90.x data types


Uses

  • module~~w90_postw90_readwrite~~UsesGraph module~w90_postw90_readwrite w90_postw90_readwrite module~w90_constants w90_constants module~w90_postw90_readwrite->module~w90_constants module~w90_error w90_error module~w90_postw90_readwrite->module~w90_error module~w90_postw90_types w90_postw90_types module~w90_postw90_readwrite->module~w90_postw90_types module~w90_readwrite w90_readwrite module~w90_postw90_readwrite->module~w90_readwrite module~w90_types w90_types module~w90_postw90_readwrite->module~w90_types 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_postw90_types->module~w90_constants module~w90_postw90_types->module~w90_comms module~w90_readwrite->module~w90_constants module~w90_readwrite->module~w90_types module~w90_readwrite->module~w90_comms module~w90_types->module~w90_constants module~w90_comms->module~w90_constants module~w90_comms->module~w90_error_base

Used by

  • module~~w90_postw90_readwrite~~UsedByGraph module~w90_postw90_readwrite w90_postw90_readwrite program~postw90 postw90 program~postw90->module~w90_postw90_readwrite

Derived Types

type, public ::  pw90_extra_io_type

Components

Type Visibility Attributes Name Initial
real(kind=dp), public :: gyrotropic_freq_min = 0.0_dp
real(kind=dp), public :: gyrotropic_freq_max
real(kind=dp), public :: gyrotropic_freq_step = 0.01_dp
real(kind=dp), public :: kubo_freq_min = 0.0_dp
real(kind=dp), public :: kubo_freq_max
real(kind=dp), public :: kubo_freq_step = 0.01_dp
type(pw90_smearing_type), public :: smear
type(kmesh_spacing_type), public :: global_kmesh
logical, public :: global_kmesh_set = .false.
character(len=4), public :: boltz_2d_dir

Subroutines

public subroutine w90_postw90_readwrite_read(settings, ws_region, w90_system, exclude_bands, print_output, kmesh_input, kpt_latt, num_kpts, dis_manifold, fermi_energy_list, atom_data, num_bands, num_wann, eigval, mp_grid, 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, eig_found, pw90_extra_io, gamma_only, bohr, optimisation, stdout, seedname, error, comm)

Read parameters and calculate derived values

Read more…

Arguments

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

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

type(ws_region_type), intent(inout) :: ws_region
type(w90_system_type), intent(inout) :: w90_system
integer, intent(inout), allocatable :: exclude_bands(:)
type(print_output_type), intent(inout) :: print_output
type(kmesh_input_type), intent(inout) :: kmesh_input
real(kind=dp), intent(inout), allocatable :: kpt_latt(:,:)
integer, intent(inout) :: num_kpts
type(dis_manifold_type), intent(inout) :: dis_manifold
real(kind=dp), intent(inout), allocatable :: fermi_energy_list(:)
type(atom_data_type), intent(inout) :: atom_data
integer, intent(inout) :: num_bands
integer, intent(inout) :: num_wann
real(kind=dp), intent(inout), pointer :: eigval(:,:)
integer, intent(inout) :: mp_grid(3)
real(kind=dp), intent(inout) :: 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
logical, intent(inout) :: eig_found
type(pw90_extra_io_type), intent(inout) :: pw90_extra_io
logical, intent(inout) :: gamma_only
real(kind=dp), intent(in) :: bohr
integer, intent(inout) :: optimisation
integer, intent(in) :: stdout
character(len=*), intent(in) :: seedname
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

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)

Read parameters and calculate derived values

Read more…

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

private subroutine w90_wannier90_readwrite_read_pw90_calcs(settings, pw90_calculation, error, comm)

Arguments

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

private subroutine w90_wannier90_readwrite_read_effective_model(settings, effective_model, error, comm)

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
logical, intent(inout) :: effective_model
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

private subroutine w90_wannier90_readwrite_read_oper(settings, pw90_oper_read, error, comm)

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
type(pw90_oper_read_type), intent(inout) :: pw90_oper_read
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

private subroutine w90_wannier90_readwrite_read_kslice(settings, kslicel, pw90_kslice, error, comm)

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
logical, intent(in) :: kslicel
type(pw90_kslice_mod_type), intent(inout) :: pw90_kslice
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

private subroutine w90_wannier90_readwrite_read_smearing(settings, pw90_smearing, error, comm)

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
type(pw90_smearing_type), intent(inout) :: pw90_smearing
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

private subroutine w90_wannier90_readwrite_read_scissors_shift(settings, scissors_shift, error, comm)

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
real(kind=dp), intent(inout) :: scissors_shift
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

private subroutine w90_wannier90_readwrite_read_pw90spin(settings, spin_moment, spin_decomp, pw90_spin, num_elec_per_state, error, comm)

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
logical, intent(inout) :: spin_moment
logical, intent(inout) :: spin_decomp
type(pw90_spin_mod_type), intent(inout) :: pw90_spin
integer, intent(in) :: num_elec_per_state
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

private subroutine w90_wannier90_readwrite_read_gyrotropic(settings, pw90_gyrotropic, num_wann, smr_fixed_en_width, smr_index, error, comm)

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
type(pw90_gyrotropic_type), intent(out) :: pw90_gyrotropic
integer, intent(in) :: num_wann
real(kind=dp), intent(in) :: smr_fixed_en_width
integer, intent(in) :: smr_index
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

private subroutine w90_wannier90_readwrite_read_berry(settings, pw90_calculation, pw90_berry, pw90_smearing, error, comm)

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
type(pw90_calculation_type), intent(in) :: pw90_calculation
type(pw90_berry_mod_type), intent(inout) :: pw90_berry
type(pw90_smearing_type), intent(in) :: pw90_smearing
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

private subroutine w90_wannier90_readwrite_read_spin_hall(settings, pw90_calculation, scissors_shift, pw90_spin_hall, berry_task, error, comm)

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
type(pw90_calculation_type), intent(in) :: pw90_calculation
real(kind=dp), intent(in) :: scissors_shift
type(pw90_spin_hall_type), intent(inout) :: pw90_spin_hall
character(len=*), intent(in) :: berry_task
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

private subroutine w90_wannier90_readwrite_read_pw90ham(settings, pw90_band_deriv_degen, error, comm)

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
type(pw90_band_deriv_degen_type), intent(inout) :: pw90_band_deriv_degen
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

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

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

private subroutine w90_wannier90_readwrite_read_dos(settings, pw90_calculation, pw90_dos, found_fermi_energy, num_wann, pw90_smearing, dos_plot, error, comm)

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
type(pw90_calculation_type), intent(in) :: pw90_calculation
type(pw90_dos_mod_type), intent(inout) :: pw90_dos
logical, intent(in) :: found_fermi_energy
integer, intent(in) :: num_wann
type(pw90_smearing_type), intent(in) :: pw90_smearing
logical, intent(out) :: dos_plot
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

private subroutine w90_wannier90_readwrite_read_geninterp(settings, pw90_geninterp, error, comm)

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
type(pw90_geninterp_mod_type), intent(inout) :: pw90_geninterp
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

private subroutine w90_wannier90_readwrite_read_boltzwann(settings, pw90_boltzwann, eigval, pw90_smearing, do_boltzwann, boltz_2d_dir, error, comm)

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
type(pw90_boltzwann_type), intent(inout) :: pw90_boltzwann
real(kind=dp), intent(in), pointer :: eigval(:,:)
type(pw90_smearing_type), intent(in) :: pw90_smearing
logical, intent(in) :: do_boltzwann
character(len=4), intent(out) :: boltz_2d_dir
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

private subroutine w90_wannier90_readwrite_read_energy_range(settings, pw90_berry, pw90_dos, pw90_gyrotropic, dis_manifold, fermi_energy_list, eigval, pw90_extra_io, error, comm)

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
type(pw90_berry_mod_type), intent(inout) :: pw90_berry
type(pw90_dos_mod_type), intent(inout) :: pw90_dos
type(pw90_gyrotropic_type), intent(inout) :: pw90_gyrotropic
type(dis_manifold_type), intent(in) :: dis_manifold
real(kind=dp), intent(in), allocatable :: fermi_energy_list(:)
real(kind=dp), intent(in), pointer :: eigval(:,:)
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

private subroutine w90_wannier90_readwrite_read_global_kmesh(settings, global_kmesh_set, kmesh, recip_lattice, error, comm)

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
logical, intent(inout) :: global_kmesh_set
type(kmesh_spacing_type), intent(out) :: kmesh
real(kind=dp), intent(in) :: recip_lattice(3,3)
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

private subroutine w90_wannier90_readwrite_read_local_kmesh(settings, pw90_calculation, pw90_berry, pw90_dos, pw90_spin, pw90_gyrotropic, pw90_boltzwann, recip_lattice, global_kmesh_set, global_kmesh, error, comm)

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
type(pw90_calculation_type), intent(in) :: pw90_calculation
type(pw90_berry_mod_type), intent(inout) :: pw90_berry
type(pw90_dos_mod_type), intent(inout) :: pw90_dos
type(pw90_spin_mod_type), intent(inout) :: pw90_spin
type(pw90_gyrotropic_type), intent(inout) :: pw90_gyrotropic
type(pw90_boltzwann_type), intent(inout) :: pw90_boltzwann
real(kind=dp), intent(in) :: recip_lattice(3,3)
logical, intent(in) :: global_kmesh_set
type(kmesh_spacing_type), intent(in) :: global_kmesh
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

private subroutine get_module_kmesh(settings, recip_lattice, global_kmesh_set, global_kmesh, error, comm, moduleprefix, should_be_defined, module_kmesh)

This function reads and sets the interpolation mesh variables needed by a given module

Read more…

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
real(kind=dp), intent(in) :: recip_lattice(3,3)
logical, intent(in) :: global_kmesh_set
type(kmesh_spacing_type), intent(in) :: global_kmesh
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm
character(len=*), intent(in) :: moduleprefix

The prefix that is appended before the name of the variables. In particular, if the prefix is for instance XXX, the two variables that are read from the input file are XXX_kmesh and XXX_kmesh_spacing.

logical, intent(in) :: should_be_defined

A logical flag: if it is true, at the end the code stops if no value is specified. Define it to .false. if no check should be performed. Often, you can simply pass the flag that activates the module itself.

type(kmesh_spacing_type), intent(inout) :: module_kmesh

the integer array (length 3) where the interpolation mesh will be saved, and the real number on which the min mesh spacing is saved. -1 if it the user specifies in input the mesh and not the mesh_spacing

public subroutine w90_postw90_readwrite_write(print_output, w90_system, fermi_energy_list, atom_data, num_wann, real_lattice, kpoint_path, pw90_calculation, pw90_oper_read, scissors_shift, pw90_spin, pw90_kpath, pw90_kslice, pw90_dos, pw90_berry, pw90_gyrotropic, pw90_geninterp, pw90_boltzwann, pw90_extra_io, optimisation, stdout)

write postw90 parameters to stdout

Arguments

Type IntentOptional Attributes Name
type(print_output_type), intent(in) :: print_output
type(w90_system_type), intent(in) :: w90_system
real(kind=dp), intent(in), allocatable :: fermi_energy_list(:)
type(atom_data_type), intent(in) :: atom_data
integer, intent(in) :: num_wann
real(kind=dp), intent(in) :: real_lattice(3,3)
type(kpoint_path_type), intent(in) :: kpoint_path
type(pw90_calculation_type), intent(in) :: pw90_calculation
type(pw90_oper_read_type), intent(in) :: pw90_oper_read
real(kind=dp), intent(in) :: scissors_shift
type(pw90_spin_mod_type), intent(in) :: pw90_spin
type(pw90_kpath_mod_type), intent(in) :: pw90_kpath
type(pw90_kslice_mod_type), intent(in) :: pw90_kslice
type(pw90_dos_mod_type), intent(in) :: pw90_dos
type(pw90_berry_mod_type), intent(in) :: pw90_berry
type(pw90_gyrotropic_type), intent(in) :: pw90_gyrotropic
type(pw90_geninterp_mod_type), intent(in) :: pw90_geninterp
type(pw90_boltzwann_type), intent(in) :: pw90_boltzwann
type(pw90_extra_io_type), intent(in) :: pw90_extra_io
integer, intent(in) :: optimisation
integer, intent(in) :: stdout

private subroutine w90_postw90_readwrite_dealloc(exclude_bands, wannier_data, kmesh_input, kpt_latt, dis_manifold, fermi_energy_list, atom_data, eigval, kpoint_path, pw90_dos, pw90_berry, proj_input, error, comm)

Arguments

Type IntentOptional Attributes Name
integer, intent(inout), allocatable :: exclude_bands(:)
type(wannier_data_type), intent(inout) :: wannier_data
type(kmesh_input_type), intent(inout) :: kmesh_input
real(kind=dp), intent(inout), allocatable :: kpt_latt(:,:)
type(dis_manifold_type), intent(inout) :: dis_manifold
real(kind=dp), intent(inout), allocatable :: fermi_energy_list(:)
type(atom_data_type), intent(inout) :: atom_data
real(kind=dp), intent(inout), allocatable :: eigval(:,:)
type(kpoint_path_type), intent(inout) :: kpoint_path
type(pw90_dos_mod_type), intent(inout) :: pw90_dos
type(pw90_berry_mod_type), intent(inout) :: pw90_berry
type(proj_type), intent(inout), allocatable :: proj_input(:)
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

private subroutine w90_postw90_readwrite_mem_estimate(mem_param, mem_bw, dis_manifold, do_boltzwann, pw90_boltzwann, spin_decomp, num_wann, stdout)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: mem_param
real(kind=dp), intent(inout) :: mem_bw
type(dis_manifold_type), intent(in) :: dis_manifold
logical, intent(in) :: do_boltzwann
type(pw90_boltzwann_type) :: pw90_boltzwann
logical, intent(in) :: spin_decomp
integer, intent(in) :: num_wann
integer, intent(in) :: stdout

private subroutine parameters_gyro_write_task(task, key, comment, stdout)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: task
character(len=*), intent(in) :: key
character(len=*), intent(in) :: comment
integer, intent(in) :: stdout