count_open_orbs_ij Function

public elemental function count_open_orbs_ij(csf_i, i, j)

Arguments

Type IntentOptional Attributes Name
type(CSF_Info_t), intent(in) :: csf_i
integer, intent(in) :: i
integer, intent(in) :: j

Return Value integer


Contents

Source Code


Source Code

    integer elemental function count_open_orbs_ij(csf_i, i, j)
        ! function to calculate the number of open orbitals between spatial
        ! orbitals i and j in ilut. i and j have to be given ordered i<j
        type(CSF_Info_t), intent(in) :: csf_i
        integer, intent(in) :: i, j
        count_open_orbs_ij = count(csf_i%stepvector(i : j) == 1 &
                                   .or. csf_i%stepvector(i : j) == 2)
    end function count_open_orbs_ij