10
1
mirror of https://gitlab.com/scemama/qmcchem.git synced 2024-06-02 11:25:18 +02:00

Avoid pseudo explosion

This commit is contained in:
Anthony Scemama 2020-05-26 01:46:14 +02:00
parent 9b191eaa7b
commit b837d4f346

View File

@ -251,13 +251,13 @@ BEGIN_PROVIDER [ double precision, E_loc ]
E_loc += E_kin_elec(i) + E_pot_elec(i)
enddo
! ! Avoid divergence of E_loc
! if (qmc_method == t_DMC) then
! double precision :: delta_e
! Avoid divergence of E_loc and population explosion
if (do_pseudo) then
double precision :: delta_e
! delta_e = E_loc-E_ref
! E_loc = E_ref + erf(1.d0/(time_step*delta_e*time_step*delta_e)) * delta_e
! endif
! E_loc = E_ref + erf(delta_e*time_step_sq)/time_step_sq
E_loc = max(2.d0*E_ref, E_loc)
endif
E_loc_min = min(E_loc,E_loc_min)
E_loc_max = max(E_loc,E_loc_max)
SOFT_TOUCH E_loc_min E_loc_max