2017-08-18 18:28:33 +02:00
|
|
|
open Core
|
2017-05-31 23:47:18 +02:00
|
|
|
open Qptypes
|
2014-08-13 17:54:32 +02:00
|
|
|
|
|
|
|
let test_prim () =
|
|
|
|
let p =
|
2017-05-31 23:47:18 +02:00
|
|
|
{ GaussianPrimitive.sym = Symmetry.P ;
|
|
|
|
GaussianPrimitive.expo = AO_expo.of_float 0.15} in
|
|
|
|
GaussianPrimitive.to_string p
|
2014-08-13 17:54:32 +02:00
|
|
|
|> print_string
|
2017-05-31 23:47:18 +02:00
|
|
|
|
2014-08-13 17:54:32 +02:00
|
|
|
|
2014-08-23 16:18:19 +02:00
|
|
|
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
|
2014-10-26 12:46:17 +01:00
|
|
|
print_endline (Gto.to_string gto);
|
|
|
|
In_channel.seek in_channel 0L;
|
|
|
|
ignore (input_line in_channel);
|
|
|
|
let gto2 = Gto.read_one in_channel in
|
|
|
|
print_endline (Gto.to_string gto2);
|
|
|
|
let gto3 = Gto.read_one in_channel in
|
|
|
|
print_endline (Gto.to_string gto3);
|
|
|
|
if (gto2 = gto) then
|
|
|
|
print_endline "gto2 = gto";
|
|
|
|
if (gto3 = gto) then
|
|
|
|
print_endline "gto3 = gto";
|
|
|
|
if (gto3 = gto3) then
|
|
|
|
print_endline "gto3 = gto3";
|
2017-05-31 23:47:18 +02:00
|
|
|
|
2014-08-23 16:18:19 +02:00
|
|
|
|
|
|
|
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
|
2014-08-23 16:18:19 +02:00
|
|
|
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))
|
2017-05-31 23:47:18 +02:00
|
|
|
|
2014-08-23 16:18:19 +02:00
|
|
|
|
|
|
|
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))
|
2017-05-31 23:47:18 +02:00
|
|
|
|
2014-08-13 17:54:32 +02:00
|
|
|
|
|
|
|
let test_module () =
|
2014-10-26 12:46:17 +01:00
|
|
|
test_gto_1()
|
2014-08-13 17:54:32 +02:00
|
|
|
|
2017-05-31 23:47:18 +02:00
|
|
|
|
|
|
|
test_module ()
|