encode_mask_virt Subroutine

public pure subroutine encode_mask_virt(nI, ilut)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nI(nBasis-nel)
integer(kind=n_int), intent(out) :: ilut(0:niftot)

Contents

Source Code


Source Code

    pure subroutine encode_mask_virt(nI, ilut)
        integer, intent(in) :: nI(nBasis - nel)
        integer(n_int), intent(out) :: ilut(0:niftot)

        integer :: i, pos

        ilut = 0_n_int

        do i = 1, nBasis - nel
            pos = (nI(i) - 1) / bits_n_int
            ilut(pos) = ibset(ilut(pos), mod(nI(i) - 1, bits_n_int))
        end do

    end subroutine encode_mask_virt