w90_postw90_common Module

This contains the common variables and procedures needed to set up a Wannier interpolatation calculation for any physical property


Uses

  • module~~w90_postw90_common~~UsesGraph module~w90_postw90_common w90_postw90_common module~w90_constants w90_constants module~w90_postw90_common->module~w90_constants module~w90_error w90_error module~w90_postw90_common->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_constants module~w90_comms->module~w90_error_base

Used by

  • module~~w90_postw90_common~~UsedByGraph module~w90_postw90_common w90_postw90_common proc~berry_get_imfgh_klist berry_get_imfgh_klist proc~berry_get_imfgh_klist->module~w90_postw90_common proc~berry_get_kubo_k berry_get_kubo_k proc~berry_get_kubo_k->module~w90_postw90_common proc~berry_get_sc_klist berry_get_sc_klist proc~berry_get_sc_klist->module~w90_postw90_common proc~berry_get_shc_klist berry_get_shc_klist proc~berry_get_shc_klist->module~w90_postw90_common proc~berry_get_shc_tetrahedron berry_get_shc_tetrahedron proc~berry_get_shc_tetrahedron->module~w90_postw90_common proc~dos_get_levelspacing dos_get_levelspacing proc~dos_get_levelspacing->module~w90_postw90_common proc~dos_main dos_main proc~dos_main->module~w90_postw90_common proc~geninterp_main geninterp_main proc~geninterp_main->module~w90_postw90_common proc~gyrotropic_get_k_list gyrotropic_get_k_list proc~gyrotropic_get_k_list->module~w90_postw90_common proc~gyrotropic_get_noa_k gyrotropic_get_NOA_k proc~gyrotropic_get_noa_k->module~w90_postw90_common proc~k_path k_path proc~k_path->module~w90_postw90_common proc~k_slice k_slice proc~k_slice->module~w90_postw90_common proc~spin_get_moment_k spin_get_moment_k proc~spin_get_moment_k->module~w90_postw90_common proc~spin_get_nk spin_get_nk proc~spin_get_nk->module~w90_postw90_common proc~spin_get_s spin_get_S proc~spin_get_s->module~w90_postw90_common proc~wham_get_d_h_a wham_get_D_h_a proc~wham_get_d_h_a->module~w90_postw90_common proc~wham_get_eig_deleig wham_get_eig_deleig proc~wham_get_eig_deleig->module~w90_postw90_common proc~wham_get_eig_uu_hh_aa_sc wham_get_eig_UU_HH_AA_sc proc~wham_get_eig_uu_hh_aa_sc->module~w90_postw90_common proc~wham_get_eig_uu_hh_aa_sc_tb_conv wham_get_eig_UU_HH_AA_sc_TB_conv proc~wham_get_eig_uu_hh_aa_sc_tb_conv->module~w90_postw90_common proc~wham_get_eig_uu_hh_jjlist wham_get_eig_UU_HH_JJlist proc~wham_get_eig_uu_hh_jjlist->module~w90_postw90_common proc~wham_get_occ_mat_list wham_get_occ_mat_list proc~wham_get_occ_mat_list->module~w90_postw90_common program~postw90 postw90 program~postw90->module~w90_postw90_common

Interfaces

public interface pw90common_kmesh_spacing

  • private function kmesh_spacing_singleinteger(num_points, recip_lattice)

    Set up the value of the interpolation mesh spacing, needed for adaptive smearing [see Eqs. (34-35) YWVS07]. Choose it as the largest of the three Delta_k's for each of the primitive translations b1, b2, and b3

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: num_points
    real(kind=dp), intent(in) :: recip_lattice(3,3)

    Return Value real(kind=dp)

  • private function kmesh_spacing_mesh(mesh, recip_lattice)

    Same as kmesh_spacing_singleinteger, but for a kmesh with three different mesh samplings along the three directions

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in), dimension(3) :: mesh
    real(kind=dp), intent(in) :: recip_lattice(3,3)

    Return Value real(kind=dp)


Functions

private function kmesh_spacing_singleinteger(num_points, recip_lattice)

Set up the value of the interpolation mesh spacing, needed for adaptive smearing [see Eqs. (34-35) YWVS07]. Choose it as the largest of the three Delta_k's for each of the primitive translations b1, b2, and b3

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: num_points
real(kind=dp), intent(in) :: recip_lattice(3,3)

