mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-11-07 06:33:39 +01:00
19 lines
635 B
OCaml
19 lines
635 B
OCaml
open Qcaml_common
|
|
open Qcaml_particles
|
|
open Alcotest
|
|
|
|
let wd = Qcaml.root ^ Filename.dir_sep ^ "test"
|
|
|
|
let test_xyz molecule length repulsion charge core =
|
|
let xyz = Nuclei.of_xyz_file (wd^Filename.dir_sep^molecule^".xyz") in
|
|
check int "length" length (Array.length xyz);
|
|
check (float 1.e-4) "repulsion" repulsion (Nuclei.repulsion xyz);
|
|
check int "charge" charge (Charge.to_int @@ Nuclei.charge xyz);
|
|
check int "small_core" core (Nuclei.small_core xyz);
|
|
()
|
|
|
|
let tests = [
|
|
"caffeine", `Quick, (fun () -> test_xyz "caffeine" 24 917.0684 102 28);
|
|
"water", `Quick, (fun () -> test_xyz "water" 3 9.19497 10 2);
|
|
]
|