Fixed BeH with pseudos

This commit is contained in:
Anthony Scemama 2018-07-16 18:48:42 +02:00
parent 1e9b94374f
commit 3c0d404661
1 changed files with 14 additions and 4 deletions

View File

@ -100,9 +100,7 @@ END_SHELL
block_weight = 0.d0
real, external :: accep_rate
double precision :: delta, thr
thr = 2.d0/time_step_sq
double precision :: delta
logical :: first_loop
first_loop = .True.
@ -160,6 +158,11 @@ END_SHELL
srmc_weight(i_walk) = 2.d0-dexp(dtime_step*delta)
endif
! Trick to avoid holes in DMC PES.
if (dabs(delta/E_ref) * time_step_sq > p ) then
srmc_weight(i_walk) = 1.d-1
endif
! if (accepted) then
! ! Compute correction to past weights
@ -186,7 +189,7 @@ END_SHELL
! endif
if ( (psi_value * psi_value_save(i_walk) >= 0.d0).and.(srmc_weight(i_walk) > 1.d-4) ) then
if ( psi_value * psi_value_save(i_walk) >= 0.d0 ) then
elec_coord(elec_num+1,1) += p*time_step
elec_coord(elec_num+1,2) = E_loc
elec_coord(elec_num+1,3) = srmc_weight(i_walk) * srmc_pop_weight_mult
@ -261,6 +264,13 @@ END_SHELL
srmc_projection_step = 1
endif
if (srmc_pop_weight_mult > 1.d0/time_step_sq) then
srmc_pop_weight_mult = 1.d0
endif
if (srmc_pop_weight_mult < time_step_sq) then
srmc_pop_weight_mult = 1.d0
endif
! Eventually, recompute the weight of the population
if (srmc_projection_step == 1) then
srmc_pop_weight_mult = 1.d0