Main routines for the minimisation of the spread
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
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 |
Contributions to the spread
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
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 |
Calculate the Unitary Rotations to give Maximally Localised Wannier Functions
Uses guiding centres to pick phases which give a consistent choice of branch cut for the spread definition
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Calculate the Wannier Function spread !
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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(:,:,:) |
copy%om_c = orig%om_c
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(localisation_vars), | intent(in) | :: | orig | |||
type(localisation_vars), | intent(out) | :: | copy |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |