10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-11-14 01:53:39 +01:00
QCaml/top/lib/install_printers.ml

44 lines
1.2 KiB
OCaml
Raw Normal View History

2021-01-01 16:39:33 +01:00
(* [[file:~/QCaml/top/install_printers.org::*Intall%20printers][Intall printers:3]] *)
2020-12-29 00:39:12 +01:00
let printers =
[
2021-01-04 23:15:27 +01:00
"Ao.Basis.pp" ;
"Ao.Basis_gaussian.pp" ;
2020-12-29 00:39:12 +01:00
"Common.Angular_momentum.pp" ;
"Common.Bitstring.pp" ;
"Common.Charge.pp" ;
"Common.Coordinate.pp" ;
"Common.Powers.pp" ;
"Common.Range.pp" ;
"Common.Spin.pp" ;
"Common.Zkey.pp" ;
2021-01-06 09:03:26 +01:00
"Gaussian.Atomic_shell.pp" ;
2021-01-20 23:55:34 +01:00
"Gaussian.Atomic_shell_pair.pp" ;
2021-01-07 09:21:06 +01:00
"Gaussian.Atomic_shell_pair_couple.pp" ;
2021-01-01 12:52:50 +01:00
"Mo.Frozen_core.pp" ;
2021-01-30 19:07:59 +01:00
"Mo.Localization.pp" ;
2020-12-29 00:39:12 +01:00
"Particles.Electrons.pp" ;
"Particles.Element.pp" ;
2021-01-01 11:46:11 +01:00
"Particles.Nuclei.pp" ;
2020-12-29 02:29:43 +01:00
"Particles.Zmatrix.pp" ;
2021-01-01 12:52:50 +01:00
"Perturbation.Mp2.pp" ;
"Simulation.pp" ;
2020-12-29 00:39:12 +01:00
]
let eval_exn str =
let lexbuf = Lexing.from_string str in
let phrase = !Toploop.parse_toplevel_phrase lexbuf in
Toploop.execute_phrase false Format.err_formatter phrase
let rec install_printers = function
2020-12-29 02:29:43 +01:00
| [] -> eval_exn "#require \"lacaml.top\";;"
2020-12-29 00:39:12 +01:00
| printer :: printers ->
let cmd = Printf.sprintf "#install_printer %s;;" printer in
eval_exn cmd && install_printers printers
let () =
if not (install_printers printers) then
Format.eprintf "Problem installing QCaml-printers@."
2021-01-01 12:52:50 +01:00
(* Intall printers:3 ends here *)