mirror of
https://gitlab.com/scemama/qmcchem.git
synced 2024-12-21 11:53:30 +01:00
DMC dressing
This commit is contained in:
parent
f4b4f62618
commit
bbb67f88b5
@ -9,6 +9,7 @@ mkdir -p Downloads _build
|
||||
|
||||
cd "${QMCCHEM_PATH}"
|
||||
|
||||
set +e
|
||||
if [[ ! -f make.config ]]
|
||||
then
|
||||
which ifort > /dev/null
|
||||
|
@ -19,7 +19,20 @@ subroutine step2
|
||||
print *, 'w = ', block_weight
|
||||
print *, 'Accept', accep_rate()
|
||||
print *, ''
|
||||
print *, ci_dress_vmc_block_walk
|
||||
BEGIN_SHELL [ /usr/bin/env python2 ]
|
||||
from properties import *
|
||||
|
||||
derivlist = []
|
||||
|
||||
for p in properties:
|
||||
t = """
|
||||
if (calc_$X) then
|
||||
PROVIDE $X_block_walk
|
||||
PROVIDE $X_2_block_walk
|
||||
endif
|
||||
"""
|
||||
print t.replace("$X",p[1])
|
||||
END_SHELL
|
||||
end
|
||||
|
||||
|
||||
|
@ -261,23 +261,17 @@ BEGIN_PROVIDER [ double precision, ci_dress, (size_ci_dress) ]
|
||||
END_DOC
|
||||
|
||||
integer :: i, j, k, l
|
||||
double precision :: T, h_psidet
|
||||
double precision :: T, h_psidet, dij, f
|
||||
|
||||
do k=1,det_num
|
||||
i = det_coef_matrix_rows(k)
|
||||
j = det_coef_matrix_columns(k)
|
||||
T = 0.d0
|
||||
do l=1,elec_alpha_num
|
||||
T += det_alpha_grad_lapl(4,l,i)*det_beta_value (j)
|
||||
enddo
|
||||
do l=1,elec_beta_num
|
||||
T += det_beta_grad_lapl (4,l,j)*det_alpha_value(i)
|
||||
enddo
|
||||
h_psidet = -0.5d0*T + E_pot * det_alpha_value(i)*det_beta_value(j)
|
||||
h_psidet *= psi_value_inv * jast_value_inv
|
||||
|
||||
ci_dress(k) = E_loc * det_alpha_value(i)*det_beta_value(j) * psi_value_inv * jast_value_inv &
|
||||
- h_psidet
|
||||
dij = det_alpha_value(i)*det_beta_value(j)
|
||||
T = det_beta_lapl_sum(j)*det_alpha_value(i) + &
|
||||
det_alpha_lapl_sum(j)*det_beta_value(i)
|
||||
h_psidet = -0.5d0*T + E_pot * dij
|
||||
f = psi_value_inv * jast_value_inv
|
||||
ci_dress(k) = f*(E_loc * dij - h_psidet)
|
||||
enddo
|
||||
|
||||
ci_dress_min = min(ci_dress_min,minval(ci_dress))
|
||||
|
@ -1637,11 +1637,28 @@ END_PROVIDER
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ double precision, det_alpha_lapl_sum, (det_alpha_num_8) ]
|
||||
&BEGIN_PROVIDER [ double precision, det_beta_lapl_sum, (det_beta_num_8) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Sum of Laplacian_i per spin-determinant
|
||||
END_DOC
|
||||
integer :: i, k
|
||||
|
||||
do k=1,det_alpha_num
|
||||
det_alpha_lapl_sum(k) = sum(det_alpha_grad_lapl(4,1:elec_alpha_num,k))
|
||||
enddo
|
||||
do k=1,det_beta_num
|
||||
det_beta_lapl_sum(k) = sum(det_beta_grad_lapl(4,1:elec_beta_num,k))
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ double precision, psidet_value ]
|
||||
&BEGIN_PROVIDER [ double precision, psidet_inv ]
|
||||
&BEGIN_PROVIDER [ double precision, psidet_grad_lapl, (4,elec_num_8) ]
|
||||
&BEGIN_PROVIDER [ double precision, pseudo_non_local, (elec_num) ]
|
||||
&BEGIN_PROVIDER [ double precision, CDb, (det_alpha_num_8) ]
|
||||
&BEGIN_PROVIDER [ double precision, DaC, (det_beta_num_8) ]
|
||||
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
@ -1654,6 +1671,12 @@ END_PROVIDER
|
||||
! Non-local component of the pseudopotentials
|
||||
|
||||
! Regularized 1/psi = 1/(psi + 1/psi)
|
||||
|
||||
! C x D_beta
|
||||
|
||||
! D_alpha^t x C
|
||||
|
||||
! D_alpha^t x (C x D_beta)
|
||||
END_DOC
|
||||
|
||||
integer, save :: ifirst=0
|
||||
@ -1662,15 +1685,6 @@ END_PROVIDER
|
||||
psidet_grad_lapl = 0.d0
|
||||
endif
|
||||
|
||||
double precision :: CDb(det_alpha_num_8)
|
||||
double precision :: CDb_i
|
||||
double precision :: DaC(det_beta_num_8)
|
||||
!DIR$ ATTRIBUTES ALIGN : 32 :: DaC,CDb
|
||||
|
||||
! C x D_beta
|
||||
! D_alpha^t x C
|
||||
! D_alpha^t x (C x D_beta)
|
||||
|
||||
integer :: i,j,k, l
|
||||
integer :: i1,i2,i3,i4,det_num4
|
||||
integer :: j1,j2,j3,j4
|
||||
|
Loading…
Reference in New Issue
Block a user