QCaml/run_tests.ml

55 lines
1.4 KiB
OCaml
Raw Normal View History

2018-07-05 00:39:17 +02:00
2019-04-12 18:48:23 +02:00
let () =
2018-07-04 20:24:51 +02:00
2020-03-26 16:24:41 +01:00
(* H2O / cc-pVDZ *)
let test_integrals_water, test_guess_water =
let basis_file = "test_files/cc-pvdz"
and nuclei_file = "test_files/water.xyz"
in
let simulation_closed_shell =
Simulation.of_filenames ~charge:0 ~multiplicity:1 ~nuclei:nuclei_file basis_file
in
let ao_basis =
Simulation.ao_basis simulation_closed_shell
in
(fun () -> AOBasis.test_case "water" ao_basis),
(fun () -> Guess.test_case ao_basis);
2018-07-05 00:39:17 +02:00
in
2020-03-26 16:24:41 +01:00
(* LiH / cc-pVTZ *)
let test_integrals_lih =
let basis_file = "test_files/cc-pvdz"
2020-03-26 16:24:41 +01:00
and nuclei_file = "test_files/lih.xyz"
in
let simulation_closed_shell =
2020-05-08 00:33:43 +02:00
Simulation.of_filenames ~range_separation:0.5 ~charge:0 ~cartesian:true ~multiplicity:1 ~nuclei:nuclei_file basis_file
2020-03-26 16:24:41 +01:00
in
let ao_basis =
Simulation.ao_basis simulation_closed_shell
in
(fun () -> AOBasis.test_case "lih" ao_basis)
2018-07-05 00:39:17 +02:00
in
2020-03-26 16:24:41 +01:00
Alcotest.run "Unit tests" [
"Util", Util.test_case ();
"Bitstring", Bitstring.test_case ();
"Spindeterminant", Spindeterminant.test_case ();
"Determinant", Determinant.test_case ();
"Excitation", Excitation.test_case ();
"Sparse vectors", Vector.test_case ();
"Sparse matrices", Matrix.test_case ();
"Cholesky", Cholesky.test_case ();
"Guess water", test_guess_water ();
"AO Integrals water", test_integrals_water ();
"AO Integrals LiH", test_integrals_lih ();
]
2018-07-04 20:24:51 +02:00