2022-09-07 14:55:34 +02:00
|
|
|
|
|
|
|
! ---
|
|
|
|
|
2021-07-28 17:24:03 +02:00
|
|
|
BEGIN_PROVIDER [ double precision, dressing_column_h, (N_det,N_states) ]
|
|
|
|
&BEGIN_PROVIDER [ double precision, dressing_column_s, (N_det,N_states) ]
|
|
|
|
|
2022-09-07 14:55:34 +02:00
|
|
|
BEGIN_DOC
|
|
|
|
! \Delta_{state-specific}. \Psi
|
|
|
|
! Diagonal element is divided by 2 because Delta = D + D^t
|
|
|
|
END_DOC
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
integer :: i,ii,k,j, l
|
|
|
|
double precision :: f, tmp
|
|
|
|
double precision, allocatable :: delta(:)
|
|
|
|
|
|
|
|
allocate(delta(N_det))
|
|
|
|
delta(1:N_det) = dmc_delta_h(1:N_det,1)
|
2021-07-31 02:41:34 +02:00
|
|
|
|
2022-09-07 14:55:34 +02:00
|
|
|
call dset_order(delta,psi_bilinear_matrix_order_reverse,N_det)
|
2021-07-31 02:41:34 +02:00
|
|
|
|
2022-09-07 14:55:34 +02:00
|
|
|
dressing_column_h(:,:) = 0.d0
|
|
|
|
dressing_column_s(:,:) = 0.d0
|
2021-07-28 17:24:03 +02:00
|
|
|
|
2022-09-07 14:55:34 +02:00
|
|
|
l = dressed_column_idx(1)
|
|
|
|
do j = 1, n_det
|
|
|
|
if(j == l) cycle
|
|
|
|
dressing_column_h(j,1) = delta(j)
|
|
|
|
dressing_column_h(l,1) -= psi_coef(j,1) * delta(j) / psi_coef(l,1)
|
|
|
|
enddo
|
|
|
|
dressing_column_h(l,1) += delta(l)
|
|
|
|
dressing_column_h(l,1) *= 0.5d0
|
2021-07-28 17:24:03 +02:00
|
|
|
|
2022-09-07 14:55:34 +02:00
|
|
|
deallocate(delta)
|
2021-07-31 01:17:07 +02:00
|
|
|
|
2021-07-28 17:24:03 +02:00
|
|
|
END_PROVIDER
|
|
|
|
|
2022-09-07 14:55:34 +02:00
|
|
|
! ---
|
|
|
|
|
|
|
|
BEGIN_PROVIDER [ double precision, dressing_delta, (N_det, N_states) ]
|
|
|
|
|
|
|
|
BEGIN_DOC
|
|
|
|
!
|
|
|
|
! dressing_delta is:
|
|
|
|
! [\delta_K]_I = < I | \tilde{H} - H | \Phi_K >
|
|
|
|
!
|
|
|
|
END_DOC
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
integer :: i, j, k
|
|
|
|
double precision, allocatable :: delta(:,:)
|
|
|
|
|
|
|
|
dressing_delta(1:N_det,1:N_states) = 0.d0
|
|
|
|
|
|
|
|
allocate(delta(N_det,N_states))
|
|
|
|
|
|
|
|
do k = 1, N_states
|
|
|
|
|
|
|
|
do j = 1, N_det
|
|
|
|
delta(j,k) = dmc_delta_h(j,k)
|
|
|
|
enddo
|
|
|
|
|
|
|
|
call dset_order(delta(1:N_det,k), psi_bilinear_matrix_order_reverse, N_det)
|
|
|
|
|
|
|
|
do j = 1, N_det
|
|
|
|
dressing_delta(j,k) = delta(j,k)
|
|
|
|
enddo
|
|
|
|
|
|
|
|
enddo
|
|
|
|
|
|
|
|
deallocate(delta)
|
|
|
|
|
|
|
|
END_PROVIDER
|
2021-07-28 17:24:03 +02:00
|
|
|
|
2022-09-07 14:55:34 +02:00
|
|
|
! ---
|
2021-07-28 17:24:03 +02:00
|
|
|
|