mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-23 03:53:29 +01:00
i_h_psi_complex
This commit is contained in:
parent
c2e1301f27
commit
6584bd46db
@ -2644,11 +2644,6 @@ end
|
|||||||
|
|
||||||
|
|
||||||
subroutine i_H_psi_complex(key,keys,coef,Nint,Ndet,Ndet_max,Nstate,i_H_psi_array)
|
subroutine i_H_psi_complex(key,keys,coef,Nint,Ndet,Ndet_max,Nstate,i_H_psi_array)
|
||||||
!todo: modify/implement for complex
|
|
||||||
if (is_complex) then
|
|
||||||
print*,irp_here,' not implemented for complex'
|
|
||||||
stop -1
|
|
||||||
endif
|
|
||||||
use bitmasks
|
use bitmasks
|
||||||
implicit none
|
implicit none
|
||||||
BEGIN_DOC
|
BEGIN_DOC
|
||||||
@ -2662,13 +2657,13 @@ subroutine i_H_psi_complex(key,keys,coef,Nint,Ndet,Ndet_max,Nstate,i_H_psi_array
|
|||||||
integer, intent(in) :: Nint, Ndet,Ndet_max,Nstate
|
integer, intent(in) :: Nint, Ndet,Ndet_max,Nstate
|
||||||
integer(bit_kind), intent(in) :: keys(Nint,2,Ndet)
|
integer(bit_kind), intent(in) :: keys(Nint,2,Ndet)
|
||||||
integer(bit_kind), intent(in) :: key(Nint,2)
|
integer(bit_kind), intent(in) :: key(Nint,2)
|
||||||
double precision, intent(in) :: coef(Ndet_max,Nstate)
|
complex*16, intent(in) :: coef(Ndet_max,Nstate)
|
||||||
double precision, intent(out) :: i_H_psi_array(Nstate)
|
complex*16, intent(out) :: i_H_psi_array(Nstate)
|
||||||
|
|
||||||
integer :: i, ii,j
|
integer :: i, ii,j
|
||||||
double precision :: phase
|
double precision :: phase
|
||||||
integer :: exc(0:2,2,2)
|
integer :: exc(0:2,2,2)
|
||||||
double precision :: hij
|
complex*16 :: hij
|
||||||
integer, allocatable :: idx(:)
|
integer, allocatable :: idx(:)
|
||||||
|
|
||||||
ASSERT (Nint > 0)
|
ASSERT (Nint > 0)
|
||||||
@ -2678,15 +2673,15 @@ subroutine i_H_psi_complex(key,keys,coef,Nint,Ndet,Ndet_max,Nstate,i_H_psi_array
|
|||||||
ASSERT (Ndet_max >= Ndet)
|
ASSERT (Ndet_max >= Ndet)
|
||||||
allocate(idx(0:Ndet))
|
allocate(idx(0:Ndet))
|
||||||
|
|
||||||
i_H_psi_array = 0.d0
|
i_H_psi_array = (0.d0,0.d0)
|
||||||
|
|
||||||
call filter_connected_i_H_psi0(keys,key,Nint,Ndet,idx)
|
call filter_connected_i_h_psi0(keys,key,Nint,Ndet,idx)
|
||||||
if (Nstate == 1) then
|
if (Nstate == 1) then
|
||||||
|
|
||||||
do ii=1,idx(0)
|
do ii=1,idx(0)
|
||||||
i = idx(ii)
|
i = idx(ii)
|
||||||
!DIR$ FORCEINLINE
|
!DIR$ FORCEINLINE
|
||||||
call i_H_j(keys(1,1,i),key,Nint,hij)
|
call i_h_j_complex(key,keys(1,1,i),Nint,hij)
|
||||||
i_H_psi_array(1) = i_H_psi_array(1) + coef(i,1)*hij
|
i_H_psi_array(1) = i_H_psi_array(1) + coef(i,1)*hij
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
@ -2695,7 +2690,7 @@ subroutine i_H_psi_complex(key,keys,coef,Nint,Ndet,Ndet_max,Nstate,i_H_psi_array
|
|||||||
do ii=1,idx(0)
|
do ii=1,idx(0)
|
||||||
i = idx(ii)
|
i = idx(ii)
|
||||||
!DIR$ FORCEINLINE
|
!DIR$ FORCEINLINE
|
||||||
call i_H_j(keys(1,1,i),key,Nint,hij)
|
call i_h_j_complex(key,keys(1,1,i),Nint,hij)
|
||||||
do j = 1, Nstate
|
do j = 1, Nstate
|
||||||
i_H_psi_array(j) = i_H_psi_array(j) + coef(i,j)*hij
|
i_H_psi_array(j) = i_H_psi_array(j) + coef(i,j)*hij
|
||||||
enddo
|
enddo
|
||||||
|
Loading…
Reference in New Issue
Block a user