From 0b2fe07290935c470751012eab227e69e23d3c0a Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 17 Dec 2019 10:54:03 +0100 Subject: [PATCH] New selection scheme with SA, variance and rPT2 --- src/cipsi/selection.irp.f | 16 +++++++++++----- src/determinants/EZFIO.cfg | 2 +- src/zmq/utils.irp.f | 12 +----------- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/src/cipsi/selection.irp.f b/src/cipsi/selection.irp.f index ba2c8adb..2886f4eb 100644 --- a/src/cipsi/selection.irp.f +++ b/src/cipsi/selection.irp.f @@ -114,9 +114,15 @@ BEGIN_PROVIDER [ double precision, selection_weight, (N_states) ] print *, '# var weight ', real(variance_match_weight(:),4) case (6) - print *, 'Using CI coefficient weight in selection' + print *, 'Using CI coefficient-based selection' selection_weight(1:N_states) = c0_weight(1:N_states) + case (7) + print *, 'Input weights multiplied by variance- and pt2-matching' + selection_weight(1:N_states) = c0_weight(1:N_states) * sqrt(variance_match_weight(1:N_states) * pt2_match_weight(1:N_states)) * state_average_weight(1:N_states) + print *, '# PT2 weight ', real(pt2_match_weight(:),4) + print *, '# var weight ', real(variance_match_weight(:),4) + end select print *, '# Total weight ', real(selection_weight(:),4) @@ -784,10 +790,6 @@ subroutine fill_buffer_double(i_generator, sp, h1, h2, bannedOrb, banned, fock_d select case (weight_selection) - case(0:4) - ! Energy selection - w = w + e_pert * selection_weight(istate) - case(5) ! Variance selection w = w - alpha_h_psi * alpha_h_psi * selection_weight(istate) @@ -795,6 +797,10 @@ subroutine fill_buffer_double(i_generator, sp, h1, h2, bannedOrb, banned, fock_d case(6) w = w - coef * coef * selection_weight(istate) + case(default) + ! Energy selection + w = w + e_pert * selection_weight(istate) + end select end do diff --git a/src/determinants/EZFIO.cfg b/src/determinants/EZFIO.cfg index a8935695..bcbee644 100644 --- a/src/determinants/EZFIO.cfg +++ b/src/determinants/EZFIO.cfg @@ -42,7 +42,7 @@ default: 2 [weight_selection] type: integer -doc: Weight used in the selection. 0: input state-average weight, 1: 1./(c_0^2), 2: rPT2 matching, 3: variance matching, 4: variance and rPT2 matching, 5: variance minimization and matching, 6: CI coefficients +doc: Weight used in the selection. 0: input state-average weight, 1: 1./(c_0^2), 2: rPT2 matching, 3: variance matching, 4: variance and rPT2 matching, 5: variance minimization and matching, 6: CI coefficients 7: input state-average multiplied by variance and rPT2 matching interface: ezfio,provider,ocaml default: 2 diff --git a/src/zmq/utils.irp.f b/src/zmq/utils.irp.f index e76238ed..fc6f2ba6 100644 --- a/src/zmq/utils.irp.f +++ b/src/zmq/utils.irp.f @@ -241,12 +241,7 @@ IRP_ENDIF stop 'Unable to set ZMQ_LINGER on pull socket' endif -! rc = f77_zmq_setsockopt(new_zmq_pull_socket,ZMQ_RCVBUF,100000000,4) -! if (rc /= 0) then -! stop 'Unable to set ZMQ_RCVBUF on pull socket' -! endif - - rc = f77_zmq_setsockopt(new_zmq_pull_socket,ZMQ_RCVHWM,50,4) + rc = f77_zmq_setsockopt(new_zmq_pull_socket,ZMQ_RCVHWM,10,4) if (rc /= 0) then stop 'Unable to set ZMQ_RCVHWM on pull socket' endif @@ -326,11 +321,6 @@ IRP_ENDIF stop 'Unable to set ZMQ_SNDHWM on push socket' endif -! rc = f77_zmq_setsockopt(new_zmq_push_socket,ZMQ_SNDBUF,100000000,4) -! if (rc /= 0) then -! stop 'Unable to set ZMQ_SNDBUF on push socket' -! endif - rc = f77_zmq_setsockopt(new_zmq_push_socket,ZMQ_IMMEDIATE,1,4) if (rc /= 0) then stop 'Unable to set ZMQ_IMMEDIATE on push socket'