mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-12-22 04:13:33 +01:00
Removed arrays
This commit is contained in:
parent
cccf8d40b0
commit
f964e30098
@ -110,10 +110,7 @@ let hvrr_one_e
|
||||
h1 +. f2 *. h2
|
||||
|
||||
in
|
||||
hrr
|
||||
(angMom_a.(0),angMom_a.(1),angMom_a.(2))
|
||||
(angMom_b.(0),angMom_b.(1),angMom_b.(2))
|
||||
totAngMom_a totAngMom_b
|
||||
hrr angMom_a angMom_b totAngMom_a totAngMom_b
|
||||
|
||||
|
||||
|
||||
@ -200,9 +197,9 @@ let contracted_class_shell_pair ~zero_m shell_p geometry : float Zmap.t =
|
||||
class_indices
|
||||
|> Array.iteri (fun i key ->
|
||||
let (angMomA,angMomB) =
|
||||
let a = Zkey.to_int_array Zkey.Kind_6 key in
|
||||
( [| a.(0) ; a.(1) ; a.(2) |],
|
||||
[| a.(3) ; a.(4) ; a.(5) |])
|
||||
match Zkey.to_int_tuple ~kind:Zkey.Kind_6 key with
|
||||
| Zkey.Six x -> x
|
||||
| _ -> assert false
|
||||
in
|
||||
let norm = norm_coef_scale.(i) in
|
||||
let coef_prod = coef_prod *. norm in
|
||||
|
@ -9,7 +9,7 @@ exception NullQuartet
|
||||
|
||||
(** Horizontal and Vertical Recurrence Relations (HVRR) *)
|
||||
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)
|
||||
(expo_b, expo_d)
|
||||
(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 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
|
||||
and totAngMom_d = Angular_momentum.to_int totAngMom_d
|
||||
let totAngMom_a = Angular_momentum.to_int totAngMom_a_in
|
||||
and totAngMom_b = Angular_momentum.to_int totAngMom_b_in
|
||||
and totAngMom_c = Angular_momentum.to_int totAngMom_c_in
|
||||
and totAngMom_d = Angular_momentum.to_int totAngMom_d_in
|
||||
in
|
||||
let maxm = totAngMom_a + totAngMom_b + totAngMom_c + totAngMom_d in
|
||||
let empty = Array.make (maxm+1) 0.
|
||||
in
|
||||
if debug then begin
|
||||
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) ;
|
||||
Printf.printf "%d %d %d\n" angMom_b.(0) angMom_b.(1) angMom_b.(2) ;
|
||||
Printf.printf "%d %d %d\n" angMom_c.(0) angMom_c.(1) angMom_c.(2) ;
|
||||
Printf.printf "%d %d %d\n" angMom_d.(0) angMom_d.(1) angMom_d.(2) ;
|
||||
let (x,y,z) = angMom_a in Printf.printf "%d %d %d\n" x y z;
|
||||
let (x,y,z) = angMom_b in Printf.printf "%d %d %d\n" x y z;
|
||||
let (x,y,z) = angMom_c in Printf.printf "%d %d %d\n" x y z;
|
||||
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
|
||||
expo_inv_p expo_inv_q
|
||||
(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;
|
||||
|
||||
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
|
||||
|
||||
@ -284,11 +291,7 @@ let hvrr_two_e (angMom_a, angMom_b, angMom_c, angMom_d)
|
||||
h1 +. f2 *. h2
|
||||
|
||||
in
|
||||
hrr
|
||||
(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))
|
||||
hrr angMom_a angMom_b angMom_c angMom_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 *)
|
||||
class_indices
|
||||
|> Array.iteri (fun i key ->
|
||||
let a = Zkey.to_int_array Zkey.Kind_12 key in
|
||||
let (angMomA,angMomB,angMomC,angMomD) =
|
||||
( [| a.(0) ; a.(1) ; a.(2) |],
|
||||
[| a.(3) ; a.(4) ; a.(5) |],
|
||||
[| a.(6) ; a.(7) ; a.(8) |],
|
||||
[| a.(9) ; a.(10) ; a.(11) |] )
|
||||
match Zkey.to_int_tuple ~kind:Zkey.Kind_12 key with
|
||||
| Zkey.Twelve x -> x
|
||||
| _ -> assert false
|
||||
in
|
||||
try
|
||||
(*
|
||||
|
Loading…
Reference in New Issue
Block a user