SUBROUTINE GenKPtIrreps(nTranslat, nKps, KpntInd, nStates)
IMPLICIT NONE
INTEGER I, nStates
INTEGER nTranslat, nKps, KpntInd(nStates)
character(*), parameter :: this_routine = 'GenKPtIrreps'
nSymLabels = nKps
nRot = nTranslat
allocate(SymLabelChars(nRot, nSymLabels))
call LogMemAlloc('SymLabelChars', nSymLabels * nRot, 16, this_routine, tagSymLabelChars)
allocate(SymLabels(nSymLabels))
call LogMemAlloc('SymLabels', nSymLabels, 4, this_routine, tagSymLabels)
allocate(SymClasses(nStates))
call LogMemAlloc('SymClasses', nStates, 4, this_routine, tagSymClasses)
SYMLABELCHARS = 0.0_dp
DO I = 1, nStates
SymClasses(I) = KpntInd(I)
SymLabels(KPntInd(I))%s = ComposeAbelianSym(KpntSym(:, KPntInd(I)))
END DO
write(stdout, *)
write(stdout, '(a11," |",a13,"|",a10)') ' K-vector', ' Label ', 'Conjugate'
write(stdout, '(39("-"))')
do i = 1, nSymLabels
write(stdout, '("(",3i3,")"," | ")', advance='no') KpntSym(:, I)
call writesym(stdout, SymLabels(I), .false.)
write(stdout, '(A)', advance='no') " | "
call writesym(stdout, SymConj(SymLabels(I)), .true.)
end do
! write(stdout,'(/,a)') 'Symmetry Multiplication Table'
! do i=1,nSymLabels
! do j=1,nSymLabels
! write(stdout,'(z12)',advance='no') SymProd(SymLabels(I),SymLabels(J))
! end do
! write(stdout,*)
! end do
! write(stdout,'(/)')
! write(stdout,*) "SYMMETRY CLASSES"
! CALL writeirreptab(stdout, SYMLABELCHARS,NROT,NSYMLABELS)
!.. Allocate memory gor irreps.
!.. Assume there will be no more than 64 irreps
! CALL N_MEMORY(IP_IRREPCHARS,NROT*64*2,"IRREPCH")
END SUBROUTINE GenKPtIrreps