From 803fa3a0d9f63c367d9b613d51a1ee897763c43c Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 30 Jan 2018 22:36:17 +0100 Subject: [PATCH] Added print: --- Basis/ERI.ml | 12 ++++++++++++ Basis/TwoElectronRR.ml | 4 ++-- Basis/TwoElectronRRVectorized.ml | 4 ++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/Basis/ERI.ml b/Basis/ERI.ml index c3dbefa..e1e4e69 100644 --- a/Basis/ERI.ml +++ b/Basis/ERI.ml @@ -58,6 +58,7 @@ let to_file ~filename basis = Array.mapi (fun i shell_a -> Array.map (fun shell_b -> Shell_pair.create_array shell_a shell_b) (Array.sub basis 0 (i+1)) ) basis in + Printf.printf "%d shells\n" (Array.length basis); (* Pre-compute diagonal integrals for Schwartz *) let schwartz = @@ -69,6 +70,17 @@ let to_file ~filename basis = ) pair_array ) shell_pairs in + let icount = ref 0 in + for i=0 to (Array.length basis) - 1 do + print_int basis.(i).Contracted_shell.indice ; print_newline (); + for j=0 to i do + let schwartz_p, schwartz_p_max = schwartz.(i).(j) in + if (schwartz_p_max >= cutoff) then + icount := !icount + 1; + done; + done; + Printf.printf "%d shell pairs\n" !icount; + let inn = ref 0 and out = ref 0 in for i=0 to (Array.length basis) - 1 do diff --git a/Basis/TwoElectronRR.ml b/Basis/TwoElectronRR.ml index 08ff18b..b301c84 100644 --- a/Basis/TwoElectronRR.ml +++ b/Basis/TwoElectronRR.ml @@ -305,8 +305,8 @@ let contracted_class_shell_pairs ~zero_m ?schwartz_p ?schwartz_q shell_p shell_q (** Computes all the two-electron integrals of the contracted shell quartet *) let contracted_class ~zero_m shell_a shell_b shell_c shell_d : float Zmap.t = - let shell_p = Shell_pair.create_array shell_a shell_b - and shell_q = Shell_pair.create_array shell_c shell_d + let shell_p = Shell_pair.create_array ~cutoff shell_a shell_b + and shell_q = Shell_pair.create_array ~cutoff shell_c shell_d in contracted_class_shell_pairs ~zero_m shell_p shell_q diff --git a/Basis/TwoElectronRRVectorized.ml b/Basis/TwoElectronRRVectorized.ml index 21d1331..0a456d4 100644 --- a/Basis/TwoElectronRRVectorized.ml +++ b/Basis/TwoElectronRRVectorized.ml @@ -389,8 +389,8 @@ let contracted_class_shell_pairs ~zero_m ?schwartz_p ?schwartz_q shell_p shell_q (** Computes all the two-electron integrals of the contracted shell quartet *) let contracted_class ~zero_m shell_a shell_b shell_c shell_d : float Zmap.t = - let shell_p = Shell_pair.create_array shell_a shell_b - and shell_q = Shell_pair.create_array shell_c shell_d + let shell_p = Shell_pair.create_array ~cutoff shell_a shell_b + and shell_q = Shell_pair.create_array ~cutoff shell_c shell_d in contracted_class_shell_pairs ~zero_m shell_p shell_q