1
0
mirror of https://github.com/TREX-CoE/irpjast.git synced 2024-11-04 21:24:12 +01:00
irpjast/el_nuc_el.irp.f
2020-12-02 10:41:22 +01:00

43 lines
1.2 KiB
Fortran

BEGIN_PROVIDER [double precision, factor_een]
implicit none
BEGIN_DOC
! Electron-electron nucleus contribution to Jastrow factor
END_DOC
integer :: i, j, alpha, p, k, l, lmax = 0
double precision :: x, y, z, t, t_inv
factor_een = 0.0d0
do alpha = 1, nnuc
do j = 1, nelec
do i = 1, nelec
t_inv = 1.d0/(rescale_een_n(i, alpha) * rescale_een_n(j, alpha))
do p = 2, ncord
x = 1.d0
do k = 0, p - 1
if ( k == 0 ) then
lmax = p - k - 2
else
lmax = p - k
end if
y = 1.d0
z = 1.d0
t = (rescale_een_n(i, alpha) * rescale_een_n(j, alpha)) ** (rshift(p - k,1))
do l = 0, lmax
if ( iand(p - k - l, 1) == 0 ) then
factor_een = factor_een + cord_vect(l, k, p, alpha) * x * (y+z) * t
t = t * t_inv
end if
y = y * rescale_een_n(i, alpha)
z = z * rescale_een_n(j, alpha)
end do
x = x * rescale_een_e(i, j)
end do
end do
end do
end do
end do
factor_een = 0.5d0 * factor_een
END_PROVIDER