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

41 lines
1.0 KiB
OCaml

let out_file : string option ref = ref None
let speclist = [
( "-b" , Arg.String Basis.set_file ,
"File containing the atomic basis set") ;
( "-c" , Arg.String Nuclei.set_file ,
"File containing the nuclear coordinates") ;
( "-o" , Arg.String (fun x -> out_file := Some x) ,
"Output file") ;
]
let run ~out =
(*
let gc = Gc.get () in
Gc.set { gc with minor_heap_size=(262144 / 16) };
*)
let out_file =
match out with
| None -> raise (Invalid_argument "Output file should be specified with -o")
| Some x -> x
in
let nuclei = Lazy.force Nuclei.nuclei in
print_endline @@ Nuclei.to_string nuclei;
let basis = Lazy.force Basis.basis in
print_endline @@ Basis.to_string basis;
Overlap.to_file ~filename:(out_file^".overlap") basis;
NucInt.to_file ~filename:(out_file^".nuc") basis nuclei;
KinInt.to_file ~filename:(out_file^".kin") basis;
ERI.to_file ~filename:(out_file^".eri") basis
let () =
let usage_msg = "Available options:" in
Arg.parse speclist (fun _ -> ()) usage_msg;
run ~out:!out_file