2018-01-19 03:14:06 +01:00
|
|
|
let out_file : string option ref = ref None
|
2018-01-18 00:21:05 +01:00
|
|
|
|
|
|
|
|
|
|
|
let speclist = [
|
2018-01-22 23:19:24 +01:00
|
|
|
( "-b" , Arg.String Basis.set_file ,
|
2018-01-19 03:14:06 +01:00
|
|
|
"File containing the atomic basis set") ;
|
2018-01-22 23:19:24 +01:00
|
|
|
( "-c" , Arg.String Nuclei.set_file ,
|
2018-01-19 03:14:06 +01:00
|
|
|
"File containing the nuclear coordinates") ;
|
|
|
|
( "-o" , Arg.String (fun x -> out_file := Some x) ,
|
|
|
|
"Output file") ;
|
2018-01-18 00:21:05 +01:00
|
|
|
]
|
|
|
|
|
2018-01-22 23:19:24 +01:00
|
|
|
let run ~out =
|
2018-01-30 14:51:37 +01:00
|
|
|
(*
|
|
|
|
let gc = Gc.get () in
|
|
|
|
Gc.set { gc with minor_heap_size=(262144 / 16) };
|
|
|
|
*)
|
2018-01-22 23:19:24 +01:00
|
|
|
let out_file =
|
2018-01-19 03:14:06 +01:00
|
|
|
match out with
|
|
|
|
| None -> raise (Invalid_argument "Output file should be specified with -o")
|
2018-01-18 00:21:05 +01:00
|
|
|
| Some x -> x
|
|
|
|
in
|
2018-01-19 03:14:06 +01:00
|
|
|
|
2018-01-22 23:19:24 +01:00
|
|
|
let nuclei = Lazy.force Nuclei.nuclei in
|
2018-01-18 17:39:10 +01:00
|
|
|
print_endline @@ Nuclei.to_string nuclei;
|
|
|
|
|
2018-01-22 23:19:24 +01:00
|
|
|
let basis = Lazy.force Basis.basis in
|
2018-01-19 03:14:06 +01:00
|
|
|
print_endline @@ Basis.to_string basis;
|
|
|
|
|
2018-02-06 15:49:17 +01:00
|
|
|
Overlap.to_file ~filename:(out_file^".overlap") basis;
|
|
|
|
NucInt.to_file ~filename:(out_file^".nuc") basis nuclei;
|
2018-02-06 17:39:14 +01:00
|
|
|
KinInt.to_file ~filename:(out_file^".kin") basis;
|
2018-02-03 23:26:20 +01:00
|
|
|
ERI.to_file ~filename:(out_file^".eri") basis
|
2018-01-18 00:21:05 +01:00
|
|
|
|
|
|
|
|
|
|
|
let () =
|
2018-01-18 14:56:08 +01:00
|
|
|
let usage_msg = "Available options:" in
|
2018-01-18 00:21:05 +01:00
|
|
|
Arg.parse speclist (fun _ -> ()) usage_msg;
|
2018-01-22 23:19:24 +01:00
|
|
|
run ~out:!out_file
|
2018-01-19 03:14:06 +01:00
|
|
|
|