10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-23 04:43:45 +01:00

opt in Fc_integral

This commit is contained in:
AbdAmmar 2024-10-19 23:12:30 +02:00
parent 7dff773ab7
commit 60c406a659
2 changed files with 26 additions and 9 deletions

View File

@ -21,7 +21,7 @@ complex*16 function overlap_cgaussian_x(Ae_center, Be_center, alpha, beta, power
integer :: i, iorder_p
complex*16 :: P_new(0:max_dim), P_center, fact_p, p, inv_sq_p
complex*16 :: Fc_integral
complex*16, external :: Fc_integral
call give_explicit_cpoly_and_cgaussian_x(P_new, P_center, p, fact_p, iorder_p, &

View File

@ -424,8 +424,9 @@ complex*16 function Fc_integral(n, inv_sq_p)
integer, intent(in) :: n
complex*16, intent(in) :: inv_sq_p
complex*16 :: inv_sq_p2, inv_sq_p3, inv_sq_p4
! (n)!
double precision :: fact
double precision, external :: fact
if(n < 0) then
Fc_integral = (0.d0, 0.d0)
@ -438,13 +439,29 @@ complex*16 function Fc_integral(n, inv_sq_p)
return
endif
if(n == 0) then
select case(n)
case(0)
Fc_integral = sqpi * inv_sq_p
case(2)
Fc_integral = 0.5d0 * sqpi * inv_sq_p * inv_sq_p * inv_sq_p
case(4)
inv_sq_p2 = inv_sq_p * inv_sq_p
Fc_integral = 0.75d0 * sqpi * inv_sq_p * inv_sq_p2 * inv_sq_p2
case(6)
inv_sq_p3 = inv_sq_p * inv_sq_p * inv_sq_p
Fc_integral = 1.875d0 * sqpi * inv_sq_p * inv_sq_p3 * inv_sq_p3
case(8)
inv_sq_p3 = inv_sq_p * inv_sq_p * inv_sq_p
Fc_integral = 6.5625d0 * sqpi * inv_sq_p3 * inv_sq_p3 * inv_sq_p3
case(10)
inv_sq_p2 = inv_sq_p * inv_sq_p
inv_sq_p4 = inv_sq_p2 * inv_sq_p2
Fc_integral = 29.53125d0 * sqpi * inv_sq_p * inv_sq_p2 * inv_sq_p4 * inv_sq_p4
case default
Fc_integral = sqpi * 0.5d0**n * inv_sq_p**(n+1) * fact(n) / fact(shiftr(n, 1))
end select
return
endif
Fc_integral = sqpi * 0.5d0**n * inv_sq_p**dble(n+1) * fact(n) / fact(shiftr(n, 1))
end
! ---