From 4289859204709d6c50716184d7c3e6a901928ea3 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Thu, 31 Jan 2019 11:20:17 +0100 Subject: [PATCH] Introduced HF denominator --- src/cipsi/energy.irp.f | 10 +++++++++- src/perturbation/h0_type.irp.f | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/cipsi/energy.irp.f b/src/cipsi/energy.irp.f index b7ba42bb..0ae5ad79 100644 --- a/src/cipsi/energy.irp.f +++ b/src/cipsi/energy.irp.f @@ -11,9 +11,15 @@ BEGIN_PROVIDER [ double precision, pt2_E0_denominator, (N_states) ] BEGIN_DOC ! E0 in the denominator of the PT2 END_DOC + integer :: i,j if (initialize_pt2_E0_denominator) then if (h0_type == "EN") then pt2_E0_denominator(1:N_states) = psi_energy(1:N_states) + else if (h0_type == "HF") then + do i=1,N_states + j = maxloc(abs(psi_coef(:,i)),1) + pt2_E0_denominator(i) = psi_det_hii(j) + enddo else if (h0_type == "Barycentric") then pt2_E0_denominator(1:N_states) = barycentric_electronic_energy(1:N_states) else if (h0_type == "Variance") then @@ -24,7 +30,9 @@ BEGIN_PROVIDER [ double precision, pt2_E0_denominator, (N_states) ] print *, h0_type, ' not implemented' stop endif - call write_double(6,pt2_E0_denominator(1)+nuclear_repulsion, 'PT2 Energy denominator') + do i=1,N_states + call write_double(6,pt2_E0_denominator(i)+nuclear_repulsion, 'PT2 Energy denominator') + enddo else pt2_E0_denominator = -huge(1.d0) endif diff --git a/src/perturbation/h0_type.irp.f b/src/perturbation/h0_type.irp.f index 17a47ce6..7dd58c2c 100644 --- a/src/perturbation/h0_type.irp.f +++ b/src/perturbation/h0_type.irp.f @@ -8,5 +8,6 @@ BEGIN_PROVIDER [ character*32,h0_type ] else h0_type = 'EN' endif +! h0_type = 'HF' END_PROVIDER