w90_kmesh Module

Routines to analyse the regular k-point mesh and determine the overlaps neccessary for a finite difference representation of the spread operator. These overlaps are defined by a set of vectors (b-vectors) which connect the Bloch states. See Eq. B1 in Appendix B of Marzari and Vanderbilt PRB 56 12847 (1997)


Uses

  • module~~w90_kmesh~~UsesGraph module~w90_kmesh w90_kmesh module~w90_comms w90_comms module~w90_kmesh->module~w90_comms module~w90_parameters w90_parameters module~w90_kmesh->module~w90_parameters module~w90_constants w90_constants module~w90_kmesh->module~w90_constants module~w90_comms->module~w90_constants module~w90_io w90_io module~w90_comms->module~w90_io module~w90_parameters->module~w90_constants module~w90_parameters->module~w90_io module~w90_io->module~w90_constants

Used by

  • module~~w90_kmesh~~UsedByGraph module~w90_kmesh w90_kmesh program~wannier wannier program~wannier->module~w90_kmesh proc~wannier_run wannier_run proc~wannier_run->module~w90_kmesh proc~wannier_setup wannier_setup proc~wannier_setup->module~w90_kmesh program~postw90 postw90 program~postw90->module~w90_kmesh

Contents


Variables

TypeVisibility AttributesNameInitial
integer, private, parameter:: nsupcell =5

Size of supercell (of recip cell) in which to search for k-point shells

integer, private :: lmn(3,(2*nsupcell+1)**3)

Order in which to search the cells (ordered in dist from origin)

real(kind=dp), private :: bvec_inp(3,num_nnmax,max_shells)

The input b-vectors (only used in the rare case they are read from file)


Functions

private function internal_maxloc(dist)

A reproducible maxloc function so b-vectors come in the same order each time

Arguments

Type IntentOptional AttributesName
real(kind=dp), intent(in) :: dist((2*nsupcell+1)**3)

Distances from the origin of the unit cells in the supercell.

Return Value integer


Subroutines

public subroutine kmesh_get()

Main routine to calculate the b-vectors

Arguments

None

public subroutine kmesh_write()

Writes nnkp file (list of overlaps needed)

Arguments

None

public subroutine kmesh_dealloc()

Release memory from the kmesh module

Arguments

None

private subroutine kmesh_supercell_sort()

We look for kpoint neighbours in a large supercell of reciprocal unit cells. Done sequentially this is very slow. Here we order the cells by the distance from the origin. Doing the search in this order gives a dramatic speed up

Arguments

None

private subroutine kmesh_get_bvectors(multi, kpt, shell_dist, bvector)

Returns the b-vectors for a given shell and kpoint.

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: multi
integer, intent(in) :: kpt
real(kind=dp), intent(in) :: shell_dist
real(kind=dp), intent(out) :: bvector(3,multi)

private subroutine kmesh_shell_automatic(multi, dnn, bweight)

Find the correct set of shells to satisfy B1 The stratagy is: 1) Take the bvectors from the next shell 2) Reject them if they are parallel to exisiting b vectors 3) Test to see if we satisfy B1, if not add another shell and repeat

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: multi(search_shells)
real(kind=dp), intent(in) :: dnn(search_shells)
real(kind=dp), intent(out) :: bweight(max_shells)

private subroutine kmesh_shell_fixed(multi, dnn, bweight)

Find the B1 weights for a set of shells specified by the user

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: multi(search_shells)
real(kind=dp), intent(in) :: dnn(search_shells)
real(kind=dp), intent(out) :: bweight(max_shells)

private subroutine kmesh_shell_from_file(multi, dnn, bweight)

Find the B1 weights for a set of b-vectors given in a file. This routine is only activated via a devel_flag and is not intended for regular use.

Arguments

Type IntentOptional AttributesName
integer, intent(inout) :: multi(search_shells)
real(kind=dp), intent(in) :: dnn(search_shells)
real(kind=dp), intent(out) :: bweight(max_shells)