10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-23 04:43:45 +01:00

remove shift by S_z2_Sz (now included in diag_S_mat_elem)

This commit is contained in:
Kevin Gasperich 2020-08-21 12:42:08 -05:00
parent 770b4f6628
commit 233f9d8f28
3 changed files with 4 additions and 4 deletions

View File

@ -450,7 +450,7 @@ subroutine davidson_diag_hjj_sjj(dets_in,u_in,H_jj,s2_out,energies,dim_in,sze,N_
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
@ -496,7 +496,7 @@ subroutine davidson_diag_hjj_sjj(dets_in,u_in,H_jj,s2_out,energies,dim_in,sze,N_
0.d0, s_, size(s_,1)) 0.d0, s_, size(s_,1))
do k=1,shift2 do k=1,shift2
s2(k) = s_(k,k) + S_z2_Sz s2(k) = s_(k,k)
enddo enddo
if (only_expected_s2) then if (only_expected_s2) then

View File

@ -107,7 +107,7 @@ END_PROVIDER
H_prime(1:N_det,1:N_det) = H_matrix_all_dets(1:N_det,1:N_det) + & H_prime(1:N_det,1:N_det) = H_matrix_all_dets(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(eigenvalues,eigenvectors,H_prime,size(H_prime,1),N_det) call lapack_diag(eigenvalues,eigenvectors,H_prime,size(H_prime,1),N_det)
CI_electronic_energy(:) = 0.d0 CI_electronic_energy(:) = 0.d0

View File

@ -136,7 +136,7 @@ subroutine u_0_S2_u_0(e_0,u_0,n,keys_tmp,Nint,N_st,sze_8)
call S2_u_0_nstates(v_0,u_0,n,keys_tmp,Nint,N_st,sze_8) call S2_u_0_nstates(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) = u_dot_v(v_0(1,i),u_0(1,i),n)/u_dot_u(u_0(1,i),n) + S_z2_Sz e_0(i) = u_dot_v(v_0(1,i),u_0(1,i),n)/u_dot_u(u_0(1,i),n)
enddo enddo
end end