w90_wan_ham Module

This module contain operations on the Hamiltonian in the WF basis


Uses

  • module~~w90_wan_ham~~UsesGraph module~w90_wan_ham w90_wan_ham module~w90_constants w90_constants module~w90_wan_ham->module~w90_constants module~w90_error w90_error module~w90_wan_ham->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_wan_ham~~UsedByGraph module~w90_wan_ham w90_wan_ham proc~berry_get_imfgh_klist berry_get_imfgh_klist proc~berry_get_imfgh_klist->module~w90_wan_ham proc~berry_get_kdotp berry_get_kdotp proc~berry_get_kdotp->module~w90_wan_ham proc~berry_get_kubo_k berry_get_kubo_k proc~berry_get_kubo_k->module~w90_wan_ham proc~berry_get_sc_klist berry_get_sc_klist proc~berry_get_sc_klist->module~w90_wan_ham proc~berry_get_shc_klist berry_get_shc_klist proc~berry_get_shc_klist->module~w90_wan_ham proc~calctdfanddos calcTDFandDOS proc~calctdfanddos->module~w90_wan_ham proc~dos_main dos_main proc~dos_main->module~w90_wan_ham proc~geninterp_main geninterp_main proc~geninterp_main->module~w90_wan_ham proc~gyrotropic_get_k_list gyrotropic_get_k_list proc~gyrotropic_get_k_list->module~w90_wan_ham proc~k_slice k_slice proc~k_slice->module~w90_wan_ham

Subroutines

private subroutine wham_get_D_h_a(delHH_a, UU, eig, ef, D_h_a, num_wann)

Compute D^H_a=UU^dag.del_a UU (a=alpha,beta), using Eq.(24) of WYSV06

Arguments

Type IntentOptional Attributes Name
complex(kind=dp), intent(in) :: delHH_a(:,:)
complex(kind=dp), intent(in) :: UU(:,:)
real(kind=dp), intent(in) :: eig(:)
real(kind=dp), intent(in) :: ef
complex(kind=dp), intent(out) :: D_h_a(:,:)
integer, intent(in) :: num_wann

public subroutine wham_get_D_h(delHH, D_h, UU, eig, num_wann)

Compute D^H_a=UU^dag.del_a UU (a=x,y,z) using Eq.(24) of WYSV06

Arguments

Type IntentOptional Attributes Name
complex(kind=dp), intent(in) :: delHH(:,:,:)
complex(kind=dp), intent(out) :: D_h(:,:,:)
complex(kind=dp), intent(in) :: UU(:,:)
real(kind=dp), intent(in) :: eig(:)
integer, intent(in) :: num_wann

public subroutine wham_get_D_h_P_value(pw90_berry, delHH, D_h, UU, eig, num_wann)

Compute D^H_a=UU^dag.del_a UU (a=x,y,z) using Eq.(24) of WYSV06

Arguments

Type IntentOptional Attributes Name
type(pw90_berry_mod_type), intent(in) :: pw90_berry
complex(kind=dp), intent(in) :: delHH(:,:,:)
complex(kind=dp), intent(out) :: D_h(:,:,:)
complex(kind=dp), intent(in) :: UU(:,:)
real(kind=dp), intent(in) :: eig(:)
integer, intent(in) :: num_wann

private subroutine wham_get_JJp_JJm_list(delHH, UU, eig, JJp_list, JJm_list, num_wann, fermi_energy_list, occ)

Arguments

Type IntentOptional Attributes Name
complex(kind=dp), intent(inout) :: delHH(:,:)
complex(kind=dp), intent(in) :: UU(:,:)
real(kind=dp), intent(in) :: eig(:)
complex(kind=dp), intent(out) :: JJp_list(:,:,:)
complex(kind=dp), intent(out) :: JJm_list(:,:,:)
integer, intent(in) :: num_wann
real(kind=dp), intent(in), allocatable :: fermi_energy_list(:)
real(kind=dp), intent(in), optional, dimension(:) :: occ

