9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-22 11:33:29 +01:00
qp2/src/kohn_sham_rs/pot_functionals.irp.f

36 lines
960 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(j,i) = potential_xc_alpha_ao(j,i,1)
ao_potential_beta_xc(j,i) = potential_xc_beta_ao(j,i,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(j,i) = potential_c_alpha_ao(j,i,1) + potential_x_alpha_ao(j,i,1)
ao_potential_beta_xc(j,i) = potential_c_beta_ao(j,i,1) + potential_x_beta_ao(j,i,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