This module computes the optimal Wigner-Seitz cell around each Wannier function to use for interpolation.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
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) |
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.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nrpts | |||
integer, | intent(in) | :: | irvec(3,nrpts) | |||
logical, | intent(in), | optional | :: | force_recompute |
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)
Type | Intent | Optional | 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) |
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.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nrpts | |||
integer, | intent(in) | :: | irvec(3,nrpts) |