sitesym_symmetrize_rotation Subroutine

public subroutine sitesym_symmetrize_rotation(urot)

Uses

  • proc~~sitesym_symmetrize_rotation~~UsesGraph proc~sitesym_symmetrize_rotation sitesym_symmetrize_rotation module~w90_utility w90_utility proc~sitesym_symmetrize_rotation->module~w90_utility module~w90_parameters w90_parameters proc~sitesym_symmetrize_rotation->module~w90_parameters module~w90_constants w90_constants module~w90_utility->module~w90_constants module~w90_io w90_io module~w90_parameters->module~w90_io module~w90_parameters->module~w90_constants module~w90_io->module~w90_constants

Arguments

Type IntentOptional AttributesName
complex(kind=dp), intent(inout) :: urot(num_wann,num_wann,num_kpts)

Contents


Source Code

  subroutine sitesym_symmetrize_rotation(urot)
    !==================================================================!
    use w90_parameters, only: num_wann, num_kpts, u_matrix
    use w90_utility, only: utility_zgemm

    implicit none

    integer :: ik, ir, isym, irk
    complex(kind=dp), intent(inout) :: urot(num_wann, num_wann, num_kpts)

    complex(kind=dp) :: cmat1(num_wann, num_wann)
    complex(kind=dp) :: cmat2(num_wann, num_wann)

    logical :: ldone(num_kpts)

    ldone = .false.
    do ir = 1, nkptirr
      ik = ir2ik(ir)
      ldone(ik) = .true.
      do isym = 2, nsymmetry
        irk = kptsym(isym, ir)
        if (irk .eq. ik) cycle
        if (ldone(irk)) cycle
        ldone(irk) = .true.
        ! cmat2 = UROT(k)*D(R,k)^{\dagger}
        call utility_zgemm(cmat2, urot(:, :, ik), 'N', &
                           d_matrix_wann(:, :, isym, ir), 'C', num_wann)
        ! cmat1 = D(R,k)*cmat2
        call utility_zgemm(cmat1, d_matrix_wann(:, :, isym, ir), 'N', &
                           cmat2, 'N', num_wann)
        urot(:, :, irk) = cmat1(:, :)
      enddo
    enddo
    if (any(.not. ldone)) call io_error('error in sitesym_symmetrize_rotation')

    return
  end subroutine sitesym_symmetrize_rotation