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_parameters w90_parameters module~w90_ws_distance->module~w90_parameters module~w90_constants w90_constants module~w90_ws_distance->module~w90_constants module~w90_parameters->module~w90_constants module~w90_io w90_io module~w90_parameters->module~w90_io module~w90_io->module~w90_constants

Used by

  • module~~w90_ws_distance~~UsedByGraph module~w90_ws_distance 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_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_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_new pw90common_fourier_R_to_k_new proc~pw90common_fourier_r_to_k_new->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~plot_main plot_main proc~plot_main->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~plot_interpolate_bands plot_interpolate_bands proc~plot_interpolate_bands->module~w90_ws_distance

Contents


Variables

TypeVisibility AttributesNameInitial
integer, public, save, allocatable:: irdist_ws(:,:,:,:,:)

The integer number of unit cells to shift Wannier function j to put its centre inside the Wigner-Seitz of wannier function i. If several shifts are equivalent (i.e. they take the function on the edge of the WS) they are all listed. First index: xyz, second index: number of degenerate shifts, third and fourth indices: i,j; fifth index: index on the R vector.

real(kind=DP), public, save, allocatable:: crdist_ws(:,:,:,:,:)

Cartesian version of irdist_ws, in angstrom

integer, public, save, allocatable:: wdist_ndeg(:,:,:)

The number of equivalent vectors for each set of (i,j,R) (that is, loops on the second index of irdist_ws(:,:,i,j,R) go from 1 to wdist_ndeg(i,j,R))

logical, public, save:: done_ws_distance =.false.

Global variable to know if the properties were already calculated, and avoid recalculating them when the ws_translate_dist function is called multiple times

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(nrpts, irvec, 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 AttributesName
integer, intent(in) :: nrpts
integer, intent(in) :: irvec(3,nrpts)
logical, intent(in), optional :: force_recompute

private subroutine R_wz_sc(R_in, R0, ndeg, R_out, shifts)

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 AttributesName
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)

public subroutine ws_write_vec(nrpts, irvec)

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 AttributesName
integer, intent(in) :: nrpts
integer, intent(in) :: irvec(3,nrpts)

public subroutine clean_ws_translate()

Arguments

None