mirror of
https://github.com/LCPQ/quantum_package
synced 2024-12-25 05:43:47 +01:00
Working on fix for MRCC but maybe broke ShiftedBk.
This commit is contained in:
parent
26e51230a8
commit
db10fcceeb
@ -175,14 +175,29 @@ BEGIN_PROVIDER [ double precision, h_matrix_dressed, (N_det,N_det) ]
|
|||||||
integer :: i, j, k
|
integer :: i, j, k
|
||||||
|
|
||||||
h_matrix_dressed(1:N_det,1:N_det) = h_matrix_all_dets(1:N_det,1:N_det)
|
h_matrix_dressed(1:N_det,1:N_det) = h_matrix_all_dets(1:N_det,1:N_det)
|
||||||
|
|
||||||
|
! do k=1,N_states
|
||||||
|
! do j=1,N_det
|
||||||
|
! do i=1,N_det
|
||||||
|
! h_matrix_dressed(i,j) = h_matrix_dressed(i,j) + &
|
||||||
|
! 0.5d0 * (dressing_column_h(i,k) * psi_coef(j,k) + &
|
||||||
|
! dressing_column_h(j,k) * psi_coef(i,k))
|
||||||
|
! enddo
|
||||||
|
! enddo
|
||||||
|
! enddo
|
||||||
|
|
||||||
|
integer :: l,jj
|
||||||
|
double precision :: f
|
||||||
do k=1,N_states
|
do k=1,N_states
|
||||||
do j=1,N_det
|
l = dressed_column_idx(k)
|
||||||
do i=1,N_det
|
f = 1.d0/psi_coef(l,k)
|
||||||
h_matrix_dressed(i,j) = h_matrix_dressed(i,j) + &
|
do i=1,N_det
|
||||||
0.5d0 * (dressing_column_h(i,k) * psi_coef(j,k) + &
|
if (i==l) cycle
|
||||||
dressing_column_h(j,k) * psi_coef(i,k))
|
h_matrix_dressed(i,l) = h_matrix_dressed(i,l) + dressing_column_h(i,k) *f
|
||||||
enddo
|
h_matrix_dressed(l,i) = h_matrix_dressed(l,i) + dressing_column_h(i,k) *f
|
||||||
|
h_matrix_dressed(l,l) = h_matrix_dressed(l,l) - psi_coef(i,k) * dressing_column_h(i,k) *f*f
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
BEGIN_PROVIDER [ double precision, dressing_column_h, (N_det,N_states) ]
|
BEGIN_PROVIDER [ double precision, dressing_column_h, (N_det,N_states) ]
|
||||||
&BEGIN_PROVIDER [ double precision, dressing_column_s, (N_det,N_states) ]
|
&BEGIN_PROVIDER [ double precision, dressing_column_s, (N_det,N_states) ]
|
||||||
implicit none
|
implicit none
|
||||||
@ -22,3 +21,5 @@
|
|||||||
enddo
|
enddo
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -483,6 +483,7 @@ END_PROVIDER
|
|||||||
threshold_selectors = 1.d0
|
threshold_selectors = 1.d0
|
||||||
threshold_generators = 1d0
|
threshold_generators = 1d0
|
||||||
target_error = thresh_dressed_ci * 5.d-2
|
target_error = thresh_dressed_ci * 5.d-2
|
||||||
|
target_error = 0.d0
|
||||||
call ZMQ_mrcc(E_CI_before, mrcc, delta_ij_mrcc_zmq, delta_ij_s2_mrcc_zmq, abs(target_error))
|
call ZMQ_mrcc(E_CI_before, mrcc, delta_ij_mrcc_zmq, delta_ij_s2_mrcc_zmq, abs(target_error))
|
||||||
|
|
||||||
mrcc_previous_E(:) = mrcc_E0_denominator(:)
|
mrcc_previous_E(:) = mrcc_E0_denominator(:)
|
||||||
|
@ -1,30 +1,70 @@
|
|||||||
|
|
||||||
|
|
||||||
BEGIN_PROVIDER [ double precision, dressing_column_h, (N_det,N_states) ]
|
BEGIN_PROVIDER [ double precision, dressing_column_h, (N_det,N_states) ]
|
||||||
&BEGIN_PROVIDER [ double precision, dressing_column_s, (N_det,N_states) ]
|
&BEGIN_PROVIDER [ double precision, dressing_column_s, (N_det,N_states) ]
|
||||||
implicit none
|
implicit none
|
||||||
BEGIN_DOC
|
BEGIN_DOC
|
||||||
! Null dressing vectors
|
! \Delta_{state-specific}. \Psi
|
||||||
END_DOC
|
END_DOC
|
||||||
|
|
||||||
integer :: i,ii,k,j,jj, l
|
integer :: i,ii,k,j, l
|
||||||
double precision :: f, tmp
|
double precision :: f, tmp
|
||||||
double precision, external :: u_dot_v
|
double precision, external :: u_dot_v
|
||||||
|
logical, external :: detEq
|
||||||
|
|
||||||
dressing_column_h(:,:) = 0.d0
|
dressing_column_h(:,:) = 0.d0
|
||||||
dressing_column_s(:,:) = 0.d0
|
dressing_column_s(:,:) = 0.d0
|
||||||
|
|
||||||
do k=1,N_states
|
do k=1,N_states
|
||||||
l = dressed_column_idx(k)
|
integer :: jj
|
||||||
f = -1.d0/psi_coef(l,k)
|
|
||||||
do jj=1,N_det_non_ref
|
do jj=1,N_det_non_ref
|
||||||
j = idx_non_ref(jj)
|
j = idx_non_ref(jj)
|
||||||
dressing_column_h(j,k) = 2.d0*delta_ij (k,jj)
|
dressing_column_h(j,k) = delta_ij (k,jj)
|
||||||
dressing_column_s(j,k) = 2.d0*delta_ij_s2(k,jj)
|
dressing_column_s(j,k) = delta_ij_s2(k,jj)
|
||||||
dressing_column_h(l,k) += psi_coef(j,k) * delta_ij(k,jj)
|
enddo
|
||||||
dressing_column_s(l,k) += psi_coef(j,k) * delta_ij_s2(k,jj)
|
|
||||||
enddo
|
|
||||||
dressing_column_h(l,k) *= f
|
|
||||||
dressing_column_s(l,k) *= f
|
|
||||||
enddo
|
enddo
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
! BEGIN_PROVIDER [ double precision, dressing_column_h, (N_det,N_states) ]
|
||||||
|
!&BEGIN_PROVIDER [ double precision, dressing_column_s, (N_det,N_states) ]
|
||||||
|
! implicit none
|
||||||
|
! BEGIN_DOC
|
||||||
|
! ! Null dressing vectors
|
||||||
|
! END_DOC
|
||||||
|
!
|
||||||
|
! integer :: i,ii,k,j,jj, l
|
||||||
|
! double precision :: f, tmp
|
||||||
|
! double precision, external :: u_dot_v
|
||||||
|
!
|
||||||
|
! dressing_column_h(:,:) = 0.d0
|
||||||
|
! dressing_column_s(:,:) = 0.d0
|
||||||
|
! do k=1,N_states
|
||||||
|
! l = dressed_column_idx(k)
|
||||||
|
! f = 1.d0/psi_coef(l,k)
|
||||||
|
!
|
||||||
|
! do jj=1,N_det_non_ref
|
||||||
|
! j = idx_non_ref(jj)
|
||||||
|
! if (j /= l) then
|
||||||
|
! dressing_column_h(j,k) = 2.d0*delta_ij (k,jj)
|
||||||
|
! dressing_column_s(j,k) = 2.d0*delta_ij_s2(k,jj)
|
||||||
|
! else
|
||||||
|
! dressing_column_h(j,k) = delta_ij (k,jj)
|
||||||
|
! dressing_column_s(j,k) = delta_ij_s2(k,jj)
|
||||||
|
! endif
|
||||||
|
! enddo
|
||||||
|
!
|
||||||
|
! double precision :: h,s2
|
||||||
|
! h = u_dot_v (dressing_column_h(1,k), psi_coef(1,k), N_det) - psi_coef(l,k) * dressing_column_h(l,k)
|
||||||
|
! s2 = u_dot_v (dressing_column_s(1,k), psi_coef(1,k), N_det) - psi_coef(l,k) * dressing_column_s(l,k)
|
||||||
|
!
|
||||||
|
! dressing_column_h(l,k) = dressing_column_h(l,k) - 0.5d0 * h
|
||||||
|
! dressing_column_s(l,k) = dressing_column_s(l,k) - 0.5d0 * s2
|
||||||
|
!
|
||||||
|
! dressing_column_h(:,k) *= f
|
||||||
|
! dressing_column_s(:,k) *= f
|
||||||
|
!
|
||||||
|
! enddo
|
||||||
|
!END_PROVIDER
|
||||||
|
!
|
||||||
|
@ -7,7 +7,7 @@ BEGIN_PROVIDER [ integer, dressed_column_idx, (N_states) ]
|
|||||||
double precision :: tmp
|
double precision :: tmp
|
||||||
integer, external :: idamax
|
integer, external :: idamax
|
||||||
do i=1,N_states
|
do i=1,N_states
|
||||||
dressed_column_idx(i) = idamax(size(psi_coef,1), psi_coef(1,i), 1)
|
dressed_column_idx(i) = idamax(N_det, psi_coef(1,i), 1)
|
||||||
enddo
|
enddo
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user