From f865181e9e30fe0f45db194ac85887920d56269e Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Fri, 17 Jan 2020 10:51:11 +0100 Subject: [PATCH] Updated run_integrals --- run_integrals.ml | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/run_integrals.ml b/run_integrals.ml index 05df36f..11951cb 100644 --- a/run_integrals.ml +++ b/run_integrals.ml @@ -8,16 +8,10 @@ let speclist = [ "File containing the atomic basis set") ; ( "-x" , Arg.String (fun x -> nuclei_file := Some x), "File containing the nuclear coordinates") ; - ( "-o" , Arg.String (fun x -> out_file := Some x) , - "Output file") ; ] -let run ~out = - let out_file = - match out with - | None -> raise (Invalid_argument "Output file should be specified with -o") - | Some x -> x - and basis_file = +let run () = + let basis_file = match !basis_file with | None -> raise (Invalid_argument "Basis set file should be specified with -b") | Some x -> x @@ -27,9 +21,8 @@ let run ~out = | Some x -> x in - let f12 = F12factor.gaussian_geminal 1.0 in let s = - Simulation.of_filenames ~nuclei:nuclei_file ~f12 basis_file + Simulation.of_filenames ~nuclei:nuclei_file basis_file in print_endline @@ Nuclei.to_string @@ Simulation.nuclei s; @@ -42,17 +35,15 @@ let run ~out = let eN_ints = AOBasis.eN_ints ao_basis in let kin_ints = AOBasis.kin_ints ao_basis in let ee_ints = AOBasis.ee_ints ao_basis in - Overlap.to_file ~filename:(out_file^".overlap") overlap; - NucInt.to_file ~filename:(out_file^".nuc") eN_ints; - KinInt.to_file ~filename:(out_file^".kin") kin_ints; - ERI.to_file ~filename:(out_file^".eri") ee_ints; - let f12_ints = AOBasis.f12_ints ao_basis in - F12.to_file ~filename:(out_file^".f12") f12_ints; + Overlap.to_file ~filename:("Ov.dat") overlap; + NucInt.to_file ~filename:("Nuc.dat") eN_ints; + KinInt.to_file ~filename:("Kin.dat") kin_ints; + ERI.to_file ~filename:("ERI.dat") ee_ints; () let () = let usage_msg = "Available options:" in Arg.parse speclist (fun _ -> ()) usage_msg; - run ~out:!out_file + run ()