FindNumForbiddenOrbsNoSym Subroutine

public subroutine FindNumForbiddenOrbsNoSym(ForbiddenOrbs, ClassCountUnocc2, iSpn)

Arguments

Type IntentOptional Attributes Name
integer, intent(out) :: ForbiddenOrbs
integer, intent(in) :: ClassCountUnocc2(ScratchSize)
integer, intent(in) :: iSpn

Contents


Source Code

    SUBROUTINE FindNumForbiddenOrbsNoSym(ForbiddenOrbs, ClassCountUnocc2, iSpn)
        integer, intent(in) :: ClassCountUnocc2(ScratchSize), iSpn
        integer, intent(out) :: ForbiddenOrbs

!We know that all orbitals are totally symmetric, and that the symproduct=0

        ForbiddenOrbs = 0
        IF (iSpn == 2) THEN
            IF (ClassCountUnocc2(1) == 0) THEN
!There are no unoccupied alpha orbitals - are there any beta spins which are now forbidden?
                ForbiddenOrbs = ClassCountUnocc2(2)
            end if
            IF (ClassCountUnocc2(2) == 0) THEN
!There are no unoccupied beta orbitals - are there any alpha spins which are now forbidden?
                ForbiddenOrbs = ForbiddenOrbs + ClassCountUnocc2(1)
            end if

        else if (iSpn == 1) THEN
!If the symmetry product of the occupied orbitals is 0, then the a,b pair want to be taken from the same class.
!This means that if there is only one spin-allowed orbital in that class, it has no symmetry-allowed pairs, and so is forbidden.
            IF (ClassCountUnocc2(2) == 1) THEN
!The one beta orbital in this class is forbidden, since it cannot form a pair.
                ForbiddenOrbs = 1
            end if
        else if (iSpn == 3) THEN
            IF (ClassCountUnocc2(1) == 1) THEN
                ForbiddenOrbs = 1
            end if
        end if

    END SUBROUTINE FindNumForbiddenOrbsNoSym