mirror of
https://github.com/TREX-CoE/irpjast.git
synced 2024-08-24 22:21:47 +02:00
Initial commit
This commit is contained in:
commit
32576e0221
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
IRPF90_temp/
|
||||
IRPF90_man/
|
||||
irpf90.make
|
||||
irpf90_entities
|
||||
tags
|
16
Makefile
Normal file
16
Makefile
Normal file
@ -0,0 +1,16 @@
|
||||
IRPF90 = irpf90 -a -d
|
||||
FC = gfortran
|
||||
FCFLAGS= -O2 -ffree-line-length-none -I .
|
||||
NINJA = ninja
|
||||
AR = ar
|
||||
RANLIB = ranlib
|
||||
|
||||
SRC=
|
||||
OBJ=
|
||||
LIB=
|
||||
|
||||
-include irpf90.make
|
||||
export
|
||||
|
||||
irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile
|
||||
$(IRPF90)
|
3
README.org
Normal file
3
README.org
Normal file
@ -0,0 +1,3 @@
|
||||
* IRPJAST
|
||||
|
||||
CHAMP's Jastrow factor computation using the IRPF90 method
|
0
el_nuc_el.irp.f
Normal file
0
el_nuc_el.irp.f
Normal file
56
electrons.irp.f
Normal file
56
electrons.irp.f
Normal file
@ -0,0 +1,56 @@
|
||||
BEGIN_PROVIDER [ integer, nelec ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Number of electrons
|
||||
END_DOC
|
||||
nelec = 2
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ double precision, elec_coord, (nelec, 3) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Electron coordinates
|
||||
END_DOC
|
||||
integer :: i,j
|
||||
do j = 1 , 3
|
||||
do i = 1, nelec
|
||||
call random_number(elec_coord(i, j))
|
||||
enddo
|
||||
enddo
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ double precision, elec_dist, (nelec, nelec) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! e-e distance
|
||||
END_DOC
|
||||
integer :: i,j
|
||||
double precision :: x,y,z
|
||||
do j = 1, nelec
|
||||
do i = 1, nelec
|
||||
x = elec_coord(i, 1) - elec_coord(j, 1)
|
||||
y = elec_coord(i, 2) - elec_coord(j, 2)
|
||||
z = elec_coord(i, 3) - elec_coord(j, 3)
|
||||
elec_dist(i, j) = dsqrt( x*x + y*y + z*z )
|
||||
enddo
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [double precision, factor_ee]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Electron-electron contribution to Jastrow factor
|
||||
END_DOC
|
||||
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
|
||||
end do
|
||||
factor_ee = factor_ee + bord_vect(1) * rescale_ee(i, j) &
|
||||
/ (1 + bord_vect(2) * rescale_ee(i, j)) + pow_ser
|
||||
end do
|
||||
end do
|
||||
factor_ee = 0.5d0 * factor_ee
|
||||
END_PROVIDER
|
8
jastrow.irp.f
Normal file
8
jastrow.irp.f
Normal file
@ -0,0 +1,8 @@
|
||||
program jastrow
|
||||
implicit none
|
||||
print *, elec_coord
|
||||
print *, ''
|
||||
print *, elec_dist
|
||||
print *, ''
|
||||
print *, rescale_ee
|
||||
end program
|
57
nuclei.irp.f
Normal file
57
nuclei.irp.f
Normal file
@ -0,0 +1,57 @@
|
||||
BEGIN_PROVIDER [ integer, nnuc ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Number of nuclei
|
||||
END_DOC
|
||||
nnuc = 2
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ double precision, nuc_coord, (nnuc, 3) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Nuclei coordinates
|
||||
END_DOC
|
||||
integer :: i, j
|
||||
do j = 1 , 3
|
||||
do i = 1, nnuc
|
||||
call random_number(nuc_coord(i, j))
|
||||
enddo
|
||||
enddo
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ double precision, elnuc_dist, (nnuc, nnuc) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! e-n distance
|
||||
END_DOC
|
||||
integer :: i, j
|
||||
double precision :: x, y, z
|
||||
do j = 1, nnuc
|
||||
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
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [double precision, factor_en]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Electron-nuclei contribution to Jastrow factor
|
||||
END_DOC
|
||||
integer :: i, j, p
|
||||
double precision :: pow_ser
|
||||
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
|
||||
end do
|
||||
factor_en = factor_en + aord_vect(1) * rescale_en(i, j) &
|
||||
/ (1 + aord_vect(2) * rescale_en(i, j)) + pow_ser
|
||||
end do
|
||||
end do
|
||||
END_PROVIDER
|
53
orders.irp.f
Normal file
53
orders.irp.f
Normal file
@ -0,0 +1,53 @@
|
||||
BEGIN_PROVIDER [integer, naord]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Expansion order for f_en
|
||||
END_DOC
|
||||
naord = 5
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [integer, nbord]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Expansion order for f_ee
|
||||
END_DOC
|
||||
nbord = 5
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [integer, ncord]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Expansion order for f_een
|
||||
END_DOC
|
||||
ncord = 5
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [double precision, aord_vect, (naord)]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Vector of the `a' coefficients
|
||||
END_DOC
|
||||
do i = 1, naord
|
||||
call random_number(aord_vect)
|
||||
end do
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [double precision, bord_vect, (nbord)]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Vector of the `b' coefficients
|
||||
END_DOC
|
||||
do i = 1, nbord
|
||||
call random_number(bord_vect)
|
||||
end do
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [double precision, cord_vect, (ncord)]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Vector of the `b' coefficients
|
||||
END_DOC
|
||||
do i = 1, ncord
|
||||
call random_number(cord_vect)
|
||||
end do
|
||||
END_PROVIDER
|
41
rescale.irp.f
Normal file
41
rescale.irp.f
Normal file
@ -0,0 +1,41 @@
|
||||
BEGIN_PROVIDER [ double precision, kappa ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Constant in rescaling
|
||||
END_DOC
|
||||
kappa = 1.5d0
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ double precision, kappa_inv ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! inverse of kappa
|
||||
END_DOC
|
||||
kappa_inv = 1.d0/kappa
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ double precision, rescale_ee, (nelec, nelec) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! R = (1 - exp(-kappa r))/kappa for electron-electron
|
||||
END_DOC
|
||||
integer :: i, j
|
||||
do j=1,nelec
|
||||
do i=1,nelec
|
||||
rescale_ee(i, j) = (1.d0 - dexp(-kappa * elec_dist(i, j))) * kappa_inv
|
||||
enddo
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ double precision, rescale_en, (nelec, nnuc) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! R = (1 - exp(-kappa r))/kappa for electron-nucleus
|
||||
END_DOC
|
||||
integer :: i, j
|
||||
do j = 1, nnuc
|
||||
do i = 1, nelec
|
||||
rescale_en(i,j) = (1.d0 - dexp(-kappa * elnuc_dist(i,j))) * kappa_inv
|
||||
enddo
|
||||
enddo
|
||||
END_PROVIDER
|
Loading…
Reference in New Issue
Block a user