This commit is contained in:
Anthony Scemama 2021-04-20 14:56:34 +02:00
parent 9b32fc67ac
commit be4e91517b
2 changed files with 11 additions and 2 deletions

View File

@ -32,6 +32,7 @@ integer function get_index_in_psi_det_sorted_bit(key,Nint)
use bitmasks
BEGIN_DOC
! Returns the index of the determinant in the ``psi_det_sorted_bit`` array
! using a binary search
END_DOC
implicit none
@ -98,13 +99,11 @@ integer function get_index_in_psi_det_sorted_bit(key,Nint)
enddo
if (in_wavefunction) then
get_index_in_psi_det_sorted_bit = i
! exit
return
endif
endif
i += 1
if (i > N_det) then
! exit
return
endif

View File

@ -77,6 +77,16 @@ subroutine get_excitation(det1,det2,exc,degree,phase,Nint)
! exc(1,1,1) = first hole alpha
! exc(1,2,2) = first particle beta
! exc(1,1,2) = first hole beta
! E_pq : T^alpha_pq + T^beta_pq
! T^alpha_pq : exc(0,1,1) = 1
! exc(0,2,1) = 1
! exc(1,1,1) = q
! exc(1,2,1) = p
! T^alpha_pq : exc(0,1,2) = 1
! exc(0,2,2) = 1
! exc(1,1,2) = q
! exc(1,2,2) = p
ASSERT (Nint > 0)