Main routines for the minimisation of the spread
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 |
Calculate the Unitary Rotations to give Maximally Localised Wannier Functions
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ham_logical_type), | intent(inout) | :: | ham_logical | |||
| type(kmesh_info_type), | intent(in) | :: | kmesh_info | |||
| real(kind=dp), | intent(in) | :: | kpt_latt(:,:) | |||
| type(wann_control_type), | intent(inout) | :: | wann_control | |||
| type(wann_omega_type), | intent(inout) | :: | omega | |||
| type(sitesym_type), | intent(in) | :: | sitesym | |||
| type(print_output_type), | intent(in) | :: | print_output | |||
| type(wannier_data_type), | intent(inout) | :: | wannier_data | |||
| type(ws_region_type), | intent(in) | :: | ws_region | |||
| type(w90_calculation_type), | intent(in) | :: | w90_calculation | |||
| complex(kind=dp), | intent(inout), | allocatable | :: | ham_k(:,:,:) | ||
| complex(kind=dp), | intent(inout), | allocatable | :: | ham_r(:,:,:) | ||
| complex(kind=dp), | intent(inout) | :: | m_matrix_loc(:,:,:,:) | |||
| complex(kind=dp), | intent(inout) | :: | u_matrix(:,:,:) | |||
| real(kind=dp), | intent(in) | :: | real_lattice(3,3) | |||
| real(kind=dp), | intent(inout), | allocatable | :: | wannier_centres_translated(:,:) | ||
| integer, | intent(inout), | allocatable | :: | irvec(:,:) | ||
| integer, | intent(in) | :: | mp_grid(3) | |||
| integer, | intent(inout), | allocatable | :: | ndegen(:) | ||
| integer, | intent(inout) | :: | nrpts | |||
| integer, | intent(in) | :: | num_kpts | |||
| integer, | intent(in) | :: | num_proj | |||
| integer, | intent(in) | :: | num_wann | |||
| integer, | intent(in) | :: | optimisation | |||
| integer, | intent(inout) | :: | rpt_origin | |||
| character(len=*), | intent(in) | :: | bands_plot_mode | |||
| character(len=*), | intent(in) | :: | transport_mode | |||
| logical, | intent(in) | :: | lsitesymmetry | |||
| integer, | intent(in) | :: | stdout | |||
| type(timer_list_type), | intent(inout) | :: | timer | |||
| integer, | intent(in) | :: | dist_k(:) | |||
| type(w90_error_type), | intent(out), | allocatable | :: | error | ||
| type(w90_comm_type), | intent(in) | :: | comm |
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 |
||
| integer, | intent(in) | :: | num_wann | |||
| type(kmesh_info_type), | intent(in) | :: | kmesh_info | |||
| integer, | intent(in) | :: | num_kpts | |||
| logical, | intent(in) | :: | use_ss_functional | |||
| complex(kind=dp), | intent(in) | :: | m_matrix_loc(:,:,:,:) | |||
| integer, | intent(in) | :: | timing_level | |||
| integer, | intent(in) | :: | iprint | |||
| type(timer_list_type), | intent(inout) | :: | timer | |||
| integer, | intent(in) | :: | nkrank | |||
| integer, | intent(in) | :: | global_k(:) | |||
| type(w90_error_type), | intent(out), | allocatable | :: | error | ||
| type(w90_comm_type), | intent(in) | :: | comm | |||
| real(kind=dp), | intent(in), | optional | :: | m_w(:,:,:) |
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_type), | intent(out) | :: | wann_spread | |||
| integer, | intent(in) | :: | num_wann | |||
| type(kmesh_info_type), | intent(in) | :: | kmesh_info | |||
| integer, | intent(in) | :: | num_kpts | |||
| type(print_output_type), | intent(in) | :: | print_output | |||
| logical, | intent(in) | :: | use_ss_functional | |||
| type(wann_slwf_type), | intent(in) | :: | wann_slwf | |||
| real(kind=dp), | intent(in) | :: | omega_invariant | |||
| real(kind=dp), | intent(inout) | :: | ln_tmp_loc(:,:,:) | |||
| complex(kind=dp), | intent(in) | :: | m_matrix_loc(:,:,:,:) | |||
| real(kind=dp), | intent(in) | :: | lambda_loc | |||
| logical, | intent(inout) | :: | first_pass | |||
| type(timer_list_type), | intent(inout) | :: | timer | |||
| integer, | intent(in) | :: | nkrank | |||
| integer, | intent(in) | :: | global_k(:) | |||
| type(w90_error_type), | intent(out), | allocatable | :: | error | ||
| type(w90_comm_type), | intent(in) | :: | comm |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=dp), | intent(in) | :: | csheet(:,:,:) | |||
| real(kind=dp), | intent(in) | :: | sheet(:,:,:) | |||
| real(kind=dp), | intent(out) | :: | rave(:,:) | |||
| integer, | intent(in) | :: | num_wann | |||
| type(kmesh_info_type), | intent(in) | :: | kmesh_info | |||
| integer, | intent(in) | :: | num_kpts | |||
| type(wann_slwf_type), | intent(inout) | :: | wann_slwf | |||
| logical, | intent(in) | :: | use_ss_functional | |||
| logical, | intent(in) | :: | lsitesymmetry | |||
| real(kind=dp), | intent(inout) | :: | ln_tmp_loc(:,:,:) | |||
| complex(kind=dp), | intent(in) | :: | m_matrix_loc(:,:,:,:) | |||
| real(kind=dp), | intent(inout) | :: | rnkb_loc(:,:,:) | |||
| complex(kind=dp), | intent(out) | :: | cdodq_loc(:,:,:) | |||
| real(kind=dp), | intent(in) | :: | lambda_loc | |||
| integer, | intent(in) | :: | timing_level | |||
| type(sitesym_type), | intent(in) | :: | sitesym | |||
| type(timer_list_type), | intent(inout) | :: | timer | |||
| integer, | intent(in) | :: | nkrank | |||
| integer, | intent(in) | :: | global_k(:) | |||
| type(w90_error_type), | intent(out), | allocatable | :: | error | ||
| type(w90_comm_type), | intent(in) | :: | comm | |||
| integer, | intent(in) | :: | iprint | |||
| complex(kind=dp), | intent(out), | optional | :: | cdodq(:,:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(localisation_vars_type), | intent(in) | :: | orig | |||
| type(localisation_vars_type), | intent(out) | :: | copy |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | num_kpts | |||
| integer, | intent(in) | :: | num_wann | |||
| complex(kind=dp), | intent(in) | :: | u_matrix(:,:,:) | |||
| integer, | intent(in) | :: | timing_level | |||
| integer, | intent(in) | :: | iprint | |||
| integer, | intent(in) | :: | stdout | |||
| type(timer_list_type), | intent(inout) | :: | timer | |||
| type(w90_error_type), | intent(out), | allocatable | :: | error | ||
| type(w90_comm_type), | intent(in) | :: | comm |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(kmesh_info_type), | intent(in) | :: | kmesh_info | |||
| type(wann_control_type), | intent(inout) | :: | wann_control | |||
| type(wann_omega_type), | intent(inout) | :: | omega | |||
| type(print_output_type), | intent(in) | :: | print_output | |||
| type(wannier_data_type), | intent(inout) | :: | wannier_data | |||
| complex(kind=dp), | intent(inout) | :: | m_matrix(:,:,:,:) | |||
| complex(kind=dp), | intent(inout) | :: | u_matrix(:,:,:) | |||
| real(kind=dp), | intent(in) | :: | real_lattice(3,3) | |||
| integer, | intent(in) | :: | num_kpts | |||
| integer, | intent(in) | :: | num_wann | |||
| integer, | intent(in) | :: | stdout | |||
| type(timer_list_type), | intent(inout) | :: | timer | |||
| type(w90_error_type), | intent(out), | allocatable | :: | error | ||
| type(w90_comm_type), | intent(in) | :: | comm |
| 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_type), | intent(out) | :: | wann_spread | |||
| integer, | intent(in) | :: | num_wann | |||
| integer, | intent(in) | :: | nntot | |||
| real(kind=dp), | intent(in) | :: | wbtot | |||
| real(kind=dp), | intent(in) | :: | wb(:) | |||
| real(kind=dp), | intent(in) | :: | bk(:,:,:) | |||
| real(kind=dp), | intent(in) | :: | omega_invariant | |||
| real(kind=dp), | intent(out) | :: | ln_tmp(:,:,:) | |||
| logical, | intent(inout) | :: | first_pass | |||
| integer, | intent(in) | :: | timing_level | |||
| type(timer_list_type), | intent(inout) | :: | timer | |||
| type(w90_error_type), | intent(out), | allocatable | :: | error | ||
| type(w90_comm_type), | intent(in) | :: | comm |
Determine whether minimisation of non-gauge invariant spread is converged
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(localisation_vars_type), | intent(in) | :: | old_spread | |||
| type(localisation_vars_type), | intent(in) | :: | wann_spread | |||
| real(kind=dp), | intent(inout) | :: | history(:) | |||
| real(kind=dp), | intent(inout) | :: | save_spread | |||
| integer, | intent(in) | :: | iter | |||
| integer, | intent(inout) | :: | conv_count | |||
| integer, | intent(inout) | :: | noise_count | |||
| logical, | intent(inout) | :: | lconverged | |||
| logical, | intent(inout) | :: | lrandom | |||
| logical, | intent(inout) | :: | lfirst | |||
| type(wann_control_type), | intent(in) | :: | wann_control | |||
| type(w90_error_type), | intent(out), | allocatable | :: | error | ||
| type(w90_comm_type), | intent(in) | :: | comm |