1
0
mirror of https://gitlab.com/scemama/qp_plugins_scemama.git synced 2024-12-22 20:34:05 +01:00

dmc_dress OK

This commit is contained in:
Anthony Scemama 2021-07-31 02:41:34 +02:00
parent 47b41fd82d
commit 6d5ec01e01
2 changed files with 13 additions and 6 deletions

View File

@ -15,6 +15,7 @@ end
subroutine pre subroutine pre
implicit none implicit none
double precision, allocatable :: left(:,:), right(:,:), tmp(:,:), res(:,:) double precision, allocatable :: left(:,:), right(:,:), tmp(:,:), res(:,:)
integer :: i
allocate (left(1,1:N_det), right(1:N_det,1), tmp(1:N_det,1), res(1,1)) allocate (left(1,1:N_det), right(1:N_det,1), tmp(1:N_det,1), res(1,1))
left(1,1:N_det) = psi_coef(1:N_det,1) left(1,1:N_det) = psi_coef(1:N_det,1)
right(1:N_det,1) = psi_coef(1:N_det,1) right(1:N_det,1) = psi_coef(1:N_det,1)
@ -22,7 +23,9 @@ subroutine pre
tmp(1:N_det,1:1) = matmul(h_matrix_dressed(1:N_det,1:N_det), right(1:N_det,1:1)) tmp(1:N_det,1:1) = matmul(h_matrix_dressed(1:N_det,1:N_det), right(1:N_det,1:1))
res(1:1,1:1) = matmul(left(1:1,1:N_det), tmp(1:N_det,1:1)) res(1:1,1:1) = matmul(left(1:1,1:N_det), tmp(1:N_det,1:1))
print *, 'E_in = ', res(1,1) print *, 'E_in = ', res(1,1)
print *, 'HPsi/c0 = ', tmp(1,1)/psi_coef(1,1) do i=1,N_det
print *, 'HPsi/c0 = ', tmp(i,1)/psi_coef(i,1)
enddo
end end
subroutine routine subroutine routine
implicit none implicit none

View File

@ -8,6 +8,12 @@
integer :: i,ii,k,j, l integer :: i,ii,k,j, l
double precision :: f, tmp double precision :: f, tmp
double precision, allocatable :: delta(:)
allocate(delta(N_det))
delta(1:N_det) = dmc_delta_h(1:N_det)
call dset_order(delta,psi_bilinear_matrix_order_reverse,N_det)
dressing_column_h(:,:) = 0.d0 dressing_column_h(:,:) = 0.d0
dressing_column_s(:,:) = 0.d0 dressing_column_s(:,:) = 0.d0
@ -15,14 +21,12 @@
l = dressed_column_idx(1) l = dressed_column_idx(1)
do j = 1, n_det do j = 1, n_det
if (j == l) cycle if (j == l) cycle
dressing_column_h(j,1) = dmc_delta_h(j) dressing_column_h(j,1) = delta(j)
dressing_column_h(l,1) -= psi_coef(j,1) * dmc_delta_h(j) / psi_coef(l,1) dressing_column_h(l,1) -= psi_coef(j,1) * delta(j) / psi_coef(l,1)
enddo enddo
dressing_column_h(l,1) += dmc_delta_h(l) dressing_column_h(l,1) += delta(l)
dressing_column_h(l,1) *= 0.5d0 dressing_column_h(l,1) *= 0.5d0
print *, 'COUCOU XXX'
END_PROVIDER END_PROVIDER