Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | string(tot_nelec) | |||
integer(kind=n_int), | intent(out) | :: | ilut(0:NIfD) |
subroutine encode_string(string, ilut)
! Encode an alpha or beta string as an ilut.
integer, intent(in) :: string(tot_nelec)
integer(n_int), intent(out) :: ilut(0:NIfD)
integer :: i, pos
ilut = 0
do i = 1, tot_nelec
pos = (string(i) - 1) / bits_n_int
ilut(pos) = ibset(ilut(pos), mod(string(i) - 1, bits_n_int))
end do
end subroutine encode_string