From 687c0232845bc4427928d189918310b16984c83e Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Sat, 3 Feb 2018 18:53:44 +0100 Subject: [PATCH] Fixed. Correct with QP --- Basis/TwoElectronRR.ml | 8 +++++--- Basis/TwoElectronRRVectorized.ml | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Basis/TwoElectronRR.ml b/Basis/TwoElectronRR.ml index 8988312..0b09d07 100644 --- a/Basis/TwoElectronRR.ml +++ b/Basis/TwoElectronRR.ml @@ -1,6 +1,8 @@ open Util open Constants +let debug=false + let cutoff2 = cutoff *. cutoff exception NullQuartet @@ -15,6 +17,7 @@ let hvrr_two_e (angMom_a, angMom_b, angMom_c, angMom_d) map_1d map_2d = + let maxsze = maxm+1 in let totAngMom_a = Angular_momentum.to_int totAngMom_a and totAngMom_b = Angular_momentum.to_int totAngMom_b and totAngMom_c = Angular_momentum.to_int totAngMom_c @@ -36,7 +39,6 @@ let hvrr_two_e (angMom_a, angMom_b, angMom_c, angMom_d) (Coordinate.coord center_pq 0) (Coordinate.coord center_pq 1) (Coordinate.coord center_pq 2) end; -<<<<<<< HEAD (** Vertical recurrence relations *) let rec vrr0 angMom_a totAngMom_a = if debug then @@ -194,9 +196,9 @@ let hvrr_two_e (angMom_a, angMom_b, angMom_c, angMom_d) let angMom_ax, angMom_ay, angMom_az = angMom_a in let ap, xyz = match angMom_b with - | (_,_,1) -> (angMom_ax,angMom_ay,angMom_az+1), 2 + | (1,_,_) -> (angMom_ax+1,angMom_ay,angMom_az), 0 | (_,1,_) -> (angMom_ax,angMom_ay+1,angMom_az), 1 - | _ -> (angMom_ax+1,angMom_ay,angMom_az), 0 + | _ -> (angMom_ax,angMom_ay,angMom_az+1), 2 in let v1 = vrr ap angMom_c (totAngMom_a+1) totAngMom_c diff --git a/Basis/TwoElectronRRVectorized.ml b/Basis/TwoElectronRRVectorized.ml index 5efdf0b..e0260ab 100644 --- a/Basis/TwoElectronRRVectorized.ml +++ b/Basis/TwoElectronRRVectorized.ml @@ -222,9 +222,9 @@ let hvrr_two_e_vector (angMom_a, angMom_b, angMom_c, angMom_d) and (abx, aby, abz) = angMom_b in let bxyz, xyz = match angMom_b with - | (_,_,1) -> abz, 2 - | (_,1,_) -> aby, 1 - | (_,_,_) -> abx, 0 + | (0,0,_) -> abz, 2 + | (0,_,_) -> aby, 1 + | _ -> abx, 0 in if (bxyz < 1) then empty else let ap, bm =