EncodeBitDet_guga Subroutine

public pure subroutine EncodeBitDet_guga(nI, ilut)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nI(nEl)
integer(kind=n_int), intent(out) :: ilut(0:GugaBits%len_tot)

Contents

Source Code


Source Code

    pure subroutine EncodeBitDet_guga(nI, ilut)
        ! special function to encode bit dets for the use in the guga
        ! excitation generation
        integer, intent(in) :: nI(nEl)
        integer(n_int), intent(out) :: ilut(0:GugaBits%len_tot)

        integer :: i, pos

        ilut = 0_n_int

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

    end subroutine EncodeBitDet_guga