9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-08-29 20:23:40 +02:00
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 use bitmasks
BEGIN_DOC BEGIN_DOC
! Returns the index of the determinant in the ``psi_det_sorted_bit`` array ! Returns the index of the determinant in the ``psi_det_sorted_bit`` array
! using a binary search
END_DOC END_DOC
implicit none implicit none
@ -98,13 +99,11 @@ integer function get_index_in_psi_det_sorted_bit(key,Nint)
enddo enddo
if (in_wavefunction) then if (in_wavefunction) then
get_index_in_psi_det_sorted_bit = i get_index_in_psi_det_sorted_bit = i
! exit
return return
endif endif
endif endif
i += 1 i += 1
if (i > N_det) then if (i > N_det) then
! exit
return return
endif 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,1,1) = first hole alpha
! exc(1,2,2) = first particle beta ! exc(1,2,2) = first particle beta
! exc(1,1,2) = first hole 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) ASSERT (Nint > 0)