diff --git a/CI/CIMatrixElement.ml b/CI/CIMatrixElement.ml index 0822a66..40d5243 100644 --- a/CI/CIMatrixElement.ml +++ b/CI/CIMatrixElement.ml @@ -158,6 +158,48 @@ let non_zero integrals degree_a degree_b ki kj = | 0, 0 -> (* diagonal element *) fun one_e two_e _ -> diag_element one_e two_e + | 3, 0 -> (* alpha triple *) + begin + let h1, p1, h2, p2, h3, p3, phase = Ex.triple_of_spindet kia kja in + match phase with + | Phase.Pos -> fun _ _ three_e -> three_e h1 h2 h3 p1 p2 p3 Spin.Alfa Spin.Alfa Spin.Alfa + | Phase.Neg -> fun _ _ three_e -> -. three_e h1 h2 h3 p1 p2 p3 Spin.Alfa Spin.Alfa Spin.Alfa + end + + | 0, 3 -> (* beta triple *) + begin + let h1, p1, h2, p2, h3, p3, phase = Ex.triple_of_spindet kib kja in + match phase with + | Phase.Pos -> fun _ _ three_e -> three_e h1 h2 h3 p1 p2 p3 Spin.Beta Spin.Beta Spin.Beta + | Phase.Neg -> fun _ _ three_e -> -. three_e h1 h2 h3 p1 p2 p3 Spin.Beta Spin.Beta Spin.Beta + end + + | 2, 1 -> (* alpha2 beta triple *) + begin + let h1, p1, h2, p2, phase = Ex.double_of_spindet kia kja in + let h3, p3, phase' = Ex.single_of_spindet kib kjb in + match phase, phase' with + | Phase.Pos, Phase.Pos + | Phase.Neg, Phase.Neg -> + fun _ _ three_e -> three_e h1 h2 h3 p1 p2 p3 Spin.Alfa Spin.Alfa Spin.Beta + | Phase.Neg, Phase.Pos + | Phase.Pos, Phase.Neg -> + fun _ _ three_e -> -. three_e h1 h2 h3 p1 p2 p3 Spin.Alfa Spin.Alfa Spin.Beta + end + + | 1, 2 -> (* alpha beta2 triple *) + begin + let h1, p1, phase = Ex.single_of_spindet kia kja in + let h2, p2, h3, p3, phase' = Ex.double_of_spindet kib kjb in + match phase, phase' with + | Phase.Pos, Phase.Pos + | Phase.Neg, Phase.Neg -> + fun _ _ three_e -> three_e h1 h2 h3 p1 p2 p3 Spin.Alfa Spin.Beta Spin.Beta + | Phase.Neg, Phase.Pos + | Phase.Pos, Phase.Neg -> + fun _ _ three_e -> -. three_e h1 h2 h3 p1 p2 p3 Spin.Alfa Spin.Beta Spin.Beta + end + | _ -> fun _ _ _ -> 0. ) in diff --git a/CI/F12CI.ml b/CI/F12CI.ml index 701ee6d..2a19acf 100644 --- a/CI/F12CI.ml +++ b/CI/F12CI.ml @@ -134,7 +134,6 @@ let hf_ij_non_zero hf12_integrals deg_a deg_b ki kj = +. List.fold_left (fun accu a -> accu +. two_e_h k i n a s'' s *. two_e_f a j l m s s' ) 0. (mo_of_s s ) -. List.fold_left (fun accu a -> accu +. two_e_h i k l a s s'' *. two_e_f a j n m s'' s' ) 0. (mo_of_s s'') in - (one_e, two_e, Some three_e) ] in