get_preceeding_opposites Function

public pure function get_preceeding_opposites(nJ, orb)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nJ(nel)
integer, intent(in) :: orb

Return Value real(kind=dp)


Contents


Source Code

    pure real(dp) function get_preceeding_opposites(nJ, orb)
        integer, intent(in) :: nJ(nel), orb

        integer :: i, tgt_spin

        get_preceeding_opposites = 0.0_dp

        tgt_spin = get_spin(nJ(orb))

        do i = 1, orb - 1
            if (get_spin(nJ(i)) /= tgt_spin) then
                get_preceeding_opposites = get_preceeding_opposites + 1.0_dp
            end if
        end do

    end function get_preceeding_opposites