w90_ws_distance Module

This module computes the optimal Wigner-Seitz cell around each Wannier function to use for interpolation.


Uses

  • module~~w90_ws_distance~~UsesGraph module~w90_ws_distance w90_ws_distance module~w90_constants w90_constants module~w90_ws_distance->module~w90_constants module~w90_error w90_error module~w90_ws_distance->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_ws_distance~~UsedByGraph module~w90_ws_distance w90_ws_distance proc~plot_interpolate_bands plot_interpolate_bands proc~plot_interpolate_bands->module~w90_ws_distance proc~plot_main plot_main proc~plot_main->module~w90_ws_distance proc~pw90common_fourier_r_to_k pw90common_fourier_R_to_k proc~pw90common_fourier_r_to_k->module~w90_ws_distance proc~pw90common_fourier_r_to_k_new pw90common_fourier_R_to_k_new proc~pw90common_fourier_r_to_k_new->module~w90_ws_distance proc~pw90common_fourier_r_to_k_new_second_d pw90common_fourier_R_to_k_new_second_d proc~pw90common_fourier_r_to_k_new_second_d->module~w90_ws_distance proc~pw90common_fourier_r_to_k_new_second_d_tb_conv pw90common_fourier_R_to_k_new_second_d_TB_conv proc~pw90common_fourier_r_to_k_new_second_d_tb_conv->module~w90_ws_distance proc~pw90common_fourier_r_to_k_vec pw90common_fourier_R_to_k_vec proc~pw90common_fourier_r_to_k_vec->module~w90_ws_distance proc~pw90common_fourier_r_to_k_vec_dadb pw90common_fourier_R_to_k_vec_dadb proc~pw90common_fourier_r_to_k_vec_dadb->module~w90_ws_distance proc~pw90common_fourier_r_to_k_vec_dadb_tb_conv pw90common_fourier_R_to_k_vec_dadb_TB_conv proc~pw90common_fourier_r_to_k_vec_dadb_tb_conv->module~w90_ws_distance proc~pw90common_wanint_setup pw90common_wanint_setup proc~pw90common_wanint_setup->module~w90_ws_distance

Variables

Type Visibility Attributes Name Initial
integer, private, parameter :: ndegenx = 8

max number of unit cells that can touch in a single point (i.e. vertex of cube)


Subroutines

public subroutine ws_translate_dist(ws_distance, ws_region, num_wann, wannier_centres, real_lattice, mp_grid, nrpts, irvec, error, comm, force_recompute)

Find the supercell translation (i.e. the translation by a integer number of supercell vectors, the supercell being defined by the mp_grid) that minimizes the distance between two given Wannier functions, i and j, the first in unit cell 0, the other in unit cell R. I.e., we find the translation to put WF j in the Wigner-Seitz of WF i. We also look for the number of equivalent translation, that happen when w_j,R is on the edge of the WS of w_i,0. The results are stored in global arrays wdist_ndeg, irdist_ws, crdist_ws.

Arguments

Type IntentOptional Attributes Name
type(ws_distance_type), intent(inout) :: ws_distance
type(ws_region_type), intent(in) :: ws_region
integer, intent(in) :: num_wann
real(kind=dp), intent(in) :: wannier_centres(:,:)
real(kind=dp), intent(in) :: real_lattice(3,3)
integer, intent(in) :: mp_grid(3)
integer, intent(in) :: nrpts
integer, intent(in) :: irvec(:,:)
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm
logical, intent(in), optional :: force_recompute

private subroutine R_wz_sc(R_in, R0, ndeg, R_out, shifts, mp_grid, real_lattice, inv_lattice, ws_search_size, ws_distance_tol, error, comm)

Put R_in in the Wigner-Seitz cell centered around R0, and find all equivalent vectors to this (i.e., with same distance). Return their coordinates and the degeneracy, as well as the integer shifts needed to get the vector (these are always multiples of the mp_grid, i.e. they are supercell displacements in the large supercell)

Arguments

Type IntentOptional Attributes Name
real(kind=DP), intent(in) :: R_in(3)
real(kind=DP), intent(in) :: R0(3)
integer, intent(out) :: ndeg
real(kind=DP), intent(out) :: R_out(3,ndegenx)
integer, intent(out) :: shifts(3,ndegenx)
integer, intent(in) :: mp_grid(3)
real(kind=dp), intent(in) :: real_lattice(3,3)
real(kind=dp), intent(in) :: inv_lattice(3,3)
integer, intent(in) :: ws_search_size(3)
real(kind=dp), intent(in) :: ws_distance_tol
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine ws_write_vec(ws_distance, nrpts, irvec, num_wann, use_ws_distance, seedname, error, comm)

Write to file the lattice vectors of the superlattice to be added to R vector in seedname_hr.dat, seedname_rmn.dat, etc. in order to have the second Wannier function inside the WS cell of the first one.

Arguments

Type IntentOptional Attributes Name
type(ws_distance_type), intent(in) :: ws_distance
integer, intent(in) :: nrpts
integer, intent(in) :: irvec(3,nrpts)
integer, intent(in) :: num_wann
logical, intent(in) :: use_ws_distance
character(len=50), intent(in) :: seedname
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine clean_ws_translate(ws_distance, error, comm)

Arguments

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