mirror of
https://github.com/TREX-CoE/irpjast.git
synced 2024-11-04 05:04:00 +01:00
Fixed random bug
This commit is contained in:
parent
67f1d6c4f6
commit
1f8e639e0c
@ -5,6 +5,7 @@ BEGIN_PROVIDER [double precision, factor_een]
|
|||||||
END_DOC
|
END_DOC
|
||||||
integer :: i, j, alpha, p, k, l, lmax = 0
|
integer :: i, j, alpha, p, k, l, lmax = 0
|
||||||
double precision :: x, y, z, t, c_inv, u, a, b, a2, b2, c, t0
|
double precision :: x, y, z, t, c_inv, u, a, b, a2, b2, c, t0
|
||||||
|
PROVIDE cord_vect
|
||||||
factor_een = 0.0d0
|
factor_een = 0.0d0
|
||||||
|
|
||||||
do alpha = 1, nnuc
|
do alpha = 1, nnuc
|
||||||
@ -29,7 +30,7 @@ BEGIN_PROVIDER [double precision, factor_een]
|
|||||||
do l=1,rshift(p - k,1)
|
do l=1,rshift(p - k,1)
|
||||||
t = t*c
|
t = t*c
|
||||||
end do
|
end do
|
||||||
! We have suppressed this if from the following loop:
|
! We have suppressed this from the following loop:
|
||||||
! if ( iand(p - k - l, 1) == 0 ) then
|
! if ( iand(p - k - l, 1) == 0 ) then
|
||||||
!
|
!
|
||||||
! Start from l=0 when p-k is even
|
! Start from l=0 when p-k is even
|
||||||
@ -42,11 +43,10 @@ BEGIN_PROVIDER [double precision, factor_een]
|
|||||||
z = b
|
z = b
|
||||||
endif
|
endif
|
||||||
do l = iand(p-k,1), lmax, 2
|
do l = iand(p-k,1), lmax, 2
|
||||||
! if (iand(p-k-l,1) == 0) then
|
factor_een = factor_een + cord_vect(l, k, p, alpha) * (y+z) * t
|
||||||
factor_een = factor_een + cord_vect(l, k, p, alpha) * (y+z) * t
|
t = t * c_inv
|
||||||
t = t * c_inv
|
y = y * a2
|
||||||
y = y * a2
|
z = z * b2
|
||||||
z = z * b2
|
|
||||||
end do
|
end do
|
||||||
x = x * u
|
x = x * u
|
||||||
end do
|
end do
|
||||||
|
@ -13,11 +13,13 @@ BEGIN_PROVIDER [ double precision, elec_coord, (nelec, 3) ]
|
|||||||
! Electron coordinates
|
! Electron coordinates
|
||||||
END_DOC
|
END_DOC
|
||||||
integer :: i,j
|
integer :: i,j
|
||||||
|
PROVIDE seed
|
||||||
do j = 1 , 3
|
do j = 1 , 3
|
||||||
do i = 1, nelec
|
do i = 1, nelec
|
||||||
call random_number(elec_coord(i, j))
|
call random_number(elec_coord(i, j))
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
FREE seed
|
||||||
|
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
|
@ -13,11 +13,13 @@ BEGIN_PROVIDER [ double precision, nuc_coord, (nnuc, 3) ]
|
|||||||
! Nuclei coordinates
|
! Nuclei coordinates
|
||||||
END_DOC
|
END_DOC
|
||||||
integer :: i, j
|
integer :: i, j
|
||||||
|
PROVIDE seed
|
||||||
do j = 1 , 3
|
do j = 1 , 3
|
||||||
do i = 1, nnuc
|
do i = 1, nnuc
|
||||||
call random_number(nuc_coord(i, j))
|
call random_number(nuc_coord(i, j))
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
FREE seed
|
||||||
|
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
|
12
orders.irp.f
12
orders.irp.f
@ -28,8 +28,10 @@ BEGIN_PROVIDER [double precision, aord_vect, (naord)]
|
|||||||
! Vector of the `a' coefficients
|
! Vector of the `a' coefficients
|
||||||
END_DOC
|
END_DOC
|
||||||
integer :: i
|
integer :: i
|
||||||
|
PROVIDE seed
|
||||||
call random_number(aord_vect)
|
call random_number(aord_vect)
|
||||||
aord_vect = aord_vect*.1e-2
|
aord_vect = aord_vect*.1d-2
|
||||||
|
FREE seed
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
BEGIN_PROVIDER [double precision, bord_vect, (nbord)]
|
BEGIN_PROVIDER [double precision, bord_vect, (nbord)]
|
||||||
@ -38,8 +40,10 @@ BEGIN_PROVIDER [double precision, bord_vect, (nbord)]
|
|||||||
! Vector of the `b' coefficients
|
! Vector of the `b' coefficients
|
||||||
END_DOC
|
END_DOC
|
||||||
integer :: i
|
integer :: i
|
||||||
|
PROVIDE seed
|
||||||
call random_number(bord_vect)
|
call random_number(bord_vect)
|
||||||
bord_vect = bord_vect*.1e-6
|
bord_vect = bord_vect*.1d-6
|
||||||
|
FREE seed
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
BEGIN_PROVIDER [double precision, cord_vect, (0:ncord,0:ncord,ncord,nnuc)]
|
BEGIN_PROVIDER [double precision, cord_vect, (0:ncord,0:ncord,ncord,nnuc)]
|
||||||
@ -47,6 +51,8 @@ BEGIN_PROVIDER [double precision, cord_vect, (0:ncord,0:ncord,ncord,nnuc)]
|
|||||||
BEGIN_DOC
|
BEGIN_DOC
|
||||||
! Vector of the `c' coefficients
|
! Vector of the `c' coefficients
|
||||||
END_DOC
|
END_DOC
|
||||||
|
PROVIDE seed
|
||||||
call random_number(cord_vect)
|
call random_number(cord_vect)
|
||||||
cord_vect = cord_vect*.1e-4
|
cord_vect = cord_vect*.1d-4
|
||||||
|
FREE seed
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
Loading…
Reference in New Issue
Block a user