10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-14 01:53:55 +01:00
quantum_package/ocaml/qp_print_basis.ml

59 lines
1.2 KiB
OCaml
Raw Normal View History

2016-01-14 15:17:57 +01:00
open Core.Std
open Qptypes
2016-01-26 15:17:25 +01:00
let basis () =
2016-01-14 15:17:57 +01:00
let ezfio_filename =
Sys.argv.(1)
in
if (not (Sys.file_exists_exn ezfio_filename)) then
failwith "Error reading EZFIO file";
Ezfio.set_file ezfio_filename;
let basis =
match Input.Ao_basis.read () with
| Some basis -> basis
| _ -> failwith "Error reading basis set"
in
Input.Ao_basis.to_rst basis
|> Rst_string.to_string
|> print_endline
2016-01-26 15:05:46 +01:00
2016-01-14 15:17:57 +01:00
2016-01-26 15:17:25 +01:00
let mo () =
let ezfio_filename =
Sys.argv.(1)
in
if (not (Sys.file_exists_exn ezfio_filename)) then
failwith "Error reading EZFIO file";
Ezfio.set_file ezfio_filename;
let mo_coef =
match Input.Mo_basis.read () with
| Some mo_coef -> mo_coef
| _ -> failwith "Error reading the mo set"
in
Input.Mo_basis.to_rst mo_coef
|> Rst_string.to_string
|> print_endline
2016-01-26 15:05:46 +01:00
2016-02-29 11:26:33 +01:00
let psi_det () =
let ezfio_filename =
Sys.argv.(1)
in
if (not (Sys.file_exists_exn ezfio_filename)) then
failwith "Error reading EZFIO file";
Ezfio.set_file ezfio_filename;
let psi_det =
2016-03-07 20:13:43 +01:00
Input.Determinants_by_hand.read ()
2016-02-29 11:26:33 +01:00
in
Input.Determinants_by_hand.to_rst psi_det
|> Rst_string.to_string
|> print_endline
2016-01-26 15:17:25 +01:00
let () =
basis ();
2016-02-29 11:26:33 +01:00
mo ();
2016-03-07 20:13:43 +01:00
psi_det ()
2016-01-26 15:17:25 +01:00