public subroutine wham_get_occ_mat_list(fermi_energy_list, f_list, g_list, UU, num_wann, error, comm, eig, occ)

Occupation matrix f, and g=1-f for a list of Fermi energies

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in), allocatable :: fermi_energy_list(:)
complex(kind=dp), intent(out) :: f_list(:,:,:)
complex(kind=dp), intent(out) :: g_list(:,:,:)
complex(kind=dp), intent(in) :: UU(:,:)
integer, intent(in) :: num_wann
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm
real(kind=dp), intent(in), optional :: eig(:)
real(kind=dp), intent(in), optional :: occ(:)

private subroutine wham_get_deleig_a(deleig_a, eig, delHH_a, UU, num_wann, pw90_band_deriv_degen, error, comm)

Band derivatives dE/dk_a

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(out) :: deleig_a(num_wann)
real(kind=dp), intent(in) :: eig(num_wann)
complex(kind=dp), intent(in) :: delHH_a(:,:)
complex(kind=dp), intent(in) :: UU(:,:)
integer, intent(in) :: num_wann
type(pw90_band_deriv_degen_type), intent(in) :: pw90_band_deriv_degen
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine wham_get_eig_deleig(dis_manifold, kpt_latt, pw90_band_deriv_degen, ws_region, print_output, wannier_data, ws_distance, wigner_seitz, delHH, HH, HH_R, u_matrix, UU, v_matrix, del_eig, eig, eigval, kpt, real_lattice, scissors_shift, mp_grid, num_bands, num_kpts, num_wann, num_valence_bands, effective_model, have_disentangled, seedname, stdout, timer, error, comm)

Given a k point, this function returns eigenvalues E and derivatives of the eigenvalues dE/dk_a, using wham_get_deleig_a

Arguments

Type IntentOptional Attributes Name
type(dis_manifold_type), intent(in) :: dis_manifold
real(kind=dp), intent(in) :: kpt_latt(:,:)
type(pw90_band_deriv_degen_type), intent(in) :: pw90_band_deriv_degen
type(ws_region_type), intent(in) :: ws_region
type(print_output_type), intent(in) :: print_output
type(wannier_data_type), intent(in) :: wannier_data
type(ws_distance_type), intent(inout) :: ws_distance
type(wigner_seitz_type), intent(inout) :: wigner_seitz
complex(kind=dp), intent(out) :: delHH(:,:,:)

the delHH matrix (derivative of H) at kpt

complex(kind=dp), intent(out) :: HH(:,:)

the Hamiltonian matrix at kpt

complex(kind=dp), intent(inout), allocatable :: HH_R(:,:,:)
complex(kind=dp), intent(in) :: u_matrix(:,:,:)
complex(kind=dp), intent(out) :: UU(:,:)

the rotation matrix that gives the eigenvectors of HH

complex(kind=dp), intent(in) :: v_matrix(:,:,:)
real(kind=dp), intent(out) :: del_eig(num_wann,3)

the calculated derivatives of the eigenvalues at kpt [first component: band; second component: 1,2,3 for the derivatives along the three k directions]

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

the calculated eigenvalues at kpt

real(kind=dp), intent(in) :: eigval(:,:)
real(kind=dp), intent(in) :: kpt(3)

the three coordinates of the k point vector (in relative coordinates)

real(kind=dp), intent(in) :: real_lattice(3,3)
real(kind=dp), intent(in) :: scissors_shift
integer, intent(in) :: mp_grid(3)
integer, intent(in) :: num_bands
integer, intent(in) :: num_kpts
integer, intent(in) :: num_wann
integer, intent(in) :: num_valence_bands
logical, intent(in) :: effective_model
logical, intent(in) :: have_disentangled
character(len=50), intent(in) :: seedname
integer, intent(in) :: stdout
type(timer_list_type), intent(inout) :: timer
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine wham_get_eig_deleig_TB_conv(pw90_band_deriv_degen, delHH, UU, eig, del_eig, num_wann, error, comm)

