10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-11-09 07:33:40 +01:00
QCaml/gaussian_basis/lib/contracted_shell_pair.mli

91 lines
2.9 KiB
OCaml
Raw Normal View History

2018-03-14 14:39:22 +01:00
(** A datastructure to represent pairs of contracted shells.
2020-09-26 12:02:53 +02:00
A contracted shell pair is a product of two {!Contracted_shell.t}:
2018-03-14 14:39:22 +01:00
2018-03-14 14:51:50 +01:00
{% \begin{align*}
2018-03-14 14:39:22 +01:00
\varphi_{ab}(r) & = \chi_a(r) \times \chi_b(r) \\
2018-03-14 14:51:50 +01:00
& = P_a \sum_{i=1}^{m_a} \mathcal{N}_i^a f_i[P_a] d_i^a \exp \left( -\alpha_i^a |r-R_a|^2 \right) \times
P_b \sum_{j=1}^{m_b} \mathcal{N}_j^b f_j[P_b] d_j^b \exp \left( -\alpha_j^b |r-R_b|^2 \right) \\
& = P_a P_b \sum_{i=1}^{m_a} \sum_{j=1}^{m_b} \left( \mathcal{N}_i^a \mathcal{N}_j^b \right) \left( f_i[P_a] f_j[P_b] \right) \left( d_i^a d_j^b \right) \exp \left( -\alpha_i^a |r-R_a|^2 -\alpha_j^b |r-R_b|^2 \right) \\
\end{align*} %}
2018-03-14 14:39:22 +01:00
*)
type t
2020-09-26 12:02:53 +02:00
open Qcaml_common
2018-03-14 14:39:22 +01:00
2020-09-26 12:02:53 +02:00
val make : ?cutoff:float -> Contracted_shell.t -> Contracted_shell.t -> t option
2018-03-14 14:39:22 +01:00
(** Creates an contracted shell pair {% $\varphi_{ab}$ %} from a contracted
shell {% $\chi_a$ %} (first argument) and a contracted shell {% $\chi_b$ %}
(second argument).
2018-03-15 19:35:10 +01:00
The contracted shell pair contains the only pairs of primitives for which
the norm is greater than [cutoff].
2018-03-22 00:29:14 +01:00
The function returns [None] if all the primitive shell pairs are not
significant, or if the index of the 1st primitive is smaller than the index
of the second primitive.
2018-03-14 14:39:22 +01:00
2018-03-22 00:29:14 +01:00
*)
2018-03-21 15:01:39 +01:00
2018-03-20 15:16:24 +01:00
2020-09-26 12:02:53 +02:00
val of_contracted_shell_array : ?cutoff:float -> Contracted_shell.t array -> t list
2018-03-22 00:29:14 +01:00
(** Creates all possible contracted shell pairs from an array of contracted shells.
Only significant shell pairs are kept.
2018-03-15 19:35:10 +01:00
*)
2018-03-14 14:39:22 +01:00
2020-09-26 12:02:53 +02:00
val shell_a : t -> Contracted_shell.t
(** Returns the first {!Contracted_shell.t} {% $\chi_a$ %} which was used to
2018-03-14 14:39:22 +01:00
build the contracted shell pair.
*)
2020-09-26 12:02:53 +02:00
val shell_b : t -> Contracted_shell.t
(** Returns the second {!Contracted_shell.t} {% $\chi_b$ %} which was used to
2018-03-14 14:39:22 +01:00
build the contracted shell pair.
*)
2020-09-26 12:02:53 +02:00
val coefs_and_shell_pairs : t -> (float * Primitive_shell_pair.t) list
(** Returns an arra of coefficients and of {!Primitive_shell_pair.t}, containing all
2018-03-20 19:02:58 +01:00
the pairs of primitive functions used to build the contracted shell pair.
*)
2020-09-26 12:02:53 +02:00
val shell_pairs : t -> Primitive_shell_pair.t array
(** Returns an array of {!Primitive_shell_pair.t}, containing all the pairs of
2018-03-15 16:03:43 +01:00
primitive functions used to build the contracted shell pair.
2018-03-14 14:39:22 +01:00
*)
2018-03-20 15:16:24 +01:00
val coefficients : t -> float array
2018-03-14 14:39:22 +01:00
2018-03-20 15:16:24 +01:00
val exponents_inv : t -> float array
2018-03-14 14:39:22 +01:00
2018-03-20 19:02:58 +01:00
2018-03-21 15:01:39 +01:00
val a_minus_b : t -> Coordinate.t
2018-03-14 14:39:22 +01:00
(* A-B *)
2018-03-21 15:01:39 +01:00
val a_minus_b_sq : t -> float
2018-03-14 14:39:22 +01:00
(* |A-B|^2 *)
2018-03-20 15:16:24 +01:00
val norm_scales : t -> float array
(* normalizations.(i) / normalizations.(0) *)
2018-03-14 14:39:22 +01:00
2020-09-26 12:02:53 +02:00
val ang_mom : t -> Angular_momentum.t
2018-03-14 14:39:22 +01:00
(* Total angular Momentum *)
val monocentric : t -> bool
(** If true, the two contracted shells have the same center. *)
2018-03-21 15:01:39 +01:00
val zkey_array : t -> Zkey.t array
(** Returns the array of Zkeys associated with the contracted shell pair. *)
2020-09-26 12:02:53 +02:00
val compare : t -> t -> int
(** Comparison function for sorting *)
2018-03-21 15:01:39 +01:00
2018-03-14 16:22:08 +01:00
(*
val hash : t -> int array
val cmp : t -> t -> int
val equivalent : t -> t -> bool
2018-03-14 14:39:22 +01:00
val unique : 'a array array array -> 'a array list
val indices : 'a array array array -> (int array, int * int) Hashtbl.t
2018-03-14 16:22:08 +01:00
*)