CheckIfSingleExcits Subroutine

public subroutine CheckIfSingleExcits(ElecsWNoExcits, ClassCount2, ClassCountUnocc2, nI)

Run through all labels

If there are electrons in this class with no possible unoccupied orbitals in the

There are no single excitations from this determinant at all. This means the

Then we will create a double excitation instead.

Arguments

Type IntentOptional Attributes Name
integer, intent(out) :: ElecsWNoExcits
integer, intent(in) :: ClassCount2(ScratchSize)
integer, intent(in) :: ClassCountUnocc2(ScratchSize)
integer, intent(in) :: nI(NEl)

Contents

Source Code


Source Code

    SUBROUTINE CheckIfSingleExcits(ElecsWNoExcits, ClassCount2, ClassCountUnocc2, nI)
        INTEGER, intent(out) :: ElecsWNoExcits
        integer, intent(in) :: ClassCount2(ScratchSize), ClassCountUnocc2(ScratchSize)
        INTEGER, intent(in) :: nI(NEl)
        integer :: i

!First, we need to find out if there are any electrons which have no possible excitations.
!This is because these will need to be redrawn and so will affect the probabilities.
        ElecsWNoExcits = 0

        IF (tFixLz .or. tKPntSym) THEN
!Here, we also have to check that the electron is momentum allowed.
!Since there are many more irreps, it will be quicker here to check all electrons, rather than all the symmetries.

            do i = 1, NEl

                IF (G1(nI(i))%Ms == 1) THEN
                    IF (ClassCountUnocc2(ClassCountInd(1, SpinOrbSymLabel(nI(i)), G1(nI(i))%Ml)) == 0) THEN
                        ElecsWNoExcits = ElecsWNoExcits + 1
                    end if
                ELSE
                    IF (ClassCountUnocc2(ClassCountInd(2, SpinOrbSymLabel(nI(i)), G1(nI(i))%Ml)) == 0) THEN
                        ElecsWNoExcits = ElecsWNoExcits + 1
                    end if
                end if
            end do

!            do i=1,ScratchSize
!!Run through all labels
!                IF((ClassCount2(i).ne.0).and.(ClassCountUnocc2(i).eq.0)) THEN
!!If there are electrons in this class with no possible unoccupied orbitals in the
!same class, these electrons have no single excitations.
!                    ElecsWNoExcits=ElecsWNoExcits+ClassCount2(i)
!                end if
!            end do

        ELSE

            do i = 1, ScratchSize
!Run through all labels
                IF ((ClassCount2(i) /= 0) .and. (ClassCountUnocc2(i) == 0)) THEN
!If there are electrons in this class with no possible unoccupied orbitals in the same
!class, these electrons have no single excitations.
                    ElecsWNoExcits = ElecsWNoExcits + ClassCount2(i)
                end if
            end do
        end if

!Rather than choosing a double now if there are no singles, just return a null det.
!        IF(ElecsWNoExcits.eq.NEl) THEN
!!There are no single excitations from this determinant at all. This means the
!probability to create a double excitation = 1
!!Then we will create a double excitation instead.
!            pDoubNew=1.0_dp
!            RETURN
!        end if
!
    END SUBROUTINE CheckIfSingleExcits