10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-11-19 04:22:21 +01:00
QCaml/gaussian_integrals/lib/overlap_primitives.ml

37 lines
762 B
OCaml
Raw Normal View History

2020-09-26 12:02:53 +02:00
open Qcaml_common
2018-01-22 23:19:24 +01:00
open Util
2020-09-26 12:02:53 +02:00
(* Horizontal and Vertical Recurrence Relations (HVRR) *)
2018-01-22 23:19:24 +01:00
let hvrr (angMom_a, angMom_b) (expo_inv_p) (center_ab, center_pa)
=
2020-09-26 12:02:53 +02:00
(* Vertical recurrence relations *)
2018-01-22 23:19:24 +01:00
let rec vrr angMom_a =
2018-03-13 18:24:00 +01:00
if angMom_a > 0 then
chop center_pa (fun () -> vrr (angMom_a-1))
2020-02-17 19:45:53 +01:00
+. chop (0.5 *. float_of_int_fast (angMom_a-1) *. expo_inv_p)
2018-01-22 23:19:24 +01:00
(fun () -> vrr (angMom_a-2))
2018-03-13 18:24:00 +01:00
else if angMom_a = 0 then 1.
else 0.
2018-01-22 23:19:24 +01:00
2020-09-26 12:02:53 +02:00
(* Horizontal recurrence relations *)
2018-01-22 23:19:24 +01:00
and hrr angMom_a angMom_b =
2018-03-13 18:24:00 +01:00
if angMom_b > 0 then
2018-01-22 23:19:24 +01:00
hrr (angMom_a+1) (angMom_b-1) +. chop center_ab
(fun () -> hrr angMom_a (angMom_b-1) )
2018-03-13 18:24:00 +01:00
else if angMom_b = 0 then
vrr angMom_a
else 0.
2018-01-22 23:19:24 +01:00
in
hrr angMom_a angMom_b
let overlap = hvrr