mirror of
https://github.com/LCPQ/quantum_package
synced 2024-12-25 13:53:49 +01: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
|
@ -23,3 +23,4 @@ BEGIN_PROVIDER [ double precision, pt2_E0_denominator, (N_states) ]
|
|||||||
endif
|
endif
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
|
|
||||||
|
@ -84,9 +84,9 @@ BEGIN_PROVIDER [ double precision, E0_denominator, (N_states) ]
|
|||||||
if (initialize_E0_denominator) then
|
if (initialize_E0_denominator) then
|
||||||
E0_denominator(1:N_states) = psi_energy(1:N_states)
|
E0_denominator(1:N_states) = psi_energy(1:N_states)
|
||||||
! call ezfio_get_full_ci_zmq_energy(pt2_E0_denominator(1))
|
! call ezfio_get_full_ci_zmq_energy(pt2_E0_denominator(1))
|
||||||
! pt2_E0_denominator(1) -= nuclear_repulsion
|
! E0_denominator(1) -= nuclear_repulsion
|
||||||
! pt2_E0_denominator(1:N_states) = HF_energy - nuclear_repulsion
|
! E0_denominator(1:N_states) = HF_energy - nuclear_repulsion
|
||||||
! pt2_E0_denominator(1:N_states) = barycentric_electronic_energy(1:N_states)
|
! E0_denominator(1:N_states) = barycentric_electronic_energy(1:N_states)
|
||||||
else
|
else
|
||||||
E0_denominator = -huge(1.d0)
|
E0_denominator = -huge(1.d0)
|
||||||
endif
|
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