w90_wannierise Module

Main routines for the minimisation of the spread


Uses

  • module~~w90_wannierise~~UsesGraph module~w90_wannierise w90_wannierise module~w90_comms w90_comms module~w90_wannierise->module~w90_comms module~w90_constants w90_constants module~w90_wannierise->module~w90_constants module~w90_comms->module~w90_constants module~w90_io w90_io module~w90_comms->module~w90_io module~w90_io->module~w90_constants

Used by

  • module~~w90_wannierise~~UsedByGraph module~w90_wannierise w90_wannierise program~wannier wannier program~wannier->module~w90_wannierise proc~wannier_run wannier_run proc~wannier_run->module~w90_wannierise

Contents


Variables

TypeVisibility AttributesNameInitial
real(kind=dp), private, allocatable:: rnkb(:,:,:)
real(kind=dp), private, allocatable:: rnkb_loc(:,:,:)
real(kind=dp), private, allocatable:: ln_tmp(:,:,:)
real(kind=dp), private, allocatable:: ln_tmp_loc(:,:,:)
complex(kind=dp), private, allocatable:: u_matrix_loc(:,:,:)
complex(kind=dp), private, allocatable:: m_matrix_loc(:,:,:,:)
complex(kind=dp), private, allocatable:: m_matrix_1b(:,:,:)
complex(kind=dp), private, allocatable:: m_matrix_1b_loc(:,:,:)
complex(kind=dp), private, allocatable:: cdq_loc(:,:,:)
complex(kind=dp), private, allocatable:: cdodq_loc(:,:,:)
integer, private, allocatable:: counts(:)
integer, private, allocatable:: displs(:)
logical, private :: first_pass

Used to trigger the calculation of the invarient spread we only need to do this on entering wann_main (_gamma)

real(kind=dp), private :: lambda_loc

Derived Types

type, private :: localisation_vars

Contributions to the spread

Components

TypeVisibility AttributesNameInitial
real(kind=dp), public :: om_i

Gauge Invarient

real(kind=dp), public :: om_d

Diagonal

real(kind=dp), public :: om_od

Off-diagonal

real(kind=dp), public :: om_tot

Total

real(kind=dp), public :: om_iod

Combined I-OD term for selective localization

real(kind=dp), public :: om_nu

Lagrange multiplier term due to constrained centres real(kind=dp) :: om_c Total spread functional with constraints


Subroutines

public subroutine wann_main()

Calculate the Unitary Rotations to give Maximally Localised Wannier Functions

Arguments

None

private subroutine wann_phases(csheet, sheet, rguide, irguide, m_w)

Uses guiding centres to pick phases which give a consistent choice of branch cut for the spread definition

Arguments

Type IntentOptional AttributesName
complex(kind=dp), intent(out) :: csheet(:,:,:)

Choice of phase

real(kind=dp), intent(out) :: sheet(:,:,:)

Choice of branch cut

real(kind=dp), intent(inout) :: rguide(:,:)

Guiding centres

integer, intent(in) :: irguide

Zero if first call to this routine

real(kind=dp), intent(in), optional :: m_w(:,:,:)

Used in the Gamma point routines as an optimisation

private subroutine wann_omega(csheet, sheet, rave, r2ave, rave2, wann_spread)

Calculate the Wannier Function spread !

Read more…

Arguments

Type IntentOptional AttributesName
complex(kind=dp), intent(in) :: csheet(:,:,:)
real(kind=dp), intent(in) :: sheet(:,:,:)
real(kind=dp), intent(out) :: rave(:,:)
real(kind=dp), intent(out) :: r2ave(:)
real(kind=dp), intent(out) :: rave2(:)
type(localisation_vars), intent(out) :: wann_spread

private subroutine wann_domega(csheet, sheet, rave, cdodq)

Arguments

Type IntentOptional AttributesName
complex(kind=dp), intent(in) :: csheet(:,:,:)
real(kind=dp), intent(in) :: sheet(:,:,:)
real(kind=dp), intent(out) :: rave(:,:)
complex(kind=dp), intent(out), optional :: cdodq(:,:,:)

private subroutine wann_spread_copy(orig, copy)

copy%om_c = orig%om_c

Arguments

Type IntentOptional AttributesName
type(localisation_vars), intent(in) :: orig
type(localisation_vars), intent(out) :: copy

private subroutine wann_calc_projection()

Arguments

None

private subroutine wann_write_xyz()

Arguments

None

private subroutine wann_write_vdw_data()

Arguments

None

private subroutine wann_check_unitarity()

Arguments

None

private subroutine wann_write_r2mn()

Arguments

None

private subroutine wann_svd_omega_i()

Arguments

None

public subroutine wann_main_gamma()

Arguments

None

private subroutine wann_omega_gamma(m_w, csheet, sheet, rave, r2ave, rave2, wann_spread)

Arguments

Type IntentOptional AttributesName
real(kind=dp), intent(in) :: m_w(:,:,:)
complex(kind=dp), intent(in) :: csheet(:,:,:)
real(kind=dp), intent(in) :: sheet(:,:,:)
real(kind=dp), intent(out) :: rave(:,:)
real(kind=dp), intent(out) :: r2ave(:)
real(kind=dp), intent(out) :: rave2(:)
type(localisation_vars), intent(out) :: wann_spread