mirror of
https://github.com/LCPQ/quantum_package
synced 2024-08-26 06:21:45 +02:00
Barycentric energy
This commit is contained in:
parent
4cbe7d33a2
commit
f3a79c2316
13
ocaml/myocamlbuild.ml
Normal file
13
ocaml/myocamlbuild.ml
Normal file
@ -0,0 +1,13 @@
|
||||
open Ocamlbuild_plugin;;
|
||||
open Command;;
|
||||
|
||||
dispatch begin function
|
||||
| Before_rules ->
|
||||
begin
|
||||
end
|
||||
| After_rules ->
|
||||
begin
|
||||
flag ["ocaml";"compile";"native";"gprof"] (S [ A "-p"]);
|
||||
end
|
||||
| _ -> ()
|
||||
end
|
@ -12,14 +12,15 @@ BEGIN_PROVIDER [ double precision, pt2_E0_denominator, (N_states) ]
|
||||
! E0 in the denominator of the PT2
|
||||
END_DOC
|
||||
if (initialize_pt2_E0_denominator) then
|
||||
pt2_E0_denominator(1:N_states) = psi_energy(1:N_states)
|
||||
pt2_E0_denominator(1:N_states) = psi_energy(1:N_states)
|
||||
! call ezfio_get_full_ci_zmq_energy(pt2_E0_denominator(1))
|
||||
! pt2_E0_denominator(1) -= nuclear_repulsion
|
||||
! pt2_E0_denominator(1:N_states) = HF_energy - nuclear_repulsion
|
||||
! pt2_E0_denominator(1:N_states) = barycentric_electronic_energy(1:N_states)
|
||||
! pt2_E0_denominator(1:N_states) = barycentric_electronic_energy(1:N_states)
|
||||
call write_double(6,pt2_E0_denominator(1)+nuclear_repulsion, 'PT2 Energy denominator')
|
||||
else
|
||||
pt2_E0_denominator = -huge(1.d0)
|
||||
endif
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
|
@ -84,9 +84,9 @@ BEGIN_PROVIDER [ double precision, E0_denominator, (N_states) ]
|
||||
if (initialize_E0_denominator) then
|
||||
E0_denominator(1:N_states) = psi_energy(1:N_states)
|
||||
! call ezfio_get_full_ci_zmq_energy(pt2_E0_denominator(1))
|
||||
! pt2_E0_denominator(1) -= nuclear_repulsion
|
||||
! pt2_E0_denominator(1:N_states) = HF_energy - nuclear_repulsion
|
||||
! pt2_E0_denominator(1:N_states) = barycentric_electronic_energy(1:N_states)
|
||||
! E0_denominator(1) -= nuclear_repulsion
|
||||
! E0_denominator(1:N_states) = HF_energy - nuclear_repulsion
|
||||
! E0_denominator(1:N_states) = barycentric_electronic_energy(1:N_states)
|
||||
else
|
||||
E0_denominator = -huge(1.d0)
|
||||
endif
|
||||
|
31
src/Determinants/energy.irp.f
Normal file
31
src/Determinants/energy.irp.f
Normal file
@ -0,0 +1,31 @@
|
||||
BEGIN_PROVIDER [ double precision, diagonal_H_matrix_on_psi_det, (N_det) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Diagonal of the Hamiltonian ordered as psi_det
|
||||
END_DOC
|
||||
double precision, external :: diag_h_mat_elem
|
||||
integer :: i
|
||||
|
||||
do i=1,N_det
|
||||
diagonal_H_matrix_on_psi_det(i) = diag_h_mat_elem(psi_det(1,1,i),N_int)
|
||||
enddo
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ double precision, barycentric_electronic_energy, (N_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! TODO : ASCII Elephant
|
||||
END_DOC
|
||||
integer :: istate,i
|
||||
|
||||
barycentric_electronic_energy(:) = 0.d0
|
||||
|
||||
do istate=1,N_states
|
||||
do i=1,N_det
|
||||
barycentric_electronic_energy(istate) += psi_coef(i,istate)*psi_coef(i,istate)*diagonal_H_matrix_on_psi_det(i)
|
||||
enddo
|
||||
enddo
|
||||
|
||||
END_PROVIDER
|
||||
|
Loading…
Reference in New Issue
Block a user