Given a k point, this function returns eigenvalues E and derivatives of the eigenvalues dE/dk_a, using wham_get_deleig_a
| Type | Intent | Optional | 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 |
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 ! !================================================! use w90_constants, only: dp use w90_postw90_types, only: pw90_band_deriv_degen_type, wigner_seitz_type use w90_comms, only: w90_comm_type, mpirank use w90_constants, only: dp, cmplx_0 use w90_get_oper, only: get_HH_R use w90_types, only: dis_manifold_type, print_output_type, wannier_data_type, & ws_region_type, ws_distance_type, timer_list_type use w90_postw90_common, only: pw90common_fourier_R_to_k_new_second_d, & pw90common_fourier_R_to_k use w90_utility, only: utility_diagonalize implicit none ! arguments 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(print_output_type), intent(in) :: print_output type(ws_region_type), intent(in) :: ws_region type(w90_comm_type), intent(in) :: comm type(wannier_data_type), intent(in) :: wannier_data type(wigner_seitz_type), intent(inout) :: wigner_seitz type(ws_distance_type), intent(inout) :: ws_distance type(timer_list_type), intent(inout) :: timer type(w90_error_type), allocatable, intent(out) :: error integer, intent(in) :: num_wann, num_kpts, num_bands, num_valence_bands integer, intent(in) :: mp_grid(3) integer, intent(in) :: stdout real(kind=dp), intent(in) :: kpt(3)!! the three coordinates of the k point vector (in relative coordinates) real(kind=dp), intent(out) :: eig(num_wann)!! the calculated eigenvalues at kpt 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(in) :: eigval(:, :) real(kind=dp), intent(in) :: real_lattice(3, 3) real(kind=dp), intent(in) :: scissors_shift complex(kind=dp), intent(out) :: HH(:, :) !! the Hamiltonian matrix at kpt complex(kind=dp), intent(out) :: delHH(:, :, :) !! the delHH matrix (derivative of H) at kpt complex(kind=dp), intent(out) :: UU(:, :) !! the rotation matrix that gives the eigenvectors of HH complex(kind=dp), intent(in) :: u_matrix(:, :, :), v_matrix(:, :, :) complex(kind=dp), allocatable, intent(inout) :: HH_R(:, :, :) ! <0n|r|Rm> character(len=50), intent(in) :: seedname logical, intent(in) :: have_disentangled logical, intent(in) :: effective_model ! I call it to be sure that it has been called already once, ! and that HH_R contains the actual matrix. ! Further calls should return very fast. call get_HH_R(dis_manifold, kpt_latt, print_output, wigner_seitz, HH_R, u_matrix, v_matrix, & eigval, real_lattice, scissors_shift, num_bands, num_kpts, num_wann, & num_valence_bands, effective_model, have_disentangled, seedname, ws_distance, ws_region, & stdout, timer, error, comm) if (allocated(error)) return call pw90common_fourier_R_to_k(ws_region, wannier_data, ws_distance, wigner_seitz, HH, HH_R, & kpt, real_lattice, mp_grid, 0, num_wann, error, comm) if (allocated(error)) return call utility_diagonalize(HH, num_wann, eig, UU, error, comm) if (allocated(error)) return call pw90common_fourier_R_to_k(ws_region, wannier_data, ws_distance, wigner_seitz, & delHH(:, :, 1), HH_R, kpt, real_lattice, mp_grid, 1, num_wann, & error, comm) if (allocated(error)) return call pw90common_fourier_R_to_k(ws_region, wannier_data, ws_distance, wigner_seitz, & delHH(:, :, 2), HH_R, kpt, real_lattice, mp_grid, 2, num_wann, & error, comm) if (allocated(error)) return call pw90common_fourier_R_to_k(ws_region, wannier_data, ws_distance, wigner_seitz, & delHH(:, :, 3), HH_R, kpt, real_lattice, mp_grid, 3, num_wann, & error, comm) if (allocated(error)) return call wham_get_deleig_a(del_eig(:, 1), eig, delHH(:, :, 1), UU, num_wann, & pw90_band_deriv_degen, error, comm) if (allocated(error)) return call wham_get_deleig_a(del_eig(:, 2), eig, delHH(:, :, 2), UU, num_wann, & pw90_band_deriv_degen, error, comm) if (allocated(error)) return call wham_get_deleig_a(del_eig(:, 3), eig, delHH(:, :, 3), UU, num_wann, & pw90_band_deriv_degen, error, comm) if (allocated(error)) return end subroutine wham_get_eig_deleig