10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-10-19 22:41:48 +02:00

Bug in variance

This commit is contained in:
Anthony Scemama 2018-10-29 18:20:19 +01:00
parent a24db77952
commit cd943448a5
3 changed files with 10 additions and 6 deletions

View File

@ -17,7 +17,7 @@ program fci_zmq
pt2 = -huge(1.e0) pt2 = -huge(1.e0)
norm = 0.d0 norm = 0.d0
variance = huge(1.e0) variance = 0.d0
threshold_davidson_in = threshold_davidson threshold_davidson_in = threshold_davidson
threshold_davidson = threshold_davidson_in * 100.d0 threshold_davidson = threshold_davidson_in * 100.d0
SOFT_TOUCH threshold_davidson SOFT_TOUCH threshold_davidson
@ -131,6 +131,8 @@ program fci_zmq
if (do_pt2) then if (do_pt2) then
pt2 = 0.d0 pt2 = 0.d0
variance = 0.d0
norm = 0.d0
threshold_selectors = 1.d0 threshold_selectors = 1.d0
threshold_generators = 1d0 threshold_generators = 1d0
SOFT_TOUCH threshold_selectors threshold_generators SOFT_TOUCH threshold_selectors threshold_generators

View File

@ -373,7 +373,7 @@ subroutine pt2_collector(zmq_socket_pull, E, relative_error, pt2, error, varianc
do_exit = .true. do_exit = .true.
endif endif
pt2(pt2_stoch_istate) = avg pt2(pt2_stoch_istate) = avg
variance(pt2_stoch_istate) = avg2 !- avg*avg variance(pt2_stoch_istate) = avg2
norm(pt2_stoch_istate) = avg3 norm(pt2_stoch_istate) = avg3
! 1/(N-1.5) : see Brugger, The American Statistician (23) 4 p. 32 (1969) ! 1/(N-1.5) : see Brugger, The American Statistician (23) 4 p. 32 (1969)
if(c > 2) then if(c > 2) then

View File

@ -179,10 +179,12 @@ subroutine selection_collector(zmq_socket_pull, b, N, pt2, variance, norm)
call create_selection_buffer(N, N*2, b2) call create_selection_buffer(N, N*2, b2)
allocate(task_id(N_det_generators)) allocate(task_id(N_det_generators))
more = 1 more = 1
pt2(:) = 0d0 pt2(:) = 0d0
pt2_mwen(:) = 0.d0 variance(:) = 0.d0
variance_mwen = 0.d0 norm(:) = 0.d0
norm_mwen = 0.d0 pt2_mwen(:) = 0.d0
variance_mwen(:) = 0.d0
norm_mwen(:) = 0.d0
do while (more == 1) do while (more == 1)
call pull_selection_results(zmq_socket_pull, pt2_mwen, variance_mwen, norm_mwen, b2%val(1), b2%det(1,1,1), b2%cur, task_id, ntask) call pull_selection_results(zmq_socket_pull, pt2_mwen, variance_mwen, norm_mwen, b2%val(1), b2%det(1,1,1), b2%cur, task_id, ntask)