10
1
mirror of https://gitlab.com/scemama/qmcchem.git synced 2024-11-07 14:43:39 +01:00
qmcchem/ocaml/Qmcchem_info.ml

32 lines
777 B
OCaml
Raw Normal View History

2015-12-29 01:16:19 +01:00
let run ezfio_filename =
Qputils.set_ezfio_filename ezfio_filename;
2015-12-29 01:16:19 +01:00
let qmcchem_info =
Lazy.force Qmcchem_config.qmcchem_info
in
2017-10-10 09:39:58 +02:00
let prog, argv =
2015-12-29 01:16:19 +01:00
qmcchem_info,
2019-07-19 17:06:01 +02:00
[| qmcchem_info ; ezfio_filename |]
2015-12-29 01:16:19 +01:00
in
ignore @@
2019-07-23 17:27:02 +02:00
Unix.execvp prog argv
2015-12-29 01:16:19 +01:00
2019-07-22 12:19:12 +02:00
let command () =
2019-07-22 11:31:16 +02:00
let open Command_line in
begin
set_header_doc (Sys.argv.(0) ^ " - QMC=Chem command");
set_description_doc "Display info on an EZFIO database";
[ anonymous "EZFIO_DIR" Mandatory "EZFIO directory" ]
|> set_specs
end;
2015-12-29 01:16:19 +01:00
2019-07-22 11:31:16 +02:00
let ezfio_file =
match Command_line.anon_args () with
| ezfio_file :: [] -> ezfio_file
| _ -> (Command_line.help () ; failwith "Inconsistent command line")
in
2015-12-29 01:16:19 +01:00
2019-07-22 11:31:16 +02:00
run ezfio_file
2015-12-29 01:16:19 +01:00