1
0
mirror of https://github.com/TREX-CoE/irpjast.git synced 2024-11-04 05:04:00 +01:00
irpjast/nuclei.irp.f

83 lines
1.7 KiB
FortranFixed
Raw Normal View History

2020-11-17 21:35:52 +01:00
BEGIN_PROVIDER [ integer, nnuc ]
implicit none
BEGIN_DOC
! Number of nuclei
END_DOC
2020-12-07 10:55:37 +01:00
nnuc = 2
END_PROVIDER
BEGIN_PROVIDER [ integer, typenuc ]
&BEGIN_PROVIDER [integer, typenuc_arr, (nnuc)]
implicit none
BEGIN_DOC
! Number of nuclei
END_DOC
typenuc = 1
typenuc_arr = (/1, 1/)
2020-11-17 21:35:52 +01:00
END_PROVIDER
BEGIN_PROVIDER [ double precision, nuc_coord, (nnuc, 3) ]
implicit none
BEGIN_DOC
! Nuclei coordinates
END_DOC
2020-12-07 10:55:37 +01:00
character(len=*), parameter :: FILE_NAME = "geometry.txt"
2020-12-08 13:08:23 +01:00
integer :: fu, rc, i
2020-12-07 10:55:37 +01:00
open(action='read', file=FILE_NAME, iostat=rc, newunit=fu)
2020-12-08 13:08:23 +01:00
do i = 1, nnuc
read(fu, *) nuc_coord(i, :)
end do
2020-12-07 10:55:37 +01:00
close(fu)
2020-11-17 21:35:52 +01:00
END_PROVIDER
2020-11-26 16:12:33 +01:00
BEGIN_PROVIDER [ double precision, elnuc_dist, (nelec, nnuc) ]
2020-11-17 21:35:52 +01:00
implicit none
BEGIN_DOC
! e-n distance
END_DOC
integer :: i, j
double precision :: x, y, z
do j = 1, nnuc
2020-12-08 13:08:23 +01:00
do i = 1, nelec
x = elec_coord(i, 1) - nuc_coord(j, 1)
y = elec_coord(i, 2) - nuc_coord(j, 2)
z = elec_coord(i, 3) - nuc_coord(j, 3)
elnuc_dist(i, j) = dsqrt( x*x + y*y + z*z )
enddo
2020-11-17 21:35:52 +01:00
enddo
END_PROVIDER
BEGIN_PROVIDER [double precision, factor_en]
implicit none
BEGIN_DOC
! Electron-nuclei contribution to Jastrow factor
END_DOC
2020-12-07 10:55:37 +01:00
integer :: i, j, p, q
2020-12-04 01:05:07 +01:00
double precision :: pow_ser, x
factor_en = 0.0d0
2020-11-17 21:35:52 +01:00
do j = 1 , nnuc
2020-12-07 10:55:37 +01:00
do i = 1, nelec
2020-12-08 18:56:36 +01:00
x = rescale_en(i, j)
pow_ser = 0.0d0
2020-12-08 23:40:24 +01:00
2020-11-17 21:35:52 +01:00
do p = 2, naord
2020-12-04 01:05:07 +01:00
x = x * rescale_en(i, j)
2020-12-08 13:08:23 +01:00
pow_ser = pow_ser + aord_vect(p + 1, typenuc_arr(j)) * x
2020-11-17 21:35:52 +01:00
end do
2020-12-08 23:40:24 +01:00
2020-12-07 10:55:37 +01:00
factor_en = factor_en + aord_vect(1, typenuc_arr(j)) * rescale_en(i, j) &
/ (1 + aord_vect(2, typenuc_arr(j)) * rescale_en(i, j)) + pow_ser
2020-12-08 23:40:24 +01:00
2020-11-17 21:35:52 +01:00
end do
end do
2020-11-25 18:09:13 +01:00
2020-11-17 21:35:52 +01:00
END_PROVIDER