10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-07 22:53:57 +01:00
quantum_package/ocaml/test_basis.ml

30 lines
627 B
OCaml
Raw Normal View History

2014-09-17 14:57:12 +02:00
open Core.Std;;
open Qputils;;
2014-09-17 23:47:13 +02:00
open Qptypes;;
2014-09-17 14:57:12 +02:00
let test_module () =
let basis_channel =
let b = "cc-pvdz" in
2014-10-18 00:10:25 +02:00
In_channel.create (Qpackage.root^"/data/basis/"^(String.lowercase b))
2014-09-17 14:57:12 +02:00
in
let molecule =
let xyz_file = "F2.xyz" in
Molecule.of_xyz_file xyz_file
in
2014-09-17 23:47:13 +02:00
let nuclei = molecule.Molecule.nuclei in
2014-09-17 14:57:12 +02:00
let basis =
2014-10-23 14:42:14 +02:00
(Basis.read_element basis_channel (Nucl_number.of_int 1) Element.F) @
(Basis.read_element basis_channel (Nucl_number.of_int 2) Element.F)
2014-09-17 14:57:12 +02:00
in
2014-09-17 23:47:13 +02:00
Long_basis.of_basis basis
2014-09-17 14:57:12 +02:00
|> Long_basis.to_string
|> print_endline
;;
test_module ();