w90_overlap Module

This module reads in the overlap (Mmn) and Projections (Amn) and performs simple operations on them.


Uses

  • module~~w90_overlap~~UsesGraph module~w90_overlap w90_overlap module~w90_comms w90_comms module~w90_overlap->module~w90_comms module~w90_constants w90_constants module~w90_overlap->module~w90_constants module~w90_comms->module~w90_constants module~w90_error_base w90_error_base module~w90_comms->module~w90_error_base

Used by

  • module~~w90_overlap~~UsedByGraph module~w90_overlap w90_overlap proc~overlaps overlaps proc~overlaps->module~w90_overlap proc~w90_disentangle~2 w90_disentangle proc~w90_disentangle~2->module~w90_overlap proc~w90_input_setopt w90_input_setopt proc~w90_input_setopt->module~w90_overlap proc~w90_project_overlap~2 w90_project_overlap proc~w90_project_overlap~2->module~w90_overlap

Subroutines

public subroutine overlap_allocate(a_matrix, m_matrix, m_matrix_local, m_matrix_orig, m_matrix_orig_local, u_matrix, u_matrix_opt, nntot, num_bands, num_kpts, num_wann, timing_level, timer, dist_k, error, comm)

Allocate memory to read Mmn and Amn from files This must be called before calling overlap_read

Arguments

Type IntentOptional Attributes Name
complex(kind=dp), allocatable :: a_matrix(:,:,:)
complex(kind=dp), allocatable :: m_matrix(:,:,:,:)
complex(kind=dp), allocatable :: m_matrix_local(:,:,:,:)
complex(kind=dp), allocatable :: m_matrix_orig(:,:,:,:)
complex(kind=dp), allocatable :: m_matrix_orig_local(:,:,:,:)
complex(kind=dp), allocatable :: u_matrix(:,:,:)
complex(kind=dp), allocatable :: u_matrix_opt(:,:,:)
integer, intent(in) :: nntot
integer, intent(in) :: num_bands
integer, intent(in) :: num_kpts
integer, intent(in) :: num_wann
integer, intent(in) :: timing_level
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

public subroutine overlap_read(kmesh_info, select_projection, au_matrix, m_matrix_local, num_bands, num_kpts, num_proj, num_wann, print_output, timing_level, cp_pp, use_bloch_phases, seedname, stdout, timer, dist_k, error, comm)

Read the Mmn and Amn from files Note: one needs to call overlap_allocate first!

Arguments

Type IntentOptional Attributes Name
type(kmesh_info_type), intent(in) :: kmesh_info
type(select_projection_type), intent(in) :: select_projection
complex(kind=dp), intent(inout) :: au_matrix(:,:,:)
complex(kind=dp), intent(inout) :: m_matrix_local(:,:,:,:)
integer, intent(in) :: num_bands
integer, intent(in) :: num_kpts
integer, intent(in) :: num_proj
integer, intent(in) :: num_wann
type(print_output_type), intent(in) :: print_output
integer, intent(in) :: timing_level
logical, intent(in) :: cp_pp
logical, intent(in) :: use_bloch_phases
character(len=50), intent(in) :: seedname
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

public subroutine overlap_write(kmesh_info, au_matrix, m_matrix, eval, num_bands, num_kpts, num_proj, dist_k, seedname, error, comm)

Write the Mmn and Amn from files

Arguments

Type IntentOptional Attributes Name
type(kmesh_info_type), intent(in) :: kmesh_info
complex(kind=dp), intent(in) :: au_matrix(:,:,:)
complex(kind=dp), intent(in) :: m_matrix(:,:,:,:)
real(kind=dp), intent(in), pointer :: eval(:,:)
integer, intent(in) :: num_bands
integer, intent(in) :: num_kpts
integer, intent(in) :: num_proj
integer, intent(in) :: dist_k(:)
character(len=50), intent(in) :: seedname
type(w90_error_type), intent(inout), allocatable :: error
type(w90_comm_type), intent(in) :: comm

private subroutine overlap_rotate(a_matrix, m_matrix_orig, nntot, num_bands, timing_level, timer, error, comm)

Only used when interfaced to the CP code Not sure why this is done here and not in CP

Arguments

Type IntentOptional Attributes Name
complex(kind=dp), intent(inout) :: a_matrix(:,:,:)
complex(kind=dp), intent(inout) :: m_matrix_orig(:,:,:,:)
integer, intent(in) :: nntot
integer, intent(in) :: num_bands
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

public subroutine overlap_dealloc(a_matrix, m_matrix, m_matrix_local, m_matrix_orig, m_matrix_orig_local, u_matrix, u_matrix_opt, error, comm)

Dellocate memory

Arguments

Type IntentOptional Attributes Name
complex(kind=dp), intent(inout), allocatable :: a_matrix(:,:,:)
complex(kind=dp), intent(inout), allocatable :: m_matrix(:,:,:,:)
complex(kind=dp), intent(inout), allocatable :: m_matrix_local(:,:,:,:)
complex(kind=dp), intent(inout), allocatable :: m_matrix_orig(:,:,:,:)
complex(kind=dp), intent(inout), allocatable :: m_matrix_orig_local(:,:,:,:)
complex(kind=dp), intent(inout), allocatable :: u_matrix(:,:,:)
complex(kind=dp), intent(inout), allocatable :: u_matrix_opt(:,:,:)
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine overlap_project(sitesym, m_matrix_local, u_matrix, nnlist, nntot, num_bands, num_kpts, num_wann, timing_level, lsitesymmetry, stdout, timer, dist_k, error, comm)

Construct initial guess from the projection via a Lowdin transformation See section 3 of the CPC 2008 Note that in this subroutine num_wann = num_bands since, if we are here, then disentanglement = FALSE

Arguments

Type IntentOptional Attributes Name
type(sitesym_type), intent(in) :: sitesym
complex(kind=dp), intent(inout) :: m_matrix_local(:,:,:,:)
complex(kind=dp), intent(inout) :: u_matrix(:,:,:)
integer, intent(in) :: nnlist(:,:)
integer, intent(in) :: nntot
integer, intent(in) :: num_bands
integer, intent(in) :: num_kpts
integer, intent(in) :: num_wann
integer, intent(in) :: timing_level
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

public subroutine overlap_project_gamma(m_matrix, u_matrix, nntot, num_wann, timing_level, stdout, timer, error, comm)

Construct initial guess from the projection via a Lowdin transformation See section 3 of the CPC 2008 Note that in this subroutine num_wann = num_bands since, if we are here, then disentanglement = FALSE Gamma specific version

Arguments

Type IntentOptional Attributes Name
complex(kind=dp), intent(inout) :: m_matrix(:,:,:,:)
complex(kind=dp), intent(inout) :: u_matrix(:,:,:)
integer, intent(in) :: nntot
integer, intent(in) :: num_wann
integer, intent(in) :: timing_level
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