mirror of
https://github.com/TREX-CoE/irpjast.git
synced 2024-12-22 04:14:54 +01:00
Gradient and Laplacian for total jastrow working
This commit is contained in:
parent
bcc68c6e81
commit
01126faa45
@ -35,7 +35,7 @@ print *, $X_deriv_e(4, $Z)
|
||||
print *, ''
|
||||
|
||||
SUBST [X, Y, Z]
|
||||
factor_en ; ; 1;;
|
||||
factor_ee ; ; 1;;
|
||||
END_TEMPLATE
|
||||
!factor_een ; ; 1;;
|
||||
!rescale_een_e ; (1,3,1) ; 1,3,1 ;;
|
||||
@ -43,6 +43,8 @@ END_TEMPLATE
|
||||
!rescale_een_e ; (1, 2, 2) ; 1, 2, 2 ;;
|
||||
!factor_en ; ; 1;;
|
||||
!rescale_en ; (1, 2) ; 1, 2 ;;
|
||||
!factor_ee ; ; 1;;
|
||||
!rescale_ee ; (1, 2) ; 1, 2 ;;
|
||||
!elnuc_dist ; (1,1); 1,1 ;;
|
||||
!elec_dist ; (1,2); 1,2 ;;
|
||||
|
||||
|
@ -72,7 +72,6 @@ BEGIN_PROVIDER [double precision, asymp_jasb, (2)]
|
||||
end do
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [double precision, factor_ee]
|
||||
implicit none
|
||||
@ -108,3 +107,69 @@ BEGIN_PROVIDER [double precision, factor_ee]
|
||||
end do
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [double precision, factor_ee_deriv_e, (4, nelec) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Dimensions 1-3 : dx, dy, dz
|
||||
! Dimension 4 : d2x + d2y + d2z
|
||||
END_DOC
|
||||
integer :: i, ii, j, p
|
||||
double precision :: x, x_inv, y, den, invden, lap1, lap2, lap3, third, spin_fact
|
||||
double precision, dimension(3) :: pow_ser_g
|
||||
double precision, dimension(4) :: dx
|
||||
|
||||
factor_ee_deriv_e = 0.0d0
|
||||
third = 1.0d0 / 3.0d0
|
||||
|
||||
do j = 1 , nelec
|
||||
do i = 1, nelec
|
||||
pow_ser_g = 0.0d0
|
||||
spin_fact = 1.0d0
|
||||
den = 1.0d0 + bord_vect(2) * rescale_ee(i, j)
|
||||
invden = 1.0d0 / den
|
||||
x_inv = 1.0d0 / (rescale_ee(i, j) + 1.0d-18)
|
||||
|
||||
do ii = 1, 4
|
||||
dx(ii) = rescale_ee_deriv_e(ii, j, i)
|
||||
enddo
|
||||
|
||||
if ((i.le.nelec_up .and. j.le.nelec_up) .or. &
|
||||
(i.gt.nelec_up .and. j.gt.nelec_up)) then
|
||||
spin_fact = 0.5d0
|
||||
end if
|
||||
|
||||
lap1 = 0.0d0
|
||||
lap2 = 0.0d0
|
||||
lap3 = 0.0d0
|
||||
do ii = 1, 3
|
||||
x = rescale_ee(i, j)
|
||||
do p = 2, nbord
|
||||
! p a_{p+1} r[i,j]^(p-1)
|
||||
y = p * bord_vect(p + 1) * x
|
||||
pow_ser_g(ii) += y * dx(ii)
|
||||
! (p-1) p a_{p+1} r[i,j]^(p-2) r'[i,j]^2
|
||||
lap1 += (p - 1) * y * x_inv * dx(ii) * dx(ii)
|
||||
! p a_{p+1} r[i,j]^(p-1) r''[i,j]
|
||||
lap2 += y
|
||||
x = x * rescale_ee(i, j)
|
||||
end do
|
||||
|
||||
! (a1 (-2 a2 r'[i,j]^2+(1+a2 r[i,j]) r''[i,j]))/(1+a2 r[i,j])^3
|
||||
lap3 += -2.0d0 * bord_vect(2) * dx(ii) * dx(ii)
|
||||
|
||||
! \frac{a1 * r'(i,j)}{(a2 * r(i,j)+1)^2}
|
||||
factor_ee_deriv_e(ii, j) += spin_fact * bord_vect(1) &
|
||||
* dx(ii) * invden * invden + pow_ser_g(ii)
|
||||
enddo
|
||||
|
||||
ii = 4
|
||||
lap2 *= dx(ii) * third
|
||||
lap3 += den * dx(ii)
|
||||
lap3 *= spin_fact * bord_vect(1) * invden * invden * invden
|
||||
factor_ee_deriv_e(ii, j) += lap1 + lap2 + lap3
|
||||
|
||||
end do
|
||||
end do
|
||||
|
||||
END_PROVIDER
|
||||
|
@ -58,7 +58,7 @@ BEGIN_PROVIDER [double precision, factor_en]
|
||||
BEGIN_DOC
|
||||
! Electron-nuclei contribution to Jastrow factor
|
||||
END_DOC
|
||||
integer :: i, a, p, q
|
||||
integer :: i, a, p
|
||||
double precision :: pow_ser, x
|
||||
|
||||
factor_en = 0.0d0
|
||||
@ -87,7 +87,7 @@ BEGIN_PROVIDER [double precision, factor_en_deriv_e, (4, nelec) ]
|
||||
! Dimensions 1-3 : dx, dy, dz
|
||||
! Dimension 4 : d2x + d2y + d2z
|
||||
END_DOC
|
||||
integer :: i, ii, a, p, q
|
||||
integer :: i, ii, a, p
|
||||
double precision :: x, x_inv, y, den, invden, lap1, lap2, lap3, third
|
||||
double precision, dimension(3) :: pow_ser_g
|
||||
double precision, dimension(4) :: dx
|
||||
@ -100,6 +100,7 @@ BEGIN_PROVIDER [double precision, factor_en_deriv_e, (4, nelec) ]
|
||||
pow_ser_g = 0.0d0
|
||||
den = 1.0d0 + aord_vect(2, typenuc_arr(a)) * rescale_en(i, a)
|
||||
invden = 1.0d0 / den
|
||||
x_inv = 1.0d0 / rescale_en(i, a)
|
||||
|
||||
do ii = 1, 4
|
||||
dx(ii) = rescale_en_deriv_e(ii, i, a)
|
||||
@ -110,7 +111,6 @@ BEGIN_PROVIDER [double precision, factor_en_deriv_e, (4, nelec) ]
|
||||
lap3 = 0.0d0
|
||||
do ii = 1, 3
|
||||
x = rescale_en(i, a)
|
||||
x_inv = 1.0d0 / x
|
||||
do p = 2, naord
|
||||
! p a_{p+1} r[i,a]^(p-1)
|
||||
y = p * aord_vect(p + 1, typenuc_arr(a)) * x
|
||||
@ -133,7 +133,7 @@ BEGIN_PROVIDER [double precision, factor_en_deriv_e, (4, nelec) ]
|
||||
ii = 4
|
||||
lap2 *= dx(ii) * third
|
||||
lap3 += den * dx(ii)
|
||||
lap3 = lap3 * aord_vect(1, typenuc_arr(a)) * invden * invden * invden
|
||||
lap3 *= aord_vect(1, typenuc_arr(a)) * invden * invden * invden
|
||||
factor_en_deriv_e(ii, i) += lap1 + lap2 + lap3
|
||||
|
||||
end do
|
||||
|
Loading…
Reference in New Issue
Block a user