Read parameters and calculate derived values
Note on parallelization: this function should be called from the root node only!
| Type | Intent | Optional | 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 |
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 !! !! 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(atom_data_type), intent(inout) :: atom_data type(pw90_berry_mod_type), intent(inout) :: pw90_berry type(pw90_boltzwann_type), intent(inout) :: pw90_boltzwann type(dis_manifold_type), intent(inout) :: 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(kmesh_input_type), intent(inout) :: kmesh_input 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(print_output_type), intent(inout) :: print_output type(pw90_calculation_type), intent(inout) :: pw90_calculation type(pw90_extra_io_type), intent(inout) :: pw90_extra_io type(ws_region_type), intent(inout) :: ws_region type(kpoint_path_type), intent(inout) :: kpoint_path type(pw90_spin_hall_type), intent(inout) :: pw90_spin_hall type(w90_system_type), intent(inout) :: w90_system type(w90_error_type), allocatable, intent(out) :: error type(w90_comm_type), intent(in) :: comm integer, intent(inout) :: mp_grid(3) integer, intent(inout) :: num_bands integer, intent(inout) :: num_kpts integer, intent(inout) :: num_wann integer, intent(inout) :: optimisation integer, intent(in) :: stdout integer, allocatable, intent(inout) :: exclude_bands(:) real(kind=dp), pointer, intent(inout) :: eigval(:, :) real(kind=dp), intent(in) :: bohr real(kind=dp), intent(inout) :: real_lattice(3, 3) real(kind=dp), intent(inout) :: scissors_shift real(kind=dp), allocatable, intent(inout) :: fermi_energy_list(:) real(kind=dp), allocatable, intent(inout) :: kpt_latt(:, :) character(len=*), intent(in) :: seedname logical, intent(inout) :: eig_found logical, intent(inout) :: gamma_only logical, intent(inout) :: effective_model ! local variables real(kind=dp) :: recip_lattice(3, 3), volume integer :: num_exclude_bands logical :: dos_plot logical :: found_fermi_energy logical :: disentanglement, ok, svd_omega character(len=20) :: energy_unit 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_readwrite_read_verbosity(settings, print_output, svd_omega, error, comm) ! svd omega is not used in pw90, but depens on print_output if (allocated(error)) return call w90_readwrite_read_algorithm_control(settings, optimisation, error, comm) if (allocated(error)) return 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(settings, 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 call w90_readwrite_read_num_wann(settings, num_wann, error, comm) if (allocated(error)) return call w90_readwrite_read_exclude_bands(settings, exclude_bands, num_exclude_bands, error, comm) if (allocated(error)) return call w90_readwrite_read_num_bands(settings, effective_model, num_bands, num_wann, error, comm) if (allocated(error)) return disentanglement = (num_bands > num_wann) call w90_readwrite_read_mp_grid(settings, effective_model, mp_grid, num_kpts, error, comm) if (allocated(error)) return call w90_readwrite_read_gamma_only(settings, gamma_only, num_kpts, error, comm) if (allocated(error)) return call w90_readwrite_read_system(settings, w90_system, error, comm) if (allocated(error)) return call w90_readwrite_read_kpath(settings, kpoint_path, ok, .false., error, comm) if (allocated(error)) return call w90_readwrite_read_fermi_energy(settings, found_fermi_energy, fermi_energy_list, & error, comm) if (allocated(error)) return 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) if (allocated(error)) return call w90_readwrite_read_ws_data(settings, ws_region, error, comm) if (allocated(error)) return allocate (eigval(num_bands, num_kpts)) !fixme check allocation success call w90_readwrite_read_eigvals(eig_found, eigval, num_bands, num_kpts, stdout, seedname, & error, comm) if (allocated(error)) return dis_manifold%win_min = -1.0_dp dis_manifold%win_max = 0.0_dp if (eig_found) dis_manifold%win_min = minval(eigval) if (eig_found) dis_manifold%win_max = maxval(eigval) call w90_readwrite_read_dis_manifold(settings, dis_manifold, error, comm) if (allocated(error)) return 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 w90_readwrite_read_lattice(settings, real_lattice, bohr, error, comm) if (allocated(error)) return call w90_readwrite_read_kmesh_data(settings, kmesh_input, error, comm) if (allocated(error)) return call utility_recip_lattice(real_lattice, recip_lattice, volume, error, comm) if (allocated(error)) return call w90_readwrite_read_kpoints(settings, effective_model, kpt_latt, num_kpts, mp_grid, bohr, & 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 call w90_readwrite_read_atoms(settings, atom_data, real_lattice, bohr, error, comm) if (allocated(error)) return end subroutine w90_postw90_readwrite_read