10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-19 04:22:32 +01:00

Introduced HF denominator

This commit is contained in:
Anthony Scemama 2019-01-31 11:20:17 +01:00
parent 55baae2e11
commit 4289859204
2 changed files with 10 additions and 1 deletions

View File

@ -11,9 +11,15 @@ BEGIN_PROVIDER [ double precision, pt2_E0_denominator, (N_states) ]
BEGIN_DOC BEGIN_DOC
! E0 in the denominator of the PT2 ! E0 in the denominator of the PT2
END_DOC END_DOC
integer :: i,j
if (initialize_pt2_E0_denominator) then if (initialize_pt2_E0_denominator) then
if (h0_type == "EN") then if (h0_type == "EN") then
pt2_E0_denominator(1:N_states) = psi_energy(1:N_states) 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 else if (h0_type == "Barycentric") then
pt2_E0_denominator(1:N_states) = barycentric_electronic_energy(1:N_states) pt2_E0_denominator(1:N_states) = barycentric_electronic_energy(1:N_states)
else if (h0_type == "Variance") then else if (h0_type == "Variance") then
@ -24,7 +30,9 @@ BEGIN_PROVIDER [ double precision, pt2_E0_denominator, (N_states) ]
print *, h0_type, ' not implemented' print *, h0_type, ' not implemented'
stop stop
endif 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 else
pt2_E0_denominator = -huge(1.d0) pt2_E0_denominator = -huge(1.d0)
endif endif

View File

@ -8,5 +8,6 @@ BEGIN_PROVIDER [ character*32,h0_type ]
else else
h0_type = 'EN' h0_type = 'EN'
endif endif
! h0_type = 'HF'
END_PROVIDER END_PROVIDER