mirror of
https://gitlab.com/scemama/QCaml.git
synced 2025-01-05 02:48:37 +01:00
Accelerated scalar RR
This commit is contained in:
parent
bc5587c8f0
commit
8c35202b29
@ -76,13 +76,23 @@ let rec hvrr_two_e (angMom_a, angMom_b, angMom_c, angMom_d)
|
|||||||
let f1 = expo_inv_p *. (Coordinate.coord center_pq xyz)
|
let f1 = expo_inv_p *. (Coordinate.coord center_pq xyz)
|
||||||
and f2 = expo_b *. expo_inv_p *. (Coordinate.coord center_ab xyz)
|
and f2 = expo_b *. expo_inv_p *. (Coordinate.coord center_ab xyz)
|
||||||
in
|
in
|
||||||
|
let result = Array.create_float maxsze in
|
||||||
if amxyz < 1 then
|
if amxyz < 1 then
|
||||||
|
begin
|
||||||
let v1 =
|
let v1 =
|
||||||
vrr0 am (totAngMom_a-1)
|
vrr0 am (totAngMom_a-1)
|
||||||
in
|
in
|
||||||
|
for m=0 to maxm-1 do
|
||||||
|
result.(m) <- f1 *. v1.(m+1) -. f2 *. v1.(m)
|
||||||
|
done;
|
||||||
|
result.(maxm) <- -. f2 *. v1.(maxm)
|
||||||
|
(*
|
||||||
Array.init maxsze (fun m ->
|
Array.init maxsze (fun m ->
|
||||||
if m = maxm then 0. else (f1 *. v1.(m+1) ) -. f2 *. v1.(m) )
|
if m = maxm then 0. else (f1 *. v1.(m+1) ) -. f2 *. v1.(m) )
|
||||||
|
*)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
|
begin
|
||||||
let v3 =
|
let v3 =
|
||||||
vrr0 amm (totAngMom_a-2)
|
vrr0 amm (totAngMom_a-2)
|
||||||
in
|
in
|
||||||
@ -90,12 +100,21 @@ let rec hvrr_two_e (angMom_a, angMom_b, angMom_c, angMom_d)
|
|||||||
vrr0 am (totAngMom_a-1)
|
vrr0 am (totAngMom_a-1)
|
||||||
in
|
in
|
||||||
let f3 = (float_of_int amxyz) *. expo_inv_p *. 0.5 in
|
let f3 = (float_of_int amxyz) *. expo_inv_p *. 0.5 in
|
||||||
|
for m=0 to maxm-1 do
|
||||||
|
result.(m) <- f1 *. v1.(m+1) -. f2 *. v1.(m)
|
||||||
|
+. f3 *. (v3.(m) +. expo_inv_p *. v3.(m+1))
|
||||||
|
done;
|
||||||
|
result.(maxm) <- f3 *. v3.(maxm)
|
||||||
|
end;
|
||||||
|
result
|
||||||
|
(*
|
||||||
Array.init maxsze (fun m ->
|
Array.init maxsze (fun m ->
|
||||||
(if m = maxm then 0. else
|
(if m = maxm then 0. else
|
||||||
(f1 *. v1.(m+1) ) -. f2 *. v1.(m) )
|
(f1 *. v1.(m+1) ) -. f2 *. v1.(m) )
|
||||||
+. f3 *. (v3.(m) +. if m = maxm then 0. else
|
+. f3 *. (v3.(m) +. if m = maxm then 0. else
|
||||||
expo_inv_p *. v3.(m+1))
|
expo_inv_p *. v3.(m+1))
|
||||||
)
|
)
|
||||||
|
*)
|
||||||
in Zmap.add map_1d key result;
|
in Zmap.add map_1d key result;
|
||||||
result
|
result
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user