Given a k point, this function returns eigenvalues E and derivatives of the eigenvalues dE/dk_a, using wham_get_deleig_a

Arguments

Type IntentOptional Attributes Name
type(pw90_band_deriv_degen_type), intent(in) :: pw90_band_deriv_degen
complex(kind=dp), intent(in) :: delHH(:,:,:)

the delHH matrix (derivative of H) at kpt

complex(kind=dp), intent(in) :: UU(:,:)

the rotation matrix that gives the eigenvectors of HH

real(kind=dp), intent(in) :: eig(num_wann)
real(kind=dp), intent(out) :: del_eig(num_wann,3)
integer, intent(in) :: num_wann
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine wham_get_eig_UU_HH_JJlist(dis_manifold, fermi_energy_list, kpt_latt, ws_region, print_output, wannier_data, ws_distance, wigner_seitz, HH, HH_R, JJm_list, JJp_list, u_matrix, UU, v_matrix, eig, eigval, kpt, real_lattice, scissors_shift, mp_grid, num_bands, num_kpts, num_wann, num_valence_bands, effective_model, have_disentangled, seedname, stdout, timer, error, comm, occ)

Wrapper routine used to reduce number of Fourier calls

Arguments

Type IntentOptional Attributes Name
type(dis_manifold_type), intent(in) :: dis_manifold
real(kind=dp), intent(in), allocatable :: fermi_energy_list(:)
real(kind=dp), intent(in) :: kpt_latt(:,:)
type(ws_region_type), intent(in) :: ws_region
type(print_output_type), intent(in) :: print_output
type(wannier_data_type), intent(in) :: wannier_data
type(ws_distance_type), intent(inout) :: ws_distance
type(wigner_seitz_type), intent(inout) :: wigner_seitz
complex(kind=dp), intent(out) :: HH(:,:)
complex(kind=dp), intent(inout), allocatable :: HH_R(:,:,:)
complex(kind=dp), intent(out) :: JJm_list(:,:,:,:)
complex(kind=dp), intent(out) :: JJp_list(:,:,:,:)
complex(kind=dp), intent(in) :: u_matrix(:,:,:)
complex(kind=dp), intent(out) :: UU(:,:)
complex(kind=dp), intent(in) :: v_matrix(:,:,:)
real(kind=dp), intent(out) :: eig(:)
real(kind=dp), intent(in) :: eigval(:,:)
real(kind=dp), intent(in) :: kpt(3)
real(kind=dp), intent(in) :: real_lattice(3,3)
real(kind=dp), intent(in) :: scissors_shift
integer, intent(in) :: mp_grid(3)
integer, intent(in) :: num_bands
integer, intent(in) :: num_kpts
integer, intent(in) :: num_wann
integer, intent(in) :: num_valence_bands
logical, intent(in) :: effective_model
logical, intent(in) :: have_disentangled
character(len=50), intent(in) :: seedname
integer, intent(in) :: stdout
type(timer_list_type), intent(inout) :: timer
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm
real(kind=dp), intent(in), optional :: occ(:)

public subroutine wham_get_eig_UU_HH_AA_sc_TB_conv(pw90_berry, dis_manifold, kmesh_info, kpt_latt, ws_region, print_output, wannier_data, ws_distance, wigner_seitz, AA_R, HH, HH_da, HH_dadb, HH_R, u_matrix, UU, v_matrix, eig, eigval, kpt, real_lattice, scissors_shift, mp_grid, num_bands, num_kpts, num_wann, num_valence_bands, effective_model, have_disentangled, seedname, stdout, timer, error, comm)

Arguments

