mirror of
https://github.com/TREX-CoE/irpjast.git
synced 2024-08-25 06:31:46 +02:00
Tests (broken)
This commit is contained in:
parent
900bf125e6
commit
247b84f2d2
8
Makefile
8
Makefile
@ -1,6 +1,8 @@
|
||||
IRPF90 = irpf90 -a -d
|
||||
FC = gfortran
|
||||
FCFLAGS= -O2 -ffree-line-length-none -I .
|
||||
IRPF90 = irpf90 --codelet factor_een:100
|
||||
#FC = gfortran
|
||||
#FCFLAGS= -g -msse4.2 -fcheck=all -Waliasing -Wampersand -Wconversion -Wsurprising -Wintrinsics-std -Wno-tabs -Wintrinsic-shadow -Wline-truncation -Wreal-q-constant -Wuninitialized -fbacktrace -ffpe-trap=zero,overflow,underflow -finit-real=nan
|
||||
FC = ifort -g
|
||||
FCFLAGS= -O2 -xHost -I .
|
||||
NINJA = ninja
|
||||
AR = ar
|
||||
RANLIB = ranlib
|
||||
|
@ -4,24 +4,33 @@ BEGIN_PROVIDER [double precision, factor_een]
|
||||
! 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
|
||||
do k = p - 1, 0
|
||||
do k = p - 1, 0, -1
|
||||
if ( k == 0 ) then
|
||||
lmax = p - k - 2
|
||||
else
|
||||
lmax = p - k
|
||||
end if
|
||||
do l = lmax, 0
|
||||
if ( mod(p - k - l, 2) == 0 ) then
|
||||
factor_een = factor_een + cord_vect(p, k, l) * rescale_een_e(i, j) ** k &
|
||||
* (rescale_een_n(i, alpha) ** l + rescale_een_n(j, alpha) ** l) * &
|
||||
(rescale_een_n(i, alpha) * rescale_een_n(j, alpha)) ** ((p - k - l) * 0.5d0)
|
||||
x = 1.d0
|
||||
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
|
||||
x = x * rescale_een_e(i, j)
|
||||
y = y * rescale_een_n(i, alpha)
|
||||
z = z * rescale_een_n(j, alpha)
|
||||
end do
|
||||
end do
|
||||
end do
|
||||
|
@ -3,7 +3,7 @@ BEGIN_PROVIDER [ integer, nelec ]
|
||||
BEGIN_DOC
|
||||
! Number of electrons
|
||||
END_DOC
|
||||
nelec = 2
|
||||
nelec = 100
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
@ -43,14 +43,14 @@ BEGIN_PROVIDER [double precision, factor_ee]
|
||||
BEGIN_DOC
|
||||
! Electron-electron contribution to Jastrow factor
|
||||
END_DOC
|
||||
integer :: i, j
|
||||
integer :: i, j, p
|
||||
double precision :: pow_ser = 0.0d0
|
||||
factor_ee = 0.0d0
|
||||
|
||||
do j = 1 , nelec
|
||||
do i = 1, nelec
|
||||
do p = 2, nbord
|
||||
pow_ser = pow_ser + bord_vect(p + 1) * rescale_ee(i, j) ** p
|
||||
pow_ser = pow_ser + bord_vect(p) * rescale_ee(i, j) ** p
|
||||
end do
|
||||
factor_ee = factor_ee + bord_vect(1) * rescale_ee(i, j) &
|
||||
/ (1 + bord_vect(2) * rescale_ee(i, j)) + pow_ser
|
||||
|
@ -1,6 +1,6 @@
|
||||
program jastrow
|
||||
implicit none
|
||||
print *, 'The total Jastrow factor'
|
||||
print *, dexp(factor_ee + factor_en + factor_een)
|
||||
print *, jastrow_full
|
||||
|
||||
end program
|
||||
|
13
jastrow_provider.irp.f
Normal file
13
jastrow_provider.irp.f
Normal file
@ -0,0 +1,13 @@
|
||||
BEGIN_PROVIDER [ double precision, jastrow_full ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Complete jastrow factor
|
||||
END_DOC
|
||||
print *, factor_ee
|
||||
print *, factor_en
|
||||
print *, factor_een
|
||||
|
||||
jastrow_full = dexp(factor_ee + factor_en + factor_een)
|
||||
|
||||
END_PROVIDER
|
||||
|
@ -3,7 +3,7 @@ BEGIN_PROVIDER [ integer, nnuc ]
|
||||
BEGIN_DOC
|
||||
! Number of nuclei
|
||||
END_DOC
|
||||
nnuc = 2
|
||||
nnuc = 10
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ BEGIN_PROVIDER [ double precision, nuc_coord, (nnuc, 3) ]
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ double precision, elnuc_dist, (nnuc, nnuc) ]
|
||||
BEGIN_PROVIDER [ double precision, elnuc_dist, (nelec, nnuc) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! e-n distance
|
||||
@ -50,7 +50,7 @@ BEGIN_PROVIDER [double precision, factor_en]
|
||||
do j = 1 , nnuc
|
||||
do i = 1, nnuc
|
||||
do p = 2, naord
|
||||
pow_ser = pow_ser + aord_vect(p + 1) * rescale_en(i, j) ** p
|
||||
pow_ser = pow_ser + aord_vect(p) * rescale_en(i, j) ** p
|
||||
end do
|
||||
factor_en = factor_en + aord_vect(1) * rescale_en(i, j) &
|
||||
/ (1 + aord_vect(2) * rescale_en(i, j)) + pow_ser
|
||||
|
13
orders.irp.f
13
orders.irp.f
@ -27,9 +27,9 @@ BEGIN_PROVIDER [double precision, aord_vect, (naord)]
|
||||
BEGIN_DOC
|
||||
! Vector of the `a' coefficients
|
||||
END_DOC
|
||||
do i = 1, naord
|
||||
integer :: i
|
||||
call random_number(aord_vect)
|
||||
end do
|
||||
aord_vect = aord_vect*.1e-2
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [double precision, bord_vect, (nbord)]
|
||||
@ -37,17 +37,16 @@ BEGIN_PROVIDER [double precision, bord_vect, (nbord)]
|
||||
BEGIN_DOC
|
||||
! Vector of the `b' coefficients
|
||||
END_DOC
|
||||
do i = 1, nbord
|
||||
integer :: i
|
||||
call random_number(bord_vect)
|
||||
end do
|
||||
bord_vect = bord_vect*.1e-6
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [double precision, cord_vect, (ncord)]
|
||||
BEGIN_PROVIDER [double precision, cord_vect, (0:ncord,0:ncord,ncord,nnuc)]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Vector of the `c' coefficients
|
||||
END_DOC
|
||||
do i = 1, ncord
|
||||
call random_number(cord_vect)
|
||||
end do
|
||||
cord_vect = cord_vect*.1e-4
|
||||
END_PROVIDER
|
||||
|
@ -40,7 +40,7 @@ BEGIN_PROVIDER [ double precision, rescale_en, (nelec, nnuc) ]
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [double precision, rescale_een_e, (nelec, 3)]
|
||||
BEGIN_PROVIDER [double precision, rescale_een_e, (nelec, nelec)]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! R = exp(-kappa r) for electron-electron for $J_{een}$
|
||||
@ -53,7 +53,7 @@ BEGIN_PROVIDER [double precision, rescale_een_e, (nelec, 3)]
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [double precision, rescale_een_n, (nnuc, 3)]
|
||||
BEGIN_PROVIDER [double precision, rescale_een_n, (nelec, nnuc)]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! R = exp(-kappa r) for electron-electron for $J_{een}$
|
||||
|
Loading…
Reference in New Issue
Block a user