mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-12-22 04:13:33 +01:00
Boys
This commit is contained in:
parent
c666878dcd
commit
b5ee17ca3e
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user