9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-26 21:33:30 +01:00
qp2/src/kohn_sham/pot_functionals.irp.f

35 lines
959 B
Fortran
Raw Normal View History

2019-01-25 11:39:31 +01:00
BEGIN_PROVIDER [double precision, ao_potential_alpha_xc, (ao_num, ao_num)]
&BEGIN_PROVIDER [double precision, ao_potential_beta_xc, (ao_num, ao_num)]
implicit none
integer :: i,j,k,l
ao_potential_alpha_xc = 0.d0
ao_potential_beta_xc = 0.d0
if(same_xc_func)then
do i = 1, ao_num
do j = 1, ao_num
ao_potential_alpha_xc(i,j) = potential_xc_alpha_ao(i,j,1)
ao_potential_beta_xc(i,j) = potential_xc_beta_ao(i,j,1)
enddo
2019-01-25 11:39:31 +01:00
enddo
else
do i = 1, ao_num
do j = 1, ao_num
ao_potential_alpha_xc(i,j) = potential_c_alpha_ao(i,j,1) + potential_x_alpha_ao(i,j,1)
ao_potential_beta_xc(i,j) = potential_c_beta_ao(i,j,1) + potential_x_beta_ao(i,j,1)
enddo
enddo
endif
2019-01-25 11:39:31 +01:00
END_PROVIDER
BEGIN_PROVIDER [double precision, e_exchange_dft]
implicit none
e_exchange_dft = energy_x(1)
END_PROVIDER
BEGIN_PROVIDER [double precision, e_correlation_dft]
implicit none
e_correlation_dft = energy_c(1)
END_PROVIDER