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.
|
||||
maxm : Maximum total angular momentum
|
||||
*)
|
||||
let boys_function ~maxm t =
|
||||
let rec boys_function ~maxm t =
|
||||
match maxm with
|
||||
| 0 ->
|
||||
begin
|
||||
@ -33,7 +33,12 @@ let boys_function ~maxm t =
|
||||
let (dm, f) = factor.(i-1) in
|
||||
factor.(i) <- (dm +. 1., f *. t_inv);
|
||||
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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user