9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-23 03:53:29 +01:00
qp2/plugins/local/tc_scf/tc_scf_energy.irp.f

43 lines
1.3 KiB
Fortran
Raw Normal View History

2024-05-01 21:52:00 +02:00
BEGIN_PROVIDER [double precision, TC_HF_energy ]
&BEGIN_PROVIDER [double precision, TC_HF_one_e_energy ]
&BEGIN_PROVIDER [double precision, TC_HF_two_e_energy ]
&BEGIN_PROVIDER [double precision, TC_HF_three_e_energy]
BEGIN_DOC
! TC Hartree-Fock energy containing the nuclear repulsion, and its one- and two-body components.
END_DOC
implicit none
2023-04-27 16:52:31 +02:00
integer :: i, j
double precision :: t0, t1
PROVIDE mo_l_coef mo_r_coef
2024-05-01 20:25:01 +02:00
PROVIDE two_e_tc_integral_alpha two_e_tc_integral_beta
TC_HF_energy = nuclear_repulsion
TC_HF_one_e_energy = 0.d0
TC_HF_two_e_energy = 0.d0
do j = 1, ao_num
do i = 1, ao_num
2024-05-01 20:25:01 +02:00
TC_HF_two_e_energy += 0.5d0 * ( two_e_tc_integral_alpha(i,j) * TCSCF_density_matrix_ao_alpha(i,j) &
+ two_e_tc_integral_beta (i,j) * TCSCF_density_matrix_ao_beta (i,j) )
TC_HF_one_e_energy += ao_one_e_integrals_tc_tot(i,j) &
* (TCSCF_density_matrix_ao_alpha(i,j) + TCSCF_density_matrix_ao_beta (i,j) )
enddo
enddo
2024-08-04 11:58:19 +02:00
if((three_body_h_tc .eqv. .False.) .and. (.not. noL_standard)) then
2024-05-01 21:52:00 +02:00
TC_HF_three_e_energy = 0.d0
else
TC_HF_three_e_energy = noL_0e
endif
TC_HF_energy += TC_HF_one_e_energy + TC_HF_two_e_energy + TC_HF_three_e_energy
2023-03-04 02:10:45 +01:00
END_PROVIDER
! ---