GETSYMDEGEN Subroutine

public subroutine GETSYMDEGEN(ISym, nBasisMax, IDEGEN)

Arguments

Type IntentOptional Attributes Name
type(BasisFN) :: ISym
integer :: nBasisMax(5,*)
integer :: IDEGEN

Contents

Source Code


Source Code

    SUBROUTINE GETSYMDEGEN(ISYM, NBASISMAX, IDEGEN)
        IMPLICIT NONE
        TYPE(BasisFN) ISym, ISym2
        INTEGER nBasisMax(5, *), IDEGEN, I, J
        LOGICAL TDO
        IDEGEN = 0
        IF (NBASISMAX(3, 3) == 0) THEN
!   Hubbard
            DO I = 0, 7
                TDO = .TRUE.
                DO J = 1, 3
                    IF (.NOT. BTEST(I, J - 1)) THEN
                        ISYM2%k(J) = ISYM%k(J)
                    ELSE
                        ISYM2%k(J) = -ISYM%k(J)
                        IF (ISYM%k(J) == 0) TDO = .FALSE.
                    end if
                end do
                IF (TDO .AND. KALLOWED(ISYM2, NBASISMAX)) IDEGEN = IDEGEN + 1
            end do
        ELSE
            IDEGEN = 1
        end if
!   Spin
        IF (ISYM%Ms /= 0) IDEGEN = IDEGEN * 2
    END SUBROUTINE GETSYMDEGEN