10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-12-22 12:23:31 +01:00
This commit is contained in:
Anthony Scemama 2018-02-01 19:10:20 +01:00
parent c666878dcd
commit b5ee17ca3e

View File

@ -6,7 +6,7 @@ let factmax = 150
(** Generalized Boys function. Uses GSL's incomplete Gamma function. (** Generalized Boys function. Uses GSL's incomplete Gamma function.
maxm : Maximum total angular momentum maxm : Maximum total angular momentum
*) *)
let boys_function ~maxm t = let rec boys_function ~maxm t =
match maxm with match maxm with
| 0 -> | 0 ->
begin begin
@ -33,7 +33,12 @@ let boys_function ~maxm t =
let (dm, f) = factor.(i-1) in let (dm, f) = factor.(i-1) in
factor.(i) <- (dm +. 1., f *. t_inv); factor.(i) <- (dm +. 1., f *. t_inv);
done; done;
Array.map (fun (dm, f) -> (incomplete_gamma dm t ) *. 0.5 *. f) factor Array.map (fun (dm, f) ->
if dm = 0.5 then
(boys_function ~maxm:0 t).(0)
else
(incomplete_gamma dm t ) *. 0.5 *. f
) factor
end end