10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-09-12 22:08:31 +02:00

fixed spin shift problem for complex

This commit is contained in:
Kevin Gasperich 2022-11-15 14:55:42 -06:00
parent df0a876e16
commit 56fe012b25
3 changed files with 4 additions and 4 deletions

View File

@ -1206,7 +1206,7 @@ subroutine davidson_diag_hjj_sjj_complex(dets_in,u_in,H_jj,s2_out,energies,dim_i
if (s2_eig) then
h_p = s_
do k=1,shift2
h_p(k,k) = h_p(k,k) + (S_z2_Sz - expected_s2)
h_p(k,k) = h_p(k,k) - expected_s2
enddo
if (only_expected_s2) then
alpha = 0.1d0
@ -1252,7 +1252,7 @@ subroutine davidson_diag_hjj_sjj_complex(dets_in,u_in,H_jj,s2_out,energies,dim_i
(0.d0,0.d0), s_, size(s_,1))
do k=1,shift2
s2(k) = dble(s_(k,k)) + S_z2_Sz
s2(k) = dble(s_(k,k))
enddo
if (only_expected_s2) then

View File

@ -310,7 +310,7 @@ END_PROVIDER
H_prime(1:N_det,1:N_det) = h_matrix_all_dets_complex(1:N_det,1:N_det) + &
alpha * s2_matrix_all_dets(1:N_det,1:N_det)
do j=1,N_det
H_prime(j,j) = H_prime(j,j) + alpha*(s_z2_sz - expected_s2)
H_prime(j,j) = H_prime(j,j) - alpha*expected_s2
enddo
call lapack_diag_complex(eigenvalues,eigenvectors,H_prime,size(H_prime,1),N_det)
ci_electronic_energy_complex(:) = 0.d0

View File

@ -20,7 +20,7 @@ subroutine u_0_S2_u_0_complex(e_0,u_0,n,keys_tmp,Nint,N_st,sze_8)
call s2_u_0_nstates_complex(v_0,u_0,n,keys_tmp,Nint,N_st,sze_8)
do i=1,N_st
e_0(i) = dble(u_dot_v_complex(u_0(1,i),v_0(1,i),n))/u_dot_u_complex(u_0(1,i),n) + S_z2_Sz
e_0(i) = dble(u_dot_v_complex(u_0(1,i),v_0(1,i),n))/u_dot_u_complex(u_0(1,i),n)
enddo
end