diff --git a/src/SAMPLING/dmc_step.irp.f b/src/SAMPLING/dmc_step.irp.f index ca5f703..5800468 100644 --- a/src/SAMPLING/dmc_step.irp.f +++ b/src/SAMPLING/dmc_step.irp.f @@ -87,7 +87,7 @@ END_SHELL cpu2 = cpu0 do while (loop) ! Move to the next projection step - dmc_projection_step = mod(dmc_projection_step+1,dmc_projection)+1 + dmc_projection_step = mod(dmc_projection_step,dmc_projection)+1 ! Remove contribution of the old value of the weight at the new ! projection step @@ -255,7 +255,7 @@ BEGIN_PROVIDER [ double precision, pop_weight_mult ] BEGIN_DOC ! Population weight of DMC END_DOC - pop_weight_mult = 1.d0 + pop_weight_mult = pop_weight(dmc_projection) END_PROVIDER BEGIN_PROVIDER [ integer, dmc_projection ] @@ -274,5 +274,6 @@ BEGIN_PROVIDER [ double precision, pop_weight, (dmc_projection) ] ! Population weight of DMC END_DOC pop_weight = 1.d0 + pop_weight(dmc_projection) = 1.d0/dble(dmc_projection) END_PROVIDER diff --git a/src/SAMPLING/vmc_step.irp.f b/src/SAMPLING/vmc_step.irp.f index d22021b..c9e3c62 100644 --- a/src/SAMPLING/vmc_step.irp.f +++ b/src/SAMPLING/vmc_step.irp.f @@ -178,9 +178,7 @@ END_SHELL enddo if (qmc_method == t_DMC) then -! if ( (trapped_walk(i_walk) < trapped_walk_max).and. & -! (psi_value * psi_value_save(i_walk) > 0.d0).and. & -! (dabs(E_ref-E_loc)*time_step_sq < -.2d0*E_ref) ) then + if ( (trapped_walk(i_walk) < trapped_walk_max).and. & (psi_value * psi_value_save(i_walk) >= 0.d0) ) then dmc_weight(i_walk) = dexp(dtime_step*(E_ref - E_loc)) @@ -263,6 +261,6 @@ BEGIN_PROVIDER [ integer, trapped_walk_max ] BEGIN_DOC ! Max number of trapped MC steps before killing walker END_DOC - trapped_walk_max = 5 + trapped_walk_max = 20 END_PROVIDER