From 666a4f4f69ca5f1b1dae8c4a3a39f88b08f3e2b1 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 6 Feb 2018 15:49:17 +0100 Subject: [PATCH] Fixed ERI --- Basis/ERI.ml | 29 ----------------------------- run_integrals.ml | 6 ++---- 2 files changed, 2 insertions(+), 33 deletions(-) diff --git a/Basis/ERI.ml b/Basis/ERI.ml index cf2b5a8..2897046 100644 --- a/Basis/ERI.ml +++ b/Basis/ERI.ml @@ -121,35 +121,20 @@ let to_file ~filename basis = for i=0 to (Array.length basis) - 1 do print_int basis.(i).Contracted_shell.indice ; print_newline (); - (* for j=0 to i do - *) - for j=0 to (Array.length basis) - 1 do - (* let schwartz_p, schwartz_p_max = schwartz.(i).(j) in - *) try - (* if (schwartz_p_max < cutoff) then raise NullIntegral; - *) let shell_p = shell_pairs.(i).(j) in -(* for k=0 to i do for l=0 to k do -*) - for k=0 to (Array.length basis) - 1 do - for l=0 to (Array.length basis) - 1 do - (* let schwartz_q, schwartz_q_max = schwartz.(k).(l) in - *) try - (* if schwartz_p_max *. schwartz_q_max < cutoff2 then raise NullIntegral; - *) let shell_q = shell_pairs.(k).(l) in @@ -162,26 +147,14 @@ let to_file ~filename basis = let cls = if swap then if Array.length shell_p < 2 then - (* contracted_class_shell_pairs ~schwartz_p:schwartz_q ~schwartz_q:schwartz_p shell_q shell_p - *) - contracted_class_shell_pairs shell_q shell_p else - (* contracted_class_shell_pairs_vec ~schwartz_p:schwartz_q ~schwartz_q:schwartz_p shell_q shell_p - *) - contracted_class_shell_pairs_vec shell_q shell_p else if Array.length shell_q < 2 then - (* contracted_class_shell_pairs ~schwartz_p ~schwartz_q shell_p shell_q - *) - contracted_class_shell_pairs shell_p shell_q else - (* contracted_class_shell_pairs_vec ~schwartz_p ~schwartz_q shell_p shell_q - *) - contracted_class_shell_pairs_vec shell_p shell_q in (* Write the data in the output file *) @@ -207,7 +180,6 @@ let to_file ~filename basis = Zmap.find cls key in eri_array.{(i_c-1),(k_c-1),(j_c-1),(l_c-1)} <- value; - (* eri_array.{(j_c-1),(k_c-1),(i_c-1),(l_c-1)} <- value; eri_array.{(i_c-1),(l_c-1),(j_c-1),(k_c-1)} <- value; eri_array.{(j_c-1),(l_c-1),(i_c-1),(k_c-1)} <- value; @@ -215,7 +187,6 @@ let to_file ~filename basis = eri_array.{(k_c-1),(j_c-1),(l_c-1),(i_c-1)} <- value; eri_array.{(l_c-1),(i_c-1),(k_c-1),(j_c-1)} <- value; eri_array.{(l_c-1),(j_c-1),(k_c-1),(i_c-1)} <- value; - *) if (abs_float value > cutoff) then (inn := !inn + 1; ) diff --git a/run_integrals.ml b/run_integrals.ml index 545aaca..7c5aa87 100644 --- a/run_integrals.ml +++ b/run_integrals.ml @@ -27,11 +27,9 @@ let run ~out = let basis = Lazy.force Basis.basis in print_endline @@ Basis.to_string basis; - (* - Overlap.to_file ~filename:(out_file^".overlap") basis + Overlap.to_file ~filename:(out_file^".overlap") basis; + NucInt.to_file ~filename:(out_file^".nuc") basis nuclei; ERI.to_file ~filename:(out_file^".eri") basis - *) - NucInt.to_file ~filename:(out_file^".nuc") basis nuclei let () =