CalcTMATSize Subroutine

public subroutine CalcTMATSize(nBasis, iSize)

Arguments

Type IntentOptional Attributes Name
integer :: nBasis
integer :: iSize

Contents

Source Code


Source Code

    SUBROUTINE CalcTMATSize(nBasis, iSize)
        INTEGER :: iSize, nBasis, basirrep, i, Nirrep

        IF (tCPMDSymTMat) THEN
            iSize = 0
            Nirrep = NSYMLABELS
            do i = 1, Nirrep
                basirrep = SYMLABELCOUNTS(2, i)
                ! Block diagonal.
                iSize = iSize + (basirrep * (basirrep + 1)) / 2
            end do
            iSize = iSize + 2     !lower index is -1
        ELSE
            if (tOneElecDiag) then
                iSize = nBasis
            else
                iSize = nBasis * nBasis
            end if
        end if

    END SUBROUTINE CalcTMATSize