mirror of
https://gitlab.com/scemama/QCaml.git
synced 2025-01-03 01:55:40 +01:00
Works
This commit is contained in:
parent
2d759e736e
commit
d4242e406e
@ -244,7 +244,7 @@ let contracted_class_shell_pairs ~zero_m ?schwartz_p ?schwartz_q shell_p shell_q
|
||||
in
|
||||
(** Screening on the product of coefficients *)
|
||||
try
|
||||
if (abs_float coef_prod) < 1.e-4*.cutoff then
|
||||
if (abs_float coef_prod) < 1.e-3*.cutoff then
|
||||
raise NullQuartet;
|
||||
|
||||
let expo_pq_inv =
|
||||
@ -273,17 +273,13 @@ let contracted_class_shell_pairs ~zero_m ?schwartz_p ?schwartz_q shell_p shell_q
|
||||
) 0. shell_p
|
||||
|
||||
| _ ->
|
||||
Array.iter (fun shell_ab ->
|
||||
Array.iter (fun shell_ab ->
|
||||
let b = shell_ab.Shell_pair.j in
|
||||
let common =
|
||||
Array.map (fun shell_cd ->
|
||||
Array.mapi (fun idx shell_cd ->
|
||||
let coef_prod =
|
||||
shell_ab.Shell_pair.coef *. shell_cd.Shell_pair.coef
|
||||
in
|
||||
let coef_prod =
|
||||
if (abs_float coef_prod) < 1.e-4*.cutoff then
|
||||
0. else coef_prod
|
||||
in
|
||||
let expo_pq_inv =
|
||||
shell_ab.Shell_pair.expo_inv +. shell_cd.Shell_pair.expo_inv
|
||||
in
|
||||
@ -302,21 +298,27 @@ Array.iter (fun shell_ab ->
|
||||
|
||||
(zero_m_array, shell_cd.Shell_pair.expo_inv,
|
||||
Contracted_shell.expo shell_d d, shell_cd.Shell_pair.center_ab,
|
||||
center_pq,coef_prod)
|
||||
center_pq,coef_prod,idx)
|
||||
) shell_q
|
||||
|> Array.to_list
|
||||
|> List.filter (fun (zero_m_array, expo_inv, d, center_cd,
|
||||
center_pq,coef_prod,idx) -> abs_float coef_prod >= 1.e-4 *. cutoff)
|
||||
|> Array.of_list
|
||||
in
|
||||
let zero_m_array = Array.map (fun (zero_m_array, expo_inv, d, center_cd,
|
||||
center_pq,coef_prod) -> zero_m_array) common
|
||||
center_pq,coef_prod,idx) -> zero_m_array) common
|
||||
and expo_inv = Array.map (fun (zero_m_array, expo_inv, d, center_cd,
|
||||
center_pq,coef_prod) -> expo_inv ) common
|
||||
center_pq,coef_prod,idx) -> expo_inv ) common
|
||||
and d = Array.map (fun (zero_m_array, expo_inv, d, center_cd,
|
||||
center_pq,coef_prod) -> d) common
|
||||
center_pq,coef_prod,idx) -> d) common
|
||||
and center_cd = Array.map (fun (zero_m_array, expo_inv, d, center_cd,
|
||||
center_pq,coef_prod) -> center_cd) common
|
||||
center_pq,coef_prod,idx) -> center_cd) common
|
||||
and center_pq = Array.map (fun (zero_m_array, expo_inv, d, center_cd,
|
||||
center_pq,coef_prod) -> center_pq) common
|
||||
center_pq,coef_prod,idx) -> center_pq) common
|
||||
and coef_prod = Array.map (fun (zero_m_array, expo_inv, d, center_cd,
|
||||
center_pq,coef_prod) -> coef_prod) common
|
||||
center_pq,coef_prod,idx) -> coef_prod) common
|
||||
and idx = Array.map (fun (zero_m_array, expo_inv, d, center_cd,
|
||||
center_pq,coef_prod,idx) -> idx) common
|
||||
in
|
||||
let map = Array.init maxm (fun _ -> Zmap.create (Array.length class_indices)) in
|
||||
(* Compute the integral class from the primitive shell quartet *)
|
||||
@ -333,6 +335,7 @@ Array.iter (fun shell_ab ->
|
||||
shell_ab.Shell_pair.norm_fun angMomA angMomB *. shell_cd.Shell_pair.norm_fun angMomC angMomD
|
||||
) shell_q
|
||||
in
|
||||
try
|
||||
let integral =
|
||||
hvrr_two_e 0 (angMomA, angMomB, angMomC, angMomD)
|
||||
(Contracted_shell.totAngMom shell_a, Contracted_shell.totAngMom shell_b,
|
||||
@ -342,10 +345,11 @@ Array.iter (fun shell_ab ->
|
||||
(shell_ab.Shell_pair.expo_inv, expo_inv)
|
||||
(shell_ab.Shell_pair.center_ab, center_cd, center_pq)
|
||||
coef_prod map
|
||||
|> Array.map2 (fun x y -> x *. y ) norm
|
||||
|> Array.mapi (fun i x -> x *. norm.(idx.(i)) )
|
||||
in
|
||||
let x = Array.fold_left (+.) 0. integral in
|
||||
contracted_class.(i) <- contracted_class.(i) +. x
|
||||
with NullQuartet -> ()
|
||||
) class_indices
|
||||
) shell_p
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user