From 62257c95f4129e8fb90ee38d6b53222072482bf4 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 25 Jul 2018 11:48:12 +0200 Subject: [PATCH] Max iterations for dressing --- plugins/dress_zmq/dress_zmq_routines.irp.f | 2 +- plugins/dress_zmq/dressing.irp.f | 4 ++-- plugins/mrcepa0/EZFIO.cfg | 4 ++-- plugins/mrcepa0/dressing.irp.f | 10 +++------- plugins/mrcepa0/mrcc_zmq.irp.f | 6 +++--- plugins/shiftedbk/EZFIO.cfg | 2 +- 6 files changed, 12 insertions(+), 16 deletions(-) diff --git a/plugins/dress_zmq/dress_zmq_routines.irp.f b/plugins/dress_zmq/dress_zmq_routines.irp.f index dc47eb20..bd070214 100644 --- a/plugins/dress_zmq/dress_zmq_routines.irp.f +++ b/plugins/dress_zmq/dress_zmq_routines.irp.f @@ -6,7 +6,7 @@ subroutine dress_zmq() threshold_generators = 1d0 read_wf = .True. - SOFT_TOUCH read_wf + SOFT_TOUCH read_wf threshold_generators threshold_selectors if (.True.) then integer :: i,j diff --git a/plugins/dress_zmq/dressing.irp.f b/plugins/dress_zmq/dressing.irp.f index bf2ab207..590b27c6 100644 --- a/plugins/dress_zmq/dressing.irp.f +++ b/plugins/dress_zmq/dressing.irp.f @@ -102,9 +102,9 @@ BEGIN_PROVIDER [ double precision, delta_ij_tmp, (N_states,N_det_delta_ij,2) ] ! else ! errr = 1d-4 ! end if - relative_error = 1.d-2 + relative_error = 1.d-3 - call write_double(6,relative_error,"Convergence of the stochastic algorithm") + call write_double(6,relative_error,"Relative error for the stochastic algorithm") call ZMQ_dress(E_CI_before, dress, del, del_s2, abs(relative_error), N_det_delta_ij) delta_ij_tmp(:,:,1) = del(:,:) diff --git a/plugins/mrcepa0/EZFIO.cfg b/plugins/mrcepa0/EZFIO.cfg index 53519ec7..88f40c18 100644 --- a/plugins/mrcepa0/EZFIO.cfg +++ b/plugins/mrcepa0/EZFIO.cfg @@ -18,7 +18,7 @@ interface: ezfio type: logical doc: Compute perturbative contribution of the Triples interface: ezfio,provider,ocaml -default: false +default: true [energy] type: double precision @@ -35,5 +35,5 @@ default: 1.e-5 type: Strictly_positive_int doc: Maximum number of dressed CI iterations interface: ezfio,provider,ocaml -default: 10 +default: 30 diff --git a/plugins/mrcepa0/dressing.irp.f b/plugins/mrcepa0/dressing.irp.f index c0b76596..d9eb2365 100644 --- a/plugins/mrcepa0/dressing.irp.f +++ b/plugins/mrcepa0/dressing.irp.f @@ -470,7 +470,7 @@ END_PROVIDER double precision, allocatable :: mrcc(:) double precision :: E_CI_before!, relative_error - double precision, save :: target_error = 2d-2 + double precision :: target_error allocate(mrcc(N_states)) @@ -482,11 +482,7 @@ END_PROVIDER E_CI_before = mrcc_E0_denominator(1) + nuclear_repulsion threshold_selectors = 1.d0 threshold_generators = 1d0 - if(target_error /= 0d0) then - target_error = target_error * 0.5d0 ! (-mrcc_E0_denominator(1) + mrcc_previous_E(1)) / 1d1 - else - target_error = -1d-4 - end if + target_error = thresh_dressed_ci * 5.d-2 call ZMQ_mrcc(E_CI_before, mrcc, delta_ij_mrcc_zmq, delta_ij_s2_mrcc_zmq, abs(target_error)) mrcc_previous_E(:) = mrcc_E0_denominator(:) @@ -1182,7 +1178,7 @@ subroutine get_cc_coef(tq,c_alpha) dIK(i_state) = dij(i_I, k_sd, i_state) enddo - if (maxval(abs(dIk))) < 1.d-10) then + if (maxval(abs(dIk)) < 1.d-10) then cycle endif diff --git a/plugins/mrcepa0/mrcc_zmq.irp.f b/plugins/mrcepa0/mrcc_zmq.irp.f index a3089a24..92fc259d 100644 --- a/plugins/mrcepa0/mrcc_zmq.irp.f +++ b/plugins/mrcepa0/mrcc_zmq.irp.f @@ -6,9 +6,9 @@ program mrsc2sub !mrmode : 1=mrcepa0, 2=mrsc2 add, 3=mrcc mrmode = 5 -threshold_generators = 1.d0 -threshold_selectors = 1.d0 -TOUCH threshold_generators threshold_selectors + threshold_generators = 1.d0 + threshold_selectors = 1.d0 + TOUCH threshold_generators threshold_selectors read_wf = .True. SOFT_TOUCH read_wf diff --git a/plugins/shiftedbk/EZFIO.cfg b/plugins/shiftedbk/EZFIO.cfg index 576bf1e4..6123f458 100644 --- a/plugins/shiftedbk/EZFIO.cfg +++ b/plugins/shiftedbk/EZFIO.cfg @@ -18,7 +18,7 @@ default: 1.e-5 type: Strictly_positive_int doc: Maximum number of dressed CI iterations interface: ezfio,provider,ocaml -default: 10 +default: 30 [h0_type] type: Perturbation