Type IntentOptional Attributes Name
type(pw90_berry_mod_type), intent(in) :: pw90_berry
type(dis_manifold_type), intent(in) :: dis_manifold
type(kmesh_info_type), intent(in) :: kmesh_info
real(kind=dp), intent(in) :: kpt_latt(:,:)
type(ws_region_type), intent(in) :: ws_region
type(print_output_type), intent(in) :: print_output
type(wannier_data_type), intent(in) :: wannier_data
type(ws_distance_type), intent(inout) :: ws_distance
type(wigner_seitz_type), intent(inout) :: wigner_seitz
complex(kind=dp), intent(inout), allocatable :: AA_R(:,:,:,:)
complex(kind=dp), intent(out) :: HH(:,:)
complex(kind=dp), intent(out) :: HH_da(:,:,:)
complex(kind=dp), intent(out) :: HH_dadb(:,:,:,:)
complex(kind=dp), intent(inout), allocatable :: HH_R(:,:,:)
complex(kind=dp), intent(in) :: u_matrix(:,:,:)
complex(kind=dp), intent(out) :: UU(:,:)
complex(kind=dp), intent(in) :: v_matrix(:,:,:)
real(kind=dp), intent(out) :: eig(num_wann)
real(kind=dp), intent(in) :: eigval(:,:)
real(kind=dp), intent(in) :: kpt(3)
real(kind=dp), intent(in) :: real_lattice(3,3)
real(kind=dp), intent(in) :: scissors_shift
integer, intent(in) :: mp_grid(3)
integer, intent(in) :: num_bands
integer, intent(in) :: num_kpts
integer, intent(in) :: num_wann
integer, intent(in) :: num_valence_bands
logical, intent(in) :: effective_model
logical, intent(in) :: have_disentangled
character(len=50), intent(in) :: seedname
integer, intent(in) :: stdout
type(timer_list_type), intent(inout) :: timer
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine wham_get_eig_UU_HH_AA_sc(dis_manifold, kpt_latt, ws_region, print_output, wannier_data, ws_distance, wigner_seitz, HH, HH_da, HH_dadb, HH_R, u_matrix, UU, v_matrix, eig, eigval, kpt, real_lattice, scissors_shift, mp_grid, num_bands, num_kpts, num_wann, num_valence_bands, effective_model, have_disentangled, seedname, stdout, timer, error, comm)

Wrapper routine used to reduce number of Fourier calls

Arguments

Type IntentOptional Attributes Name
type(dis_manifold_type), intent(in) :: dis_manifold
real(kind=dp), intent(in) :: kpt_latt(:,:)
type(ws_region_type), intent(in) :: ws_region
type(print_output_type), intent(in) :: print_output
type(wannier_data_type), intent(in) :: wannier_data
type(ws_distance_type), intent(inout) :: ws_distance
type(wigner_seitz_type), intent(inout) :: wigner_seitz
complex(kind=dp), intent(out) :: HH(:,:)
complex(kind=dp), intent(out) :: HH_da(:,:,:)
complex(kind=dp), intent(out) :: HH_dadb(:,:,:,:)
complex(kind=dp), intent(inout), allocatable :: HH_R(:,:,:)
complex(kind=dp), intent(in) :: u_matrix(:,:,:)
complex(kind=dp), intent(out) :: UU(:,:)
complex(kind=dp), intent(in) :: v_matrix(:,:,:)
real(kind=dp), intent(out) :: eig(num_wann)
real(kind=dp), intent(in) :: eigval(:,:)
real(kind=dp), intent(in) :: kpt(3)
real(kind=dp), intent(in) :: real_lattice(3,3)
real(kind=dp), intent(in) :: scissors_shift
integer, intent(in) :: mp_grid(3)
integer, intent(in) :: num_bands
integer, intent(in) :: num_kpts
integer, intent(in) :: num_wann
integer, intent(in) :: num_valence_bands
logical, intent(in) :: effective_model
logical, intent(in) :: have_disentangled
character(len=50), intent(in) :: seedname
integer, intent(in) :: stdout
type(timer_list_type), intent(inout) :: timer
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm