mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-12-22 20:33:36 +01:00
Removed arrays
This commit is contained in:
parent
cccf8d40b0
commit
f964e30098
@ -110,10 +110,7 @@ let hvrr_one_e
|
|||||||
h1 +. f2 *. h2
|
h1 +. f2 *. h2
|
||||||
|
|
||||||
in
|
in
|
||||||
hrr
|
hrr angMom_a angMom_b totAngMom_a totAngMom_b
|
||||||
(angMom_a.(0),angMom_a.(1),angMom_a.(2))
|
|
||||||
(angMom_b.(0),angMom_b.(1),angMom_b.(2))
|
|
||||||
totAngMom_a totAngMom_b
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -200,9 +197,9 @@ let contracted_class_shell_pair ~zero_m shell_p geometry : float Zmap.t =
|
|||||||
class_indices
|
class_indices
|
||||||
|> Array.iteri (fun i key ->
|
|> Array.iteri (fun i key ->
|
||||||
let (angMomA,angMomB) =
|
let (angMomA,angMomB) =
|
||||||
let a = Zkey.to_int_array Zkey.Kind_6 key in
|
match Zkey.to_int_tuple ~kind:Zkey.Kind_6 key with
|
||||||
( [| a.(0) ; a.(1) ; a.(2) |],
|
| Zkey.Six x -> x
|
||||||
[| a.(3) ; a.(4) ; a.(5) |])
|
| _ -> assert false
|
||||||
in
|
in
|
||||||
let norm = norm_coef_scale.(i) in
|
let norm = norm_coef_scale.(i) in
|
||||||
let coef_prod = coef_prod *. norm in
|
let coef_prod = coef_prod *. norm in
|
||||||
|
@ -9,7 +9,7 @@ exception NullQuartet
|
|||||||
|
|
||||||
(** Horizontal and Vertical Recurrence Relations (HVRR) *)
|
(** Horizontal and Vertical Recurrence Relations (HVRR) *)
|
||||||
let hvrr_two_e (angMom_a, angMom_b, angMom_c, angMom_d)
|
let hvrr_two_e (angMom_a, angMom_b, angMom_c, angMom_d)
|
||||||
(totAngMom_a, totAngMom_b, totAngMom_c, totAngMom_d)
|
(totAngMom_a_in, totAngMom_b_in, totAngMom_c_in, totAngMom_d_in)
|
||||||
(maxm, zero_m_array)
|
(maxm, zero_m_array)
|
||||||
(expo_b, expo_d)
|
(expo_b, expo_d)
|
||||||
(expo_inv_p, expo_inv_q)
|
(expo_inv_p, expo_inv_q)
|
||||||
@ -18,20 +18,20 @@ let hvrr_two_e (angMom_a, angMom_b, angMom_c, angMom_d)
|
|||||||
=
|
=
|
||||||
|
|
||||||
let maxsze = maxm+1 in
|
let maxsze = maxm+1 in
|
||||||
let totAngMom_a = Angular_momentum.to_int totAngMom_a
|
let totAngMom_a = Angular_momentum.to_int totAngMom_a_in
|
||||||
and totAngMom_b = Angular_momentum.to_int totAngMom_b
|
and totAngMom_b = Angular_momentum.to_int totAngMom_b_in
|
||||||
and totAngMom_c = Angular_momentum.to_int totAngMom_c
|
and totAngMom_c = Angular_momentum.to_int totAngMom_c_in
|
||||||
and totAngMom_d = Angular_momentum.to_int totAngMom_d
|
and totAngMom_d = Angular_momentum.to_int totAngMom_d_in
|
||||||
in
|
in
|
||||||
let maxm = totAngMom_a + totAngMom_b + totAngMom_c + totAngMom_d in
|
let maxm = totAngMom_a + totAngMom_b + totAngMom_c + totAngMom_d in
|
||||||
let empty = Array.make (maxm+1) 0.
|
let empty = Array.make (maxm+1) 0.
|
||||||
in
|
in
|
||||||
if debug then begin
|
if debug then begin
|
||||||
Printf.printf "\n---- %d %d %d %d ----\n" totAngMom_a totAngMom_b totAngMom_c totAngMom_d;
|
Printf.printf "\n---- %d %d %d %d ----\n" totAngMom_a totAngMom_b totAngMom_c totAngMom_d;
|
||||||
Printf.printf "%d %d %d\n" angMom_a.(0) angMom_a.(1) angMom_a.(2) ;
|
let (x,y,z) = angMom_a in Printf.printf "%d %d %d\n" x y z;
|
||||||
Printf.printf "%d %d %d\n" angMom_b.(0) angMom_b.(1) angMom_b.(2) ;
|
let (x,y,z) = angMom_b in Printf.printf "%d %d %d\n" x y z;
|
||||||
Printf.printf "%d %d %d\n" angMom_c.(0) angMom_c.(1) angMom_c.(2) ;
|
let (x,y,z) = angMom_c in Printf.printf "%d %d %d\n" x y z;
|
||||||
Printf.printf "%d %d %d\n" angMom_d.(0) angMom_d.(1) angMom_d.(2) ;
|
let (x,y,z) = angMom_d in Printf.printf "%d %d %d\n" x y z;
|
||||||
Printf.printf "%f %f %f %f\n%f %f %f\n%f %f %f\n%f %f %f\n" expo_b expo_d
|
Printf.printf "%f %f %f %f\n%f %f %f\n%f %f %f\n%f %f %f\n" expo_b expo_d
|
||||||
expo_inv_p expo_inv_q
|
expo_inv_p expo_inv_q
|
||||||
(Coordinate.coord center_ab 0) (Coordinate.coord center_ab 1) (Coordinate.coord center_ab 2)
|
(Coordinate.coord center_ab 0) (Coordinate.coord center_ab 1) (Coordinate.coord center_ab 2)
|
||||||
@ -100,7 +100,14 @@ let hvrr_two_e (angMom_a, angMom_b, angMom_c, angMom_d)
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
match (totAngMom_a, totAngMom_c) with
|
match (totAngMom_a, totAngMom_c) with
|
||||||
| (i,0) -> if (i>0) then vrr0 angMom_a totAngMom_a else zero_m_array
|
| (i,0) -> if (i>0) then
|
||||||
|
vrr0 angMom_a totAngMom_a
|
||||||
|
(*
|
||||||
|
OneElectronRR.hvrr_one_e (angMom_a, angMom_b) (totAngMom_a_in, totAngMom_b_in)
|
||||||
|
(maxm, zero_m_array) (expo_b) (expo_inv_p) (center_ab, center_pq, center_ab)
|
||||||
|
map_1d
|
||||||
|
*)
|
||||||
|
else zero_m_array
|
||||||
| (_,_) ->
|
| (_,_) ->
|
||||||
let key = Zkey.of_int_tuple (Zkey.Six (angMom_a, angMom_c) ) in
|
let key = Zkey.of_int_tuple (Zkey.Six (angMom_a, angMom_c) ) in
|
||||||
|
|
||||||
@ -284,11 +291,7 @@ let hvrr_two_e (angMom_a, angMom_b, angMom_c, angMom_d)
|
|||||||
h1 +. f2 *. h2
|
h1 +. f2 *. h2
|
||||||
|
|
||||||
in
|
in
|
||||||
hrr
|
hrr angMom_a angMom_b angMom_c angMom_d
|
||||||
(angMom_a.(0),angMom_a.(1),angMom_a.(2))
|
|
||||||
(angMom_b.(0),angMom_b.(1),angMom_b.(2))
|
|
||||||
(angMom_c.(0),angMom_c.(1),angMom_c.(2))
|
|
||||||
(angMom_d.(0),angMom_d.(1),angMom_d.(2))
|
|
||||||
totAngMom_a totAngMom_b totAngMom_c totAngMom_d
|
totAngMom_a totAngMom_b totAngMom_c totAngMom_d
|
||||||
|
|
||||||
|
|
||||||
@ -376,12 +379,10 @@ let contracted_class_shell_pairs ~zero_m ?schwartz_p ?schwartz_q shell_p shell_q
|
|||||||
(* Compute the integral class from the primitive shell quartet *)
|
(* Compute the integral class from the primitive shell quartet *)
|
||||||
class_indices
|
class_indices
|
||||||
|> Array.iteri (fun i key ->
|
|> Array.iteri (fun i key ->
|
||||||
let a = Zkey.to_int_array Zkey.Kind_12 key in
|
|
||||||
let (angMomA,angMomB,angMomC,angMomD) =
|
let (angMomA,angMomB,angMomC,angMomD) =
|
||||||
( [| a.(0) ; a.(1) ; a.(2) |],
|
match Zkey.to_int_tuple ~kind:Zkey.Kind_12 key with
|
||||||
[| a.(3) ; a.(4) ; a.(5) |],
|
| Zkey.Twelve x -> x
|
||||||
[| a.(6) ; a.(7) ; a.(8) |],
|
| _ -> assert false
|
||||||
[| a.(9) ; a.(10) ; a.(11) |] )
|
|
||||||
in
|
in
|
||||||
try
|
try
|
||||||
(*
|
(*
|
||||||
|
Loading…
Reference in New Issue
Block a user