GETSYMTMATSIZE Subroutine

public subroutine GETSYMTMATSIZE(Nirrep, nBasis, iSS, iSize)

Arguments

Type IntentOptional Attributes Name
integer :: Nirrep
integer :: nBasis
integer :: iSS
integer(kind=int64) :: iSize

Contents

Source Code


Source Code

    SUBROUTINE GETSYMTMATSIZE(Nirrep, nBasis, iSS, iSize)
        implicit none
        integer Nirrep, nBasis, iSS, nBi, i, basirrep, t
        integer(int64) iSize
        character(*), parameter :: this_routine = 'GetSymTMATSize'
        nBi = nBasis / iSS
        iSize = 0
        allocate(SymLabelIntsCum(nIrrep))
        call LogMemAlloc('SymLabelIntsCum', nIrrep, 4, this_routine, tagSymLabelIntsCum)
        allocate(SymLabelCountsCum(nIrrep))
        call LogMemAlloc('SymLabelCountsCum', nIrrep, 4, this_routine, tagSymLabelCountsCum)
        SYMLABELINTSCUM(1:Nirrep) = 0
        SYMLABELCOUNTSCUM(1:Nirrep) = 0
        do i = 1, Nirrep
            basirrep = SYMLABELCOUNTS(2, i)
            iSize = iSize + (basirrep * (basirrep + 1)) / 2
            SYMLABELINTSCUM(i) = int(iSize)
            IF (i == 1) THEN
                SYMLABELCOUNTSCUM(i) = 0
            ELSE
                DO t = 1, (i - 1)
                    SYMLABELCOUNTSCUM(i) = SYMLABELCOUNTSCUM(i) + SYMLABELCOUNTS(2, t)
                end do
            end if
            write(stdout, *) basirrep, SYMLABELINTSCUM(i), SYMLABELCOUNTSCUM(i)
            call neci_flush(stdout)
        end do
        iSize = iSize + 2
        !This is to allow the index of '-1' in the array to give a zero value
    END SUBROUTINE GETSYMTMATSIZE