From c2e1301f276f1a2fbdc369550f5f8e278b37f823 Mon Sep 17 00:00:00 2001 From: Kevin Gasperich Date: Mon, 24 Feb 2020 14:43:01 -0600 Subject: [PATCH] fixed orbital ordering for complex --- src/determinants/slater_rules.irp.f | 30 ++--------------------------- src/utils_complex/qp2-pbc-diff.txt | 4 +++- 2 files changed, 5 insertions(+), 29 deletions(-) diff --git a/src/determinants/slater_rules.irp.f b/src/determinants/slater_rules.irp.f index 4b421ca9..ee331295 100644 --- a/src/determinants/slater_rules.irp.f +++ b/src/determinants/slater_rules.irp.f @@ -1582,11 +1582,6 @@ end double precision function diag_H_mat_elem_fock(det_ref,det_pert,fock_diag_tmp,Nint) - !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 @@ -2305,11 +2300,6 @@ end subroutine i_H_j_s2_complex(key_i,key_j,Nint,hij,s2) - !todo: check hole/particle index ordering for complex - if (is_complex) then - print*,irp_here,' not implemented for complex' - stop -1 - endif use bitmasks implicit none BEGIN_DOC @@ -2352,10 +2342,8 @@ subroutine i_H_j_s2_complex(key_i,key_j,Nint,hij,s2) s2 = -phase endif if(exc(1,1,1) == exc(1,2,2) )then - !TODO: check indices hij = phase * big_array_exchange_integrals_complex(exc(1,1,1),exc(1,1,2),exc(1,2,1)) else if (exc(1,2,1) ==exc(1,1,2))then - !TODO: check indices hij = phase * big_array_exchange_integrals_complex(exc(1,2,1),exc(1,1,1),exc(1,2,2)) else hij = phase*get_two_e_integral_complex( & @@ -2404,8 +2392,7 @@ subroutine i_H_j_s2_complex(key_i,key_j,Nint,hij,s2) p = exc(1,2,2) spin = 2 endif - !TODO: check indices - call get_single_excitation_from_fock_complex(key_i,key_j,p,m,spin,phase,hij) + call get_single_excitation_from_fock_complex(key_i,key_j,m,p,spin,phase,hij) case (0) double precision, external :: diag_S_mat_elem @@ -2417,11 +2404,6 @@ end subroutine i_H_j_complex(key_i,key_j,Nint,hij) - !todo: check index ordering for complex - if (is_complex) then - print*,irp_here,' not implemented for complex' - stop -1 - endif use bitmasks implicit none BEGIN_DOC @@ -2459,10 +2441,8 @@ subroutine i_H_j_complex(key_i,key_j,Nint,hij) if (exc(0,1,1) == 1) then ! Single alpha, single beta if(exc(1,1,1) == exc(1,2,2) )then - !todo: check indices hij = phase * big_array_exchange_integrals_complex(exc(1,1,1),exc(1,1,2),exc(1,2,1)) else if (exc(1,2,1) ==exc(1,1,2))then - !todo: check indices hij = phase * big_array_exchange_integrals_complex(exc(1,2,1),exc(1,1,1),exc(1,2,2)) else hij = phase*get_two_e_integral_complex( & @@ -2511,8 +2491,7 @@ subroutine i_H_j_complex(key_i,key_j,Nint,hij) p = exc(1,2,2) spin = 2 endif - !todo: check indices - call get_single_excitation_from_fock_complex(key_i,key_j,p,m,spin,phase,hij) + call get_single_excitation_from_fock_complex(key_i,key_j,m,p,spin,phase,hij) case (0) hij = dcmplx(diag_H_mat_elem(key_i,Nint),0.d0) @@ -2524,11 +2503,6 @@ end subroutine i_H_j_verbose_complex(key_i,key_j,Nint,hij,hmono,hdouble,phase) - !todo: check index ordering for complex - if (is_complex) then - print*,irp_here,' not implemented for complex' - stop -1 - endif use bitmasks implicit none BEGIN_DOC diff --git a/src/utils_complex/qp2-pbc-diff.txt b/src/utils_complex/qp2-pbc-diff.txt index 61726ec2..0146fc16 100644 --- a/src/utils_complex/qp2-pbc-diff.txt +++ b/src/utils_complex/qp2-pbc-diff.txt @@ -154,7 +154,9 @@ NOTES: _{4,n} = _{8,n} + <(k+1)j|i(l+1)>_{8,n-1} - + indices out of order; needed to switch for complex: + i_h_j_s2 for singles + i_h_j for singles ############################ # utils, ezfio, ... #