Return Value real(kind=dp)

private function kmesh_spacing_mesh(mesh, recip_lattice)

Same as kmesh_spacing_singleinteger, but for a kmesh with three different mesh samplings along the three directions

Arguments

Type IntentOptional Attributes Name
integer, intent(in), dimension(3) :: mesh
real(kind=dp), intent(in) :: recip_lattice(3,3)

Return Value real(kind=dp)


Subroutines

public subroutine pw90common_wanint_setup(num_wann, print_output, real_lattice, mp_grid, ws_region, ws_distance, effective_model, wigner_seitz, wannier_data, stdout, seedname, timer, error, comm)

Setup data ready for interpolation

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: num_wann
type(print_output_type), intent(in) :: print_output
real(kind=dp), intent(in) :: real_lattice(3,3)
integer, intent(in) :: mp_grid(3)
type(ws_region_type), intent(in) :: ws_region
type(ws_distance_type), intent(inout) :: ws_distance
logical, intent(in) :: effective_model
type(wigner_seitz_type), intent(inout) :: wigner_seitz
type(wannier_data_type), intent(in) :: wannier_data
integer, intent(in) :: stdout
character(len=50), intent(in) :: seedname
type(timer_list_type), intent(inout) :: timer
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine pw90common_wanint_get_kpoint_file(kpoint_dist, error, comm)

read kpoints from kpoint.dat and distribute

Read more…

Arguments

Type IntentOptional Attributes Name
type(kpoint_dist_type), intent(inout) :: kpoint_dist
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine pw90common_wanint_w90_wannier90_readwrite_dist(print_output, ws_region, kmesh_info, kpt_latt, num_kpts, dis_manifold, w90_system, fermi_energy_list, num_bands, num_wann, eigval, mp_grid, real_lattice, pw90_calculation, 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, error, comm)

distribute the parameters across processors NOTE: we only send the ones postw90 uses, not all in w90

Arguments

