10
1
mirror of https://gitlab.com/scemama/qmcchem.git synced 2024-12-21 20:03:31 +01:00

Created pdmc_weight

This commit is contained in:
Anthony Scemama 2016-05-03 09:15:43 +02:00
parent b6b9a85cb2
commit 2d269aa1fc
2 changed files with 19 additions and 9 deletions

View File

@ -156,6 +156,14 @@ BEGIN_PROVIDER [ double precision, E_kin_elec, (elec_num) ]
END_PROVIDER
BEGIN_PROVIDER [ double precision, dmc_zv_weight ]
implicit none
BEGIN_DOC
! Weight for Zero-variance in DMC
END_DOC
dmc_zv_weight = 1.d0
END_PROVIDER
!==========================================================================!
! PROPERTIES !
@ -253,7 +261,11 @@ BEGIN_PROVIDER [ double precision, E_loc_zv ]
BEGIN_DOC
! Zero-variance parameter on E_loc
END_DOC
E_loc_zv = E_trial
E_loc_zv = E_loc + (E_trial-E_loc) * dmc_zv_weight
E_loc_zv_min = min(E_loc_zv,E_loc_zv_min)
E_loc_zv_max = max(E_loc_zv,E_loc_zv_max)
SOFT_TOUCH E_loc_zv_min E_loc_zv_max
END_PROVIDER

View File

@ -172,14 +172,12 @@ END_SHELL
psi_value_save(i_walk) = psi_value
E_loc_save(i_walk) = E_loc
if (calc_E_loc_zv) then
if (dabs(pdmc_weight(i_walk)*pop_weight_mult) > 1.d-6) then
E_loc_zv = E_loc + (E_trial-E_loc)/(pdmc_weight(i_walk)*pop_weight_mult)
else
E_loc_zv = 0.d0
endif
TOUCH E_loc_zv
endif
if (dabs(pdmc_weight(i_walk)*pop_weight_mult) > 1.d-6) then
dmc_zv_weight = 1.d0/(pdmc_weight(i_walk)*pop_weight_mult)
else
dmc_zv_weight = 0.d0
endif
TOUCH dmc_zv_weight
BEGIN_SHELL [ /usr/bin/python ]
from properties import *