diff --git a/src/determinants/slater_rules.irp.f b/src/determinants/slater_rules.irp.f index ee331295..0ce55109 100644 --- a/src/determinants/slater_rules.irp.f +++ b/src/determinants/slater_rules.irp.f @@ -2644,11 +2644,6 @@ end 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 implicit none 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(bit_kind), intent(in) :: keys(Nint,2,Ndet) integer(bit_kind), intent(in) :: key(Nint,2) - double precision, intent(in) :: coef(Ndet_max,Nstate) - double precision, intent(out) :: i_H_psi_array(Nstate) + complex*16, intent(in) :: coef(Ndet_max,Nstate) + complex*16, intent(out) :: i_H_psi_array(Nstate) integer :: i, ii,j double precision :: phase integer :: exc(0:2,2,2) - double precision :: hij + complex*16 :: hij integer, allocatable :: idx(:) 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) 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 do ii=1,idx(0) i = idx(ii) !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 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) i = idx(ii) !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 i_H_psi_array(j) = i_H_psi_array(j) + coef(i,j)*hij enddo