10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-12-22 20:33:36 +01:00
QCaml/gaussian/lib/primitive_shell_pair_couple.ml

77 lines
1.8 KiB
OCaml
Raw Permalink Normal View History

2024-01-17 10:30:24 +01:00
[@@@landmark "auto-off"]
2020-10-09 09:47:57 +02:00
open Common
2024-01-17 10:30:24 +01:00
type t =
2018-03-21 15:01:39 +01:00
{
2019-02-26 12:47:23 +01:00
zkey_array : Zkey.t array lazy_t;
2020-09-26 12:02:53 +02:00
shell_pair_p: Primitive_shell_pair.t ;
shell_pair_q: Primitive_shell_pair.t ;
shell_a : Primitive_shell.t ;
shell_b : Primitive_shell.t ;
shell_c : Primitive_shell.t ;
shell_d : Primitive_shell.t ;
ang_mom : Angular_momentum.t ;
2018-03-21 15:01:39 +01:00
}
2020-09-26 12:02:53 +02:00
module Am = Angular_momentum
2018-03-21 15:01:39 +01:00
module Co = Coordinate
2020-09-26 12:02:53 +02:00
module Ps = Primitive_shell
module Psp = Primitive_shell_pair
2018-03-21 15:01:39 +01:00
2024-01-17 10:30:24 +01:00
let[@landmark] make shell_pair_p shell_pair_q =
2018-03-21 15:01:39 +01:00
let ang_mom =
Am.(Psp.ang_mom shell_pair_p + Psp.ang_mom shell_pair_q)
in
let shell_a = Psp.shell_a shell_pair_p
and shell_b = Psp.shell_b shell_pair_p
and shell_c = Psp.shell_a shell_pair_q
and shell_d = Psp.shell_b shell_pair_q
in
let zkey_array = lazy (
2024-01-17 10:30:24 +01:00
let open Ps in
2018-03-21 15:01:39 +01:00
Am.zkey_array (Am.Quartet
2024-01-17 10:30:24 +01:00
(ang_mom shell_a, ang_mom shell_b,
ang_mom shell_c, ang_mom shell_d)
2018-03-21 15:01:39 +01:00
)
)
in
{ shell_pair_p ; shell_pair_q ; ang_mom ;
shell_a ; shell_b ; shell_c ; shell_d ;
zkey_array ;
}
let monocentric t =
Psp.monocentric t.shell_pair_p && Psp.monocentric t.shell_pair_q &&
Psp.center t.shell_pair_p = Psp.center t.shell_pair_q
let ang_mom t = t.ang_mom
let shell_pair_p t = t.shell_pair_p
let shell_pair_q t = t.shell_pair_q
let shell_a t = t.shell_a
let shell_b t = t.shell_b
let shell_c t = t.shell_c
let shell_d t = t.shell_d
2024-01-17 10:30:24 +01:00
let p_minus_q t =
2018-03-21 15:01:39 +01:00
let p = Psp.center t.shell_pair_p
and q = Psp.center t.shell_pair_q
in Co.(p |- q)
let zkey_array t = Lazy.force t.zkey_array
2024-01-17 10:30:24 +01:00
let[@landmark] norm_scales t =
2018-03-21 15:01:39 +01:00
let norm_coef_scale_p_list = Array.to_list (Psp.norm_scales t.shell_pair_p) in
let norm_coef_scale_q = Psp.norm_scales t.shell_pair_q in
List.map (fun v1 -> Array.map (fun v2 -> v1 *. v2) norm_coef_scale_q)
norm_coef_scale_p_list
|> Array.concat
2018-03-26 16:47:08 +02:00