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

41 lines
1.2 KiB
OCaml
Raw Normal View History

2014-08-13 17:54:32 +02:00
open Core.Std;;
open Qptypes;;
let test_prim () =
let p =
{ Primitive.sym = Symmetry.P ;
2014-10-23 14:42:14 +02:00
Primitive.expo = AO_expo.of_float 0.15} in
2014-08-13 17:54:32 +02:00
Primitive.to_string p
|> print_string
;;
let test_gto_1 () =
2014-08-27 16:38:13 +02:00
let in_channel = open_in "/home/scemama/quantum_package/data/basis/cc-pvdz" in
2014-08-13 17:54:32 +02:00
ignore (input_line in_channel);
let gto = Gto.read_one in_channel in
print_string (Gto.to_string gto);
let gto = Gto.read_one in_channel in
print_string (Gto.to_string gto);
let gto = Gto.read_one in_channel in
print_string (Gto.to_string gto);
;;
let test_gto_2 () =
2014-08-27 16:38:13 +02:00
let in_channel = open_in "/home/scemama/quantum_package/data/basis/cc-pvdz" in
ignore (input_line in_channel);
2014-10-23 14:42:14 +02:00
let basis = Basis.read in_channel (Nucl_number.of_int 1) in
List.iter basis ~f:(fun (x,n)-> Printf.printf "%d:%s\n" (Nucl_number.to_int n) (Gto.to_string x))
;;
let test_gto () =
2014-08-27 16:38:13 +02:00
let in_channel = open_in "/home/scemama/quantum_package/data/basis/cc-pvdz" in
2014-10-23 14:42:14 +02:00
let basis = Basis.read_element in_channel (Nucl_number.of_int 1) Element.C in
List.iter basis ~f:(fun (x,n)-> Printf.printf "%d:%s\n" (Nucl_number.to_int n) (Gto.to_string x))
2014-08-13 17:54:32 +02:00
;;
let test_module () =
test_gto()
;;
test_module ();;