From 06cada2d92b4aecc09d58a64edcacf8fe86e9046 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 6 Jan 2016 20:53:40 +0100 Subject: [PATCH] Minor changes in tests --- ocaml/qp_print_basis.ml | 20 ++++++++++++++++++++ src/AO_Basis/aos.irp.f | 2 +- test/bats/qp.bats | 4 ---- 3 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 ocaml/qp_print_basis.ml diff --git a/ocaml/qp_print_basis.ml b/ocaml/qp_print_basis.ml new file mode 100644 index 00000000..60abd8b9 --- /dev/null +++ b/ocaml/qp_print_basis.ml @@ -0,0 +1,20 @@ +open Core.Std +open Qptypes + +let () = + let ezfio_filename = + Sys.argv.(1) + in + if (not (Sys.file_exists_exn ezfio_filename)) then + failwith "Error reading EZFIO file"; + Ezfio.set_file ezfio_filename; + let basis = + match Input.Ao_basis.read () with + | Some basis -> basis + | _ -> failwith "Error reading basis set" + in + Input.Ao_basis.to_rst basis + |> Rst_string.to_string + |> print_endline + + diff --git a/src/AO_Basis/aos.irp.f b/src/AO_Basis/aos.irp.f index 71c93bc0..ea426c2f 100644 --- a/src/AO_Basis/aos.irp.f +++ b/src/AO_Basis/aos.irp.f @@ -19,7 +19,7 @@ END_PROVIDER ao_prim_num_max_align = align_double(ao_prim_num_max) END_PROVIDER -BEGIN_PROVIDER [ double precision, ao_coef_normalized, (ao_num,ao_prim_num_max) ] +BEGIN_PROVIDER [ double precision, ao_coef_normalized, (ao_num_align,ao_prim_num_max) ] implicit none BEGIN_DOC ! Coefficients including the AO normalization diff --git a/test/bats/qp.bats b/test/bats/qp.bats index 45924479..7745c188 100644 --- a/test/bats/qp.bats +++ b/test/bats/qp.bats @@ -5,7 +5,6 @@ # If the numbers are not equal, the exit code is 1 else it is 0 # So we strip the "-", is the abs value of the poor function eq() { -# awk -v d1=$1 -v d2=$2 -v n1=${1#-} -v n2=${2#-} -v p=$3 'BEGIN{ if ((n1-n2)^2 < p^2) exit 0; { print (d1-d2) " " d1 " " d2 ; exit 1} }' declare -a diff diff=($(awk -v d1=$1 -v d2=$2 -v n1=${1#-} -v n2=${2#-} -v p=$3 'BEGIN{ if ((n1-n2)^2 < p^2) print 0; print 1 " " (d1-d2) " " d1 " " d2 }')) if [[ "${diff[0]}" == "0" ]] @@ -101,13 +100,11 @@ function run_FCI() { } @test "FCI H2O cc-pVDZ" { - run "SCF H2O cc-pVDZ" run_FCI h2o.ezfio 2000 -76.2340571014912 -76.2472677390010 } @test "CAS_SD H2O cc-pVDZ" { test_exe cas_sd_selected || skip - run "SCF H2O cc-pVDZ" INPUT=h2o.ezfio ezfio set_file $INPUT ezfio set perturbation do_pt2_end False @@ -120,7 +117,6 @@ function run_FCI() { @test "MRCC H2O cc-pVDZ" { test_exe mrcc_cassd || skip - run "CAS_SD H2O cc-pVDZ" INPUT=h2o.ezfio ezfio set_file $INPUT ezfio set determinants threshold_generators 1.