eplf/src/density.irp.f

102 lines
1.7 KiB
Fortran

BEGIN_PROVIDER [ real, density_value_p ]
BEGIN_DOC
! Value of the density_value at the current point
END_DOC
integer :: i
density_value_p = density_alpha_value_p + density_beta_value_p
END_PROVIDER
BEGIN_PROVIDER [ double precision, density_grad_p, (3) ]
implicit none
BEGIN_DOC
! Gradient of the density at the current point
END_DOC
integer :: i, l
do l=1,3
density_grad_p(l) = density_alpha_grad_p(l) + density_beta_grad_p(l)
enddo
END_PROVIDER
BEGIN_PROVIDER [ real, density_alpha_value_p ]
BEGIN_DOC
! Value of the alpha density at the current point
END_DOC
density_alpha_value_p = 0.
integer :: i
do i=1,elec_alpha_num
density_alpha_value_p = density_alpha_value_p + mo_value_p(i)**2
enddo
END_PROVIDER
BEGIN_PROVIDER [ real, density_beta_value_p ]
BEGIN_DOC
! Value of the beta density at the current point
END_DOC
density_beta_value_p = 0.
integer :: i
do i=1,elec_beta_num
density_beta_value_p = density_beta_value_p + mo_value_p(i)**2
enddo
END_PROVIDER
BEGIN_PROVIDER [ double precision, density_alpha_grad_p, (3) ]
implicit none
BEGIN_DOC
! Gradient of the density at the current point
END_DOC
integer :: i, l
do l=1,3
density_alpha_grad_p(l) = 0.
enddo
do i=1,elec_alpha_num
do l=1,3
density_alpha_grad_p(l) = density_alpha_grad_p(l) + 2.*mo_grad_p(i,l)*mo_value_p(i)
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER [ double precision, density_beta_grad_p, (3) ]
implicit none
BEGIN_DOC
! Gradient of the density at the current point
END_DOC
integer :: i, l
do l=1,3
density_beta_grad_p(l) = 0.
enddo
do i=1,elec_beta_num
do l=1,3
density_beta_grad_p(l) = density_beta_grad_p(l) + 2.*mo_grad_p(i,l)*mo_value_p(i)
enddo
enddo
END_PROVIDER