diff --git a/plugins/CAS_SD/cas_sd_selected.irp.f b/plugins/CAS_SD/cas_sd_selected.irp.f index d12e8430..acca7dd8 100644 --- a/plugins/CAS_SD/cas_sd_selected.irp.f +++ b/plugins/CAS_SD/cas_sd_selected.irp.f @@ -93,8 +93,8 @@ program full_ci call diagonalize_CI if(do_pt2_end)then print*,'Last iteration only to compute the PT2' - threshold_selectors = 1.d0 - threshold_generators = 0.999d0 + threshold_selectors = max(threshold_selectors,threshold_selectors_pt2) + threshold_generators = max(threshold_generators,threshold_generators_pt2) call H_apply_CAS_SD_PT2(pt2, norm_pert, H_pert_diag, N_st) print *, 'Final step' diff --git a/plugins/Full_CI/EZFIO.cfg b/plugins/Full_CI/EZFIO.cfg index afb25d2e..9a552cd0 100644 --- a/plugins/Full_CI/EZFIO.cfg +++ b/plugins/Full_CI/EZFIO.cfg @@ -8,15 +8,3 @@ type: double precision doc: Calculated FCI energy + PT2 interface: ezfio -[threshold_generators_pt2] -type: Threshold -doc: Thresholds on generators (fraction of the norm) for final PT2 calculation -interface: ezfio,provider,ocaml -default: 0.999 - -[threshold_selectors_pt2] -type: Threshold -doc: Thresholds on selectors (fraction of the norm) for final PT2 calculation -interface: ezfio,provider,ocaml -default: 1. - diff --git a/plugins/Full_CI_ZMQ/fci_zmq.irp.f b/plugins/Full_CI_ZMQ/fci_zmq.irp.f index 45f3362e..a3488655 100644 --- a/plugins/Full_CI_ZMQ/fci_zmq.irp.f +++ b/plugins/Full_CI_ZMQ/fci_zmq.irp.f @@ -48,14 +48,14 @@ program fci_zmq call diagonalize_CI call save_wavefunction - if (N_det > N_det_max) then - psi_det = psi_det_sorted - psi_coef = psi_coef_sorted - N_det = N_det_max - soft_touch N_det psi_det psi_coef - call diagonalize_CI - call save_wavefunction - endif +! if (N_det > N_det_max) then +! psi_det = psi_det_sorted +! psi_coef = psi_coef_sorted +! N_det = N_det_max +! soft_touch N_det psi_det psi_coef +! call diagonalize_CI +! call save_wavefunction +! endif print *, 'N_det = ', N_det print *, 'N_states = ', N_states @@ -84,8 +84,8 @@ program fci_zmq if(do_pt2_end)then print*,'Last iteration only to compute the PT2' - threshold_selectors = threshold_selectors_pt2 - threshold_generators = threshold_generators_pt2 + threshold_selectors = max(threshold_selectors,threshold_selectors_pt2) + threshold_generators = max(threshold_generators,threshold_generators_pt2) TOUCH threshold_selectors threshold_generators E_CI_before(1:N_states) = CI_energy(1:N_states) call ZMQ_selection(0, pt2) diff --git a/plugins/Perturbation/EZFIO.cfg b/plugins/Perturbation/EZFIO.cfg index 9023accf..4f0457a2 100644 --- a/plugins/Perturbation/EZFIO.cfg +++ b/plugins/Perturbation/EZFIO.cfg @@ -18,3 +18,15 @@ doc: The selection process stops when the energy ratio variational/(variational+ interface: ezfio,provider,ocaml default: 0.75 +[threshold_generators_pt2] +type: Threshold +doc: Thresholds on generators (fraction of the norm) for final PT2 calculation +interface: ezfio,provider,ocaml +default: 0.999 + +[threshold_selectors_pt2] +type: Threshold +doc: Thresholds on selectors (fraction of the norm) for final PT2 calculation +interface: ezfio,provider,ocaml +default: 1. + diff --git a/plugins/mrcepa0/mrcepa0_general.irp.f b/plugins/mrcepa0/mrcepa0_general.irp.f index c7b31ea9..e3a2d1f5 100644 --- a/plugins/mrcepa0/mrcepa0_general.irp.f +++ b/plugins/mrcepa0/mrcepa0_general.irp.f @@ -10,11 +10,12 @@ subroutine run(N_st,energy) double precision :: E_new, E_old, delta_e integer :: iteration - double precision :: E_past(4), lambda + double precision :: E_past(4) integer :: n_it_mrcc_max double precision :: thresh_mrcc - + double precision, allocatable :: lambda(:) + allocate (lambda(N_states)) thresh_mrcc = thresh_dressed_ci @@ -139,8 +140,8 @@ subroutine run_pt2_old(N_st,energy) print * ,'Computing the remaining contribution' - threshold_selectors = 1.d0 - threshold_generators = 0.999d0 + threshold_selectors = max(threshold_selectors,threshold_selectors_pt2) + threshold_generators = max(threshold_generators,threshold_generators_pt2) N_det_generators = N_det_non_ref + N_det_ref N_det_selectors = N_det_non_ref + N_det_ref