Type IntentOptional Attributes Name
type(print_output_type), intent(inout) :: print_output
type(ws_region_type), intent(inout) :: ws_region
type(kmesh_info_type), intent(inout) :: kmesh_info
real(kind=dp), intent(inout), allocatable :: kpt_latt(:,:)
integer, intent(inout) :: num_kpts
type(dis_manifold_type), intent(inout) :: dis_manifold
type(w90_system_type), intent(inout) :: w90_system
real(kind=dp), intent(inout), allocatable :: fermi_energy_list(:)
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(pw90_calculation_type), intent(inout) :: pw90_calculation
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(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine pw90common_wanint_data_dist(num_wann, num_kpts, num_bands, u_matrix_opt, u_matrix, dis_manifold, wannier_data, scissors_shift, v_matrix, num_valence_bands, have_disentangled, error, comm)

Distribute the um and chk files

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: num_wann
integer, intent(in) :: num_kpts
integer, intent(in) :: num_bands
complex(kind=dp), intent(inout), allocatable :: u_matrix_opt(:,:,:)
complex(kind=dp), intent(inout), allocatable :: u_matrix(:,:,:)
type(dis_manifold_type), intent(inout) :: dis_manifold
type(wannier_data_type), intent(inout) :: wannier_data
real(kind=dp), intent(in) :: scissors_shift
complex(kind=dp), allocatable :: v_matrix(:,:,:)
integer, intent(in) :: num_valence_bands
logical, intent(inout) :: have_disentangled
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine pw90common_get_occ(ef, eig, occ, num_wann)

Compute the electronic occupancy

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: ef

Fermi level

real(kind=dp), intent(in) :: eig(num_wann)

Eigenvalues

real(kind=dp), intent(out) :: occ(num_wann)

Occupancy of states

integer, intent(in) :: num_wann

public subroutine pw90common_fourier_R_to_k(ws_region, wannier_data, ws_distance, wigner_seitz, OO, OO_R, kpt, real_lattice, mp_grid, alpha, num_wann, error, comm)

For alpha=0: O_ij(R) --> O_ij(k) = sum_R e^{+ik.R}*O_ij(R)

Read more…

Arguments

Type IntentOptional Attributes Name
type(ws_region_type), intent(in) :: ws_region
type(wannier_data_type), intent(in) :: wannier_data
type(ws_distance_type), intent(inout) :: ws_distance
type(wigner_seitz_type), intent(in) :: wigner_seitz
complex(kind=dp), intent(out) :: OO(:,:)
complex(kind=dp), intent(in) :: OO_R(:,:,:)
real(kind=dp), intent(in) :: kpt(3)
real(kind=dp), intent(in) :: real_lattice(3,3)
integer, intent(in) :: mp_grid(3)
integer, intent(in) :: alpha
integer, intent(in) :: num_wann
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine pw90common_fourier_R_to_k_new(ws_region, wannier_data, ws_distance, wigner_seitz, OO_R, kpt, real_lattice, mp_grid, num_wann, error, comm, OO, OO_dx, OO_dy, OO_dz)

For OO: For : where R_{x,y,z} are the Cartesian components of R

Arguments

Type IntentOptional Attributes Name
type(ws_region_type), intent(in) :: ws_region
type(wannier_data_type), intent(in) :: wannier_data
type(ws_distance_type), intent(inout) :: ws_distance
type(wigner_seitz_type), intent(in) :: wigner_seitz
complex(kind=dp), intent(in) :: OO_R(:,:,:)
real(kind=dp), intent(in) :: kpt(3)
real(kind=dp), intent(in) :: real_lattice(3,3)
integer, intent(in) :: mp_grid(3)
integer, intent(in) :: num_wann
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm
complex(kind=dp), intent(out), optional :: OO(:,:)
complex(kind=dp), intent(out), optional :: OO_dx(:,:)
complex(kind=dp), intent(out), optional :: OO_dy(:,:)
complex(kind=dp), intent(out), optional :: OO_dz(:,:)

public subroutine pw90common_fourier_R_to_k_new_second_d(kpt, OO_R, num_wann, ws_region, wannier_data, real_lattice, mp_grid, ws_distance, wigner_seitz, error, comm, OO, OO_da, OO_dadb)

For OO: For : where R_{x,y,z} are the Cartesian components of R For : where R_{xi,yi,zi} are the Cartesian components of R

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: kpt(3)
complex(kind=dp), intent(in) :: OO_R(:,:,:)
integer, intent(in) :: num_wann
type(ws_region_type), intent(in) :: ws_region
type(wannier_data_type), intent(in) :: wannier_data
real(kind=dp), intent(in) :: real_lattice(3,3)
integer, intent(in) :: mp_grid(3)
type(ws_distance_type), intent(inout) :: ws_distance
type(wigner_seitz_type), intent(in) :: wigner_seitz
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm
complex(kind=dp), intent(out), optional :: OO(:,:)
complex(kind=dp), intent(out), optional :: OO_da(:,:,:)
complex(kind=dp), intent(out), optional :: OO_dadb(:,:,:,:)

public subroutine pw90common_fourier_R_to_k_new_second_d_TB_conv(kpt, OO_R, oo_a_R, num_wann, ws_region, wannier_data, real_lattice, mp_grid, ws_distance, wigner_seitz, error, comm, OO, OO_da, OO_dadb)

For OO: For : where R_{x,y,z} are the Cartesian components of R For : where {xi,yi,zi} denote the Cartesian components and

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: kpt(3)
complex(kind=dp), intent(in) :: OO_R(:,:,:)
complex(kind=dp), intent(in) :: oo_a_R(:,:,:,:)
integer, intent(in) :: num_wann
type(ws_region_type), intent(in) :: ws_region
type(wannier_data_type), intent(in) :: wannier_data
real(kind=dp), intent(in) :: real_lattice(3,3)
integer, intent(in) :: mp_grid(3)
type(ws_distance_type), intent(inout) :: ws_distance
type(wigner_seitz_type), intent(in) :: wigner_seitz
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm
complex(kind=dp), intent(out), optional :: OO(:,:)
complex(kind=dp), intent(out), optional :: OO_da(:,:,:)
complex(kind=dp), intent(out), optional :: OO_dadb(:,:,:,:)

public subroutine pw90common_fourier_R_to_k_vec(ws_region, wannier_data, ws_distance, wigner_seitz, OO_R, kpt, real_lattice, mp_grid, num_wann, error, comm, OO_true, OO_pseudo)

For OO_true (true vector):

Arguments

Type IntentOptional Attributes Name
type(ws_region_type), intent(in) :: ws_region
type(wannier_data_type), intent(in) :: wannier_data
type(ws_distance_type), intent(inout) :: ws_distance
type(wigner_seitz_type), intent(in) :: wigner_seitz
complex(kind=dp), intent(in) :: OO_R(:,:,:,:)
real(kind=dp), intent(in) :: kpt(3)
real(kind=dp), intent(in) :: real_lattice(3,3)
integer, intent(in) :: mp_grid(3)
integer, intent(in) :: num_wann
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm
complex(kind=dp), intent(out), optional :: OO_true(:,:,:)
complex(kind=dp), intent(out), optional :: OO_pseudo(:,:,:)

public subroutine pw90common_fourier_R_to_k_vec_dadb(ws_region, wannier_data, ws_distance, wigner_seitz, OO_R, kpt, real_lattice, mp_grid, num_wann, error, comm, OO_da, OO_dadb)

For : For :

Arguments

Type IntentOptional Attributes Name
type(ws_region_type), intent(in) :: ws_region
type(wannier_data_type), intent(in) :: wannier_data
type(ws_distance_type), intent(inout) :: ws_distance
type(wigner_seitz_type), intent(in) :: wigner_seitz
complex(kind=dp), intent(in) :: OO_R(:,:,:,:)
real(kind=dp), intent(in) :: kpt(3)
real(kind=dp), intent(in) :: real_lattice(3,3)
integer, intent(in) :: mp_grid(3)
integer, intent(in) :: num_wann
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm
complex(kind=dp), intent(out), optional :: OO_da(:,:,:)
complex(kind=dp), intent(out), optional :: OO_dadb(:,:,:,:)

public subroutine pw90common_fourier_R_to_k_vec_dadb_TB_conv(ws_region, wannier_data, ws_distance, wigner_seitz, OO_R, kpt, real_lattice, mp_grid, num_wann, error, comm, OO_da, OO_dadb)

For : For :

Arguments

Type IntentOptional Attributes Name
type(ws_region_type), intent(in) :: ws_region
type(wannier_data_type), intent(in) :: wannier_data
type(ws_distance_type), intent(inout) :: ws_distance
type(wigner_seitz_type), intent(in) :: wigner_seitz
complex(kind=dp), intent(in) :: OO_R(:,:,:,:)
real(kind=dp), intent(in) :: kpt(3)
real(kind=dp), intent(in) :: real_lattice(3,3)
integer, intent(in) :: mp_grid(3)
integer, intent(in) :: num_wann
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm
complex(kind=dp), intent(out), optional :: OO_da(:,:,:)
complex(kind=dp), intent(out), optional :: OO_dadb(:,:,:,:)

private subroutine wignerseitz(print_output, real_lattice, mp_grid, ws_region, wigner_seitz, stdout, count_pts, timer, error, comm)

Calculates a grid of lattice vectors r that fall inside (and eventually on the surface of) the Wigner-Seitz supercell centered on the origin of the Bravais superlattice with primitive translations mp_grid(1)a_1, mp_grid(2)a_2, and mp_grid(3)*a_3

Arguments

Type IntentOptional Attributes Name
type(print_output_type), intent(in) :: print_output
real(kind=dp), intent(in) :: real_lattice(3,3)
integer, intent(in) :: mp_grid(3)
type(ws_region_type), intent(in) :: ws_region
type(wigner_seitz_type), intent(inout) :: wigner_seitz
integer, intent(in) :: stdout
logical, intent(in) :: count_pts
type(timer_list_type), intent(inout) :: timer
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

private subroutine wigner_seitz_opt_setup(ws_distance, ws_region, wigner_seitz, num_wann, real_lattice, nrpts, error, comm)

If use_ws_distance = true, get list of all R vectors that appear in irdist_ws and write them to irvec_pw90. Set the index map ir_ind_ws_to_pw90

Read more…

Arguments

Type IntentOptional Attributes Name
type(ws_distance_type), intent(inout) :: ws_distance
type(ws_region_type), intent(in) :: ws_region
type(wigner_seitz_type), intent(inout) :: wigner_seitz
integer, intent(in) :: num_wann
real(kind=dp), intent(in) :: real_lattice(3,3)
integer, intent(in) :: nrpts
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm