10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-12-24 13:23:41 +01:00

Fixed bug introduced in 98b2384d43

This commit is contained in:
Anthony Scemama 2018-09-21 11:13:38 +02:00
parent 1139d31fbb
commit 5e19eb4aaa

View File

@ -61,17 +61,18 @@ subroutine occ_pattern_to_dets(o,d,sze,n_alpha,Nint)
amax -= popcnt( o(k,2) ) amax -= popcnt( o(k,2) )
enddo enddo
nt = 0 call bitstring_to_list(o(1,1), list_todo, nt, Nint)
ishift = 2 ! nt = 0
do i=1,Nint ! ishift = 2
l = o(i,1) ! do i=1,Nint
do while (l /= 0_bit_kind) ! l = o(i,1)
nt = nt+1 ! do while (l /= 0_bit_kind)
list_todo(nt) = ishift+popcnt(l-1_bit_kind) - popcnt(l) ! nt = nt+1
l = iand(l,l-1_bit_kind) ! list_todo(nt) = ishift+popcnt(l-1_bit_kind) - popcnt(l)
enddo ! l = iand(l,l-1_bit_kind)
ishift = ishift + bit_kind_size ! enddo
enddo ! ishift = ishift + bit_kind_size
! enddo
na = 0 na = 0
nd = 0 nd = 0