mirror of
https://gitlab.com/scemama/qmcchem.git
synced 2024-11-07 06:33:38 +01:00
Avoid node crossings
This commit is contained in:
parent
3a61f4df23
commit
837435f646
@ -86,19 +86,29 @@ END_SHELL
|
|||||||
call system_clock(cpu0, count_rate, count_max)
|
call system_clock(cpu0, count_rate, count_max)
|
||||||
cpu2 = cpu0
|
cpu2 = cpu0
|
||||||
do while (loop)
|
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+1,dmc_projection)+1
|
||||||
|
|
||||||
|
! Remove contribution of the old value of the weight at the new
|
||||||
|
! projection step
|
||||||
pop_weight_mult *= 1.d0/pop_weight(dmc_projection_step)
|
pop_weight_mult *= 1.d0/pop_weight(dmc_projection_step)
|
||||||
|
|
||||||
|
! Compute the new weight of the population
|
||||||
pop_weight(dmc_projection_step) = 0.d0
|
pop_weight(dmc_projection_step) = 0.d0
|
||||||
do k=1,walk_num
|
do k=1,walk_num
|
||||||
pop_weight(dmc_projection_step) += dmc_weight(k)
|
pop_weight(dmc_projection_step) += dmc_weight(k)
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
! Normalize the weight of the walkers by the weight of the population
|
||||||
do k=1,walk_num
|
do k=1,walk_num
|
||||||
dmc_weight(k) = dmc_weight(k)/pop_weight(dmc_projection_step)
|
dmc_weight(k) = dmc_weight(k)/pop_weight(dmc_projection_step)
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
! Normalize the weight of the population at the current projection step by
|
||||||
|
! the number of walkers
|
||||||
pop_weight(dmc_projection_step) = pop_weight(dmc_projection_step)/dble(walk_num)
|
pop_weight(dmc_projection_step) = pop_weight(dmc_projection_step)/dble(walk_num)
|
||||||
|
|
||||||
|
! Update the running population weight
|
||||||
pop_weight_mult *= pop_weight(dmc_projection_step)
|
pop_weight_mult *= pop_weight(dmc_projection_step)
|
||||||
|
|
||||||
BEGIN_SHELL [ /usr/bin/python ]
|
BEGIN_SHELL [ /usr/bin/python ]
|
||||||
|
@ -178,6 +178,17 @@ END_SHELL
|
|||||||
enddo
|
enddo
|
||||||
|
|
||||||
if (qmc_method == t_DMC) then
|
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))
|
||||||
|
else
|
||||||
|
dmc_weight(i_walk) = 0.d0
|
||||||
|
trapped_walk(i_walk) = 0
|
||||||
|
endif
|
||||||
|
|
||||||
psi_value_save(i_walk) = psi_value
|
psi_value_save(i_walk) = psi_value
|
||||||
!DIR$ VECTOR ALIGNED
|
!DIR$ VECTOR ALIGNED
|
||||||
!DIR$ LOOP COUNT (200)
|
!DIR$ LOOP COUNT (200)
|
||||||
@ -187,22 +198,10 @@ END_SHELL
|
|||||||
psi_grad_psi_inv_save(i,3,i_walk) = psi_grad_psi_inv_z(i)
|
psi_grad_psi_inv_save(i,3,i_walk) = psi_grad_psi_inv_z(i)
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
! 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) = exp(time_step*(E_ref - E_loc))
|
|
||||||
|
|
||||||
else
|
|
||||||
dmc_weight(i_walk) = 0.d0
|
|
||||||
trapped_walk(i_walk) = 0
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
|
||||||
double precision :: factor
|
double precision :: factor
|
||||||
factor = 1.d0/block_weight
|
factor = 1.d0/block_weight
|
||||||
SOFT_TOUCH block_weight
|
SOFT_TOUCH block_weight
|
||||||
|
Loading…
Reference in New Issue
Block a user