mirror of
https://github.com/LCPQ/quantum_package
synced 2024-09-01 09:03:42 +02:00
Corrected S2 for MRCC
This commit is contained in:
parent
cc947afc89
commit
7c2ed4214e
@ -404,14 +404,14 @@ subroutine u_0_H_u_0_mrcc_nstates(e_0,u_0,n,keys_tmp,Nint,istate,N_st,sze_8)
|
|||||||
END_DOC
|
END_DOC
|
||||||
integer, intent(in) :: n,Nint,N_st,sze_8
|
integer, intent(in) :: n,Nint,N_st,sze_8
|
||||||
double precision, intent(out) :: e_0(N_st)
|
double precision, intent(out) :: e_0(N_st)
|
||||||
double precision, intent(in) :: u_0(n,N_st)
|
double precision, intent(in) :: u_0(sze_8,N_st)
|
||||||
integer(bit_kind),intent(in) :: keys_tmp(Nint,2,n)
|
integer(bit_kind),intent(in) :: keys_tmp(Nint,2,n)
|
||||||
integer,intent(in) :: istate
|
integer,intent(in) :: istate
|
||||||
|
|
||||||
double precision :: H_jj(n)
|
double precision, allocatable :: v_0(:,:), H_jj(:)
|
||||||
double precision :: v_0(n,N_st)
|
|
||||||
double precision :: u_dot_u,u_dot_v,diag_H_mat_elem
|
double precision :: u_dot_u,u_dot_v,diag_H_mat_elem
|
||||||
integer :: i,j
|
integer :: i,j
|
||||||
|
allocate(H_jj(n), v_0(sze_8,N_st))
|
||||||
do i = 1, n
|
do i = 1, n
|
||||||
H_jj(i) = diag_H_mat_elem(keys_tmp(1,1,i),Nint)
|
H_jj(i) = diag_H_mat_elem(keys_tmp(1,1,i),Nint)
|
||||||
enddo
|
enddo
|
||||||
@ -424,6 +424,7 @@ subroutine u_0_H_u_0_mrcc_nstates(e_0,u_0,n,keys_tmp,Nint,istate,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)
|
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
|
||||||
|
deallocate(H_jj, v_0)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -246,7 +246,7 @@ END_PROVIDER
|
|||||||
psi_coef(i,j) = CI_eigenvectors_dressed(i,j)
|
psi_coef(i,j) = CI_eigenvectors_dressed(i,j)
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
call u_0_H_u_0_nstates(e_array,psi_coef,n_det,psi_det,N_int,N_states_diag,psi_det_size)
|
call u_0_H_u_0_mrcc_nstates(e_array,psi_coef,n_det,psi_det,N_int,mrcc_state,N_states_diag,psi_det_size)
|
||||||
|
|
||||||
! Browsing the "n_states_diag" states and getting the lowest in energy "n_states" ones that have the S^2 value
|
! Browsing the "n_states_diag" states and getting the lowest in energy "n_states" ones that have the S^2 value
|
||||||
! closer to the "expected_s2" set as input
|
! closer to the "expected_s2" set as input
|
||||||
|
Loading…
Reference in New Issue
Block a user