mirror of
https://gitlab.com/scemama/QCaml.git
synced 2025-01-03 01:55:40 +01:00
Merge branch 'tuples'
This commit is contained in:
commit
e3aecbff7d
@ -397,3 +397,8 @@ let xto_file ~filename basis =
|
||||
*)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -2,7 +2,6 @@ open Util
|
||||
open Constants
|
||||
|
||||
let cutoff2 = cutoff *. cutoff
|
||||
let debug = false
|
||||
|
||||
exception NullQuartet
|
||||
|
||||
@ -37,6 +36,7 @@ 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
|
||||
@ -44,6 +44,7 @@ let hvrr_two_e (angMom_a, angMom_b, angMom_c, angMom_d)
|
||||
let (x,y,z) = angMom_a in
|
||||
Printf.printf "vrr0: %d : %d %d %d\n" totAngMom_a x y z
|
||||
end;
|
||||
|
||||
match totAngMom_a with
|
||||
| 0 -> zero_m_array
|
||||
| _ ->
|
||||
@ -97,34 +98,32 @@ let hvrr_two_e (angMom_a, angMom_b, angMom_c, angMom_d)
|
||||
match (totAngMom_a, totAngMom_c) with
|
||||
| (i,0) -> if (i>0) then vrr0 angMom_a totAngMom_a else zero_m_array
|
||||
| (_,_) ->
|
||||
let maxsze = maxm+1 in
|
||||
let key = Zkey.of_int_tuple (Zkey.Six (angMom_a, angMom_c) ) in
|
||||
|
||||
try Zmap.find map_2d key with
|
||||
| Not_found ->
|
||||
let result =
|
||||
let am, cm, cmm, axyz, cxyz, xyz =
|
||||
let am, cm, cmm, axyz, cmxyz, xyz =
|
||||
let angMom_ax, angMom_ay, angMom_az = angMom_a
|
||||
and angMom_cx, angMom_cy, angMom_cz = angMom_c in
|
||||
if (angMom_cz > 0) then
|
||||
(angMom_ax, angMom_ay, angMom_az-1),
|
||||
(angMom_cx, angMom_cy, angMom_cz-1),
|
||||
(angMom_cx, angMom_cy, angMom_cz-2),
|
||||
angMom_az,angMom_cz, 2
|
||||
else if (angMom_cy > 0) then
|
||||
(angMom_ax, angMom_ay-1, angMom_az),
|
||||
(angMom_cx, angMom_cy-1, angMom_cz),
|
||||
(angMom_cx, angMom_cy-2, angMom_cz),
|
||||
angMom_ay,angMom_cy, 1
|
||||
else
|
||||
(angMom_ax-1, angMom_ay, angMom_az),
|
||||
(angMom_cx-1, angMom_cy, angMom_cz),
|
||||
(angMom_cx-2, angMom_cy, angMom_cz),
|
||||
angMom_ax,angMom_cx, 0
|
||||
match angMom_c with
|
||||
| (_,0,0) -> (* 321_984 *)
|
||||
(angMom_ax-1, angMom_ay, angMom_az),
|
||||
(angMom_cx-1, angMom_cy, angMom_cz),
|
||||
(angMom_cx-2, angMom_cy, angMom_cz),
|
||||
angMom_ax,angMom_cx-1, 0
|
||||
| (_,_,0) -> (* 612_002 *)
|
||||
(angMom_ax, angMom_ay-1, angMom_az),
|
||||
(angMom_cx, angMom_cy-1, angMom_cz),
|
||||
(angMom_cx, angMom_cy-2, angMom_cz),
|
||||
angMom_ay,angMom_cy-1, 1
|
||||
| _ -> (* 1_067_324 *)
|
||||
(angMom_ax, angMom_ay, angMom_az-1),
|
||||
(angMom_cx, angMom_cy, angMom_cz-1),
|
||||
(angMom_cx, angMom_cy, angMom_cz-2),
|
||||
angMom_az,angMom_cz-1, 2
|
||||
in
|
||||
(*
|
||||
if cxyz < 1 then empty else
|
||||
*)
|
||||
if cmxyz < 0 then empty else
|
||||
let f1 =
|
||||
-. expo_d *. expo_inv_q *. (Coordinate.coord center_cd xyz)
|
||||
in
|
||||
@ -140,9 +139,9 @@ let hvrr_two_e (angMom_a, angMom_b, angMom_c, angMom_d)
|
||||
f1 *. v1.(m) -. (if m = maxm then 0. else f2 *. v1.(m+1)) )
|
||||
in
|
||||
let result =
|
||||
if cxyz < 2 then result else
|
||||
if cmxyz < 1 then result else
|
||||
let f3 =
|
||||
(float_of_int (cxyz-1)) *. expo_inv_q *. 0.5
|
||||
(float_of_int cmxyz) *. expo_inv_q *. 0.5
|
||||
in
|
||||
if (abs_float f3 < cutoff) && (abs_float (f3 *. expo_inv_q) < cutoff) then result else
|
||||
(
|
||||
@ -154,7 +153,7 @@ let hvrr_two_e (angMom_a, angMom_b, angMom_c, angMom_d)
|
||||
)
|
||||
in
|
||||
let result =
|
||||
if axyz < 1 || cxyz < 1 then result else
|
||||
if (axyz < 1) || (cmxyz < 0) then result else
|
||||
let f5 =
|
||||
(float_of_int axyz) *. expo_inv_p *. expo_inv_q *. 0.5
|
||||
in
|
||||
@ -214,10 +213,10 @@ let hvrr_two_e (angMom_a, angMom_b, angMom_c, angMom_d)
|
||||
let angMom_ax, angMom_ay, angMom_az = angMom_a
|
||||
and angMom_bx, angMom_by, angMom_bz = angMom_b in
|
||||
let bxyz, xyz =
|
||||
match angMom_b with
|
||||
| (_,_,1) -> angMom_bz, 2
|
||||
| (_,1,_) -> angMom_by, 1
|
||||
| _ -> angMom_bx, 0
|
||||
match angMom_b with
|
||||
| (_,0,0) -> angMom_bx, 0
|
||||
| (_,_,0) -> angMom_by, 1
|
||||
| (_,_,_) -> angMom_bz, 2
|
||||
in
|
||||
if (bxyz < 1) then 0. else
|
||||
let ap, bm =
|
||||
|
Loading…
Reference in New Issue
Block a user