10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-07-25 12:17:25 +02:00
QCaml/Basis/Basis.ml
2018-01-18 00:21:05 +01:00

21 lines
535 B
OCaml

type t
let of_nuclei_and_general_basis n b =
Array.map (fun (e, center) ->
List.assoc e b
|> Array.map (fun (totAngMom, shell) ->
let expo = Array.map (fun General_basis.{exponent ; coefficient} ->
exponent) shell
and coef = Array.map (fun General_basis.{exponent ; coefficient} ->
coefficient) shell
in
Contracted_shell.create ~expo ~coef ~totAngMom ~center)
) n
let to_string b =
Array.map (fun i -> Contracted_shell.to_string i) b
|> Array.to_list
|> String.concat "\n"