10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-03 12:43:48 +01:00
QuantumPackage/ocaml/qp_print_basis.ml
Anthony Scemama cebc19a601
Merge Master (#69)
* Changed native into SSE4.2 in gfortran.cfg

* Fixed rm opam_installer

* Fix configure

* Improving scaling of pt2 with network

* Router/dealer in qp_tunnel

* Reduced size of qp2.png

* Exclude temp files in tar

* Introduce NO_CACHE in configure for daily test

* Faster determinants in OCaml

* We always give max 10k dets in qp_edit. Read-only if more

* Fixed save_natorb

* Fixing bug in qp_edit

* Comments

* Biblio (#61)

* Biblio (#62)

* Update biblio

* Update paper

* Journal missing in research.bib

* Added paper

* Fixed Pierre Francois

* Checking number of electrons in MOs

* Biblio (#64)

* Update biblio

* Update paper

* Journal missing in research.bib

* Added paper

* Fixed Pierre Francois

* 2 papers

* Fixed 6-31G and quickstart (#65)

* Fixed 6-31 basis sets

* Bug in quickstart

* Biblio (#66)

* Bugfix (#67)

* Fixing opam installation

* Fixed 6-31 basis sets

* Bug in quickstart

* Use irpf90 v1.7.6

* Fix IRPF90 Path
2019-10-21 16:45:00 +02:00

61 lines
1.2 KiB
OCaml

open Qptypes
let basis () =
let ezfio_filename =
Sys.argv.(1)
in
if (not (Sys.file_exists 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
let mo () =
let ezfio_filename =
Sys.argv.(1)
in
if (not (Sys.file_exists 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
let psi_det () =
let ezfio_filename =
Sys.argv.(1)
in
if (not (Sys.file_exists ezfio_filename)) then
failwith "Error reading EZFIO file";
Ezfio.set_file ezfio_filename;
let psi_det =
Input.Determinants_by_hand.read ()
in
match psi_det with
| Some psi_det ->
Input.Determinants_by_hand.to_rst psi_det
|> Rst_string.to_string
|> print_endline
| None -> ()
let () =
basis ();
mo ()
(* psi_det () *)