From 5420d41503a5e67c7319accc4b7184368f357480 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Fri, 9 Feb 2018 12:57:42 +0100 Subject: [PATCH] Removed CD.(k) --- Basis/TwoElectronRRVectorized.ml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Basis/TwoElectronRRVectorized.ml b/Basis/TwoElectronRRVectorized.ml index 247b2b0..79a9f29 100644 --- a/Basis/TwoElectronRRVectorized.ml +++ b/Basis/TwoElectronRRVectorized.ml @@ -125,9 +125,9 @@ let hvrr_two_e_vector (angMom_a, angMom_b, angMom_c, angMom_d) if cxyz < 1 then empty else *) let f1 = + let f = (Coordinate.coord center_cd xyz) in Array.init ncoef (fun k -> - expo_d.(k) *. expo_inv_q.(k) *. - (Coordinate.coord center_cd.(k) xyz) ) + expo_d.(k) *. expo_inv_q.(k) *. f) in let f2 = Array.init ncoef (fun k -> @@ -265,7 +265,8 @@ let hvrr_two_e_vector (angMom_a, angMom_b, angMom_c, angMom_d) and h2 = hrr_v angMom_a angMom_b angMom_c dm totAngMom_a totAngMom_b totAngMom_c (totAngMom_d-1) in - Array.init ncoef (fun k -> h1.(k) +. h2.(k) *. (Coordinate.coord center_cd.(k) xyz)) + let f = (Coordinate.coord center_cd xyz) in + Array.init ncoef (fun k -> h1.(k) +. h2.(k) *. f) in hrr_v (angMom_a.(0),angMom_a.(1),angMom_a.(2)) @@ -368,25 +369,23 @@ let contracted_class_shell_pairs ~zero_m ?schwartz_p ?schwartz_q shell_p shell_q let d = shell_cd.ShellPair.j in (zero_m_array, shell_cd.ShellPair.expo_inv, - Contracted_shell.expo shell_d d, shell_cd.ShellPair.center_ab, + Contracted_shell.expo shell_d d, center_pq,coef_prod) ) shell_q |> Array.to_list - |> List.filter (fun (zero_m_array, expo_inv, d, center_cd, + |> List.filter (fun (zero_m_array, expo_inv, d, center_pq,coef_prod) -> abs_float coef_prod >= 1.e-4 *. cutoff) |> Array.of_list in - let zero_m_array = Array.map (fun (zero_m_array, expo_inv, d, center_cd, + let zero_m_array = Array.map (fun (zero_m_array, expo_inv, d, center_pq,coef_prod) -> zero_m_array) common - and expo_inv = Array.map (fun (zero_m_array, expo_inv, d, center_cd, + and expo_inv = Array.map (fun (zero_m_array, expo_inv, d, center_pq,coef_prod) -> expo_inv ) common - and d = Array.map (fun (zero_m_array, expo_inv, d, center_cd, + and d = Array.map (fun (zero_m_array, expo_inv, d, center_pq,coef_prod) -> d) common - and center_cd = Array.map (fun (zero_m_array, expo_inv, d, center_cd, - center_pq,coef_prod) -> center_cd) common - and center_pq = Array.map (fun (zero_m_array, expo_inv, d, center_cd, + and center_pq = Array.map (fun (zero_m_array, expo_inv, d, center_pq,coef_prod) -> center_pq) common - and coef_prod = Array.map (fun (zero_m_array, expo_inv, d, center_cd, + and coef_prod = Array.map (fun (zero_m_array, expo_inv, d, center_pq,coef_prod) -> coef_prod) common in (* Transpose zero_m_array @@ -429,7 +428,8 @@ let contracted_class_shell_pairs ~zero_m ?schwartz_p ?schwartz_q shell_p shell_q (maxm, zero_m_array) (Contracted_shell.expo shell_b b, d) (shell_ab.ShellPair.expo_inv, expo_inv) - (shell_ab.ShellPair.center_ab, center_cd, center_pq) + (shell_p.(0).ShellPair.center_ab, + shell_q.(0).ShellPair.center_ab, center_pq) coef_prod map_1d map_2d in let x = Array.fold_left (+.) 0. integral in