mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-11-19 04:22:32 +01:00
fixed spin shift problem for complex
This commit is contained in:
parent
df0a876e16
commit
56fe012b25
@ -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
|
if (s2_eig) then
|
||||||
h_p = s_
|
h_p = s_
|
||||||
do k=1,shift2
|
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
|
enddo
|
||||||
if (only_expected_s2) then
|
if (only_expected_s2) then
|
||||||
alpha = 0.1d0
|
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))
|
(0.d0,0.d0), s_, size(s_,1))
|
||||||
|
|
||||||
do k=1,shift2
|
do k=1,shift2
|
||||||
s2(k) = dble(s_(k,k)) + S_z2_Sz
|
s2(k) = dble(s_(k,k))
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
if (only_expected_s2) then
|
if (only_expected_s2) then
|
||||||
|
@ -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) + &
|
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)
|
alpha * s2_matrix_all_dets(1:N_det,1:N_det)
|
||||||
do j=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
|
enddo
|
||||||
call lapack_diag_complex(eigenvalues,eigenvectors,H_prime,size(H_prime,1),N_det)
|
call lapack_diag_complex(eigenvalues,eigenvectors,H_prime,size(H_prime,1),N_det)
|
||||||
ci_electronic_energy_complex(:) = 0.d0
|
ci_electronic_energy_complex(:) = 0.d0
|
||||||
|
@ -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)
|
call s2_u_0_nstates_complex(v_0,u_0,n,keys_tmp,Nint,N_st,sze_8)
|
||||||
do i=1,N_st
|
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
|
enddo
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user