mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-06-02 03:15:19 +02:00
114 lines
3.4 KiB
OCaml
114 lines
3.4 KiB
OCaml
|
(** Data structure describing a pair of primitive shells.
|
||
|
|
||
|
A primitive shell pair is the cartesian product between two sets of functions, each
|
||
|
set containing all the functions of a primitive shell.
|
||
|
|
||
|
{% \\[
|
||
|
\left\\{ p_{k_x,k_y,k_z}(\mathbf{r}) \right\\} =
|
||
|
\left\\{ g_{n_x,n_y,n_z}(\mathbf{r}) \right\\} \times
|
||
|
\left\\{ g_{m_x,m_y,m_z}'(\mathbf{r}) \right\\}
|
||
|
\\] %}
|
||
|
|
||
|
where
|
||
|
|
||
|
{%
|
||
|
\begin{align*}
|
||
|
g_{n_x,n_y,n_z}(\mathbf{r}) & =
|
||
|
(x-X_A)^{n_x} (y-Y_A)^{n_y} (z-Z_A)^{n_z}
|
||
|
\exp \left( -\alpha |\mathbf{r}-\mathbf{A}|^2 \right) \\
|
||
|
g_{m_x,m_y,m_z}'(\mathbf{r}) & =
|
||
|
(x-X_B)^{m_x} (y-Y_B)^{m_y} (z-Z_B)^{m_z}
|
||
|
\exp \left( -\beta |\mathbf{r}-\mathbf{B}|^2 \right)
|
||
|
\end{align*}
|
||
|
%}
|
||
|
|
||
|
Following Ref [1], we define three quantities associated with the shells on centers A and B:
|
||
|
|
||
|
{%
|
||
|
\begin{align*}
|
||
|
\sigma_P & = \frac{1}{\alpha + \beta} \\
|
||
|
\mathbf{P} & = \left( \alpha \mathbf{A} + \beta \mathbf{B} \right) \, \sigma_P \\
|
||
|
U_P & = (\pi\,\sigma_P)^{3/2} \exp \left( \alpha \beta \sigma_P |\mathbf{A}-\mathbf{B}|^2 \right)
|
||
|
\end{align*}
|
||
|
%}
|
||
|
|
||
|
|
||
|
|
||
|
References:
|
||
|
|
||
|
[1] {{:http://dx.doi.org/10.1002/qua.560400604} P.M. Gill, B.G. Johnson, and J.A. Pople, International Journal of Quantum Chemistry 40, 745 (1991)}.
|
||
|
*)
|
||
|
|
||
|
type t = {
|
||
|
expo : float; (* alpha + beta *)
|
||
|
expo_inv : float; (* 1/(alpha + beta) *)
|
||
|
center : Coordinate.t; (* P = (alpha * A + beta B)/(alpha+beta) *)
|
||
|
center_minus_a : Coordinate.t; (* P - A *)
|
||
|
a_minus_b : Coordinate.t; (* A - B *)
|
||
|
a_minus_b_sq : float; (* |A-B|^2 *)
|
||
|
norm_coef_scale : float array lazy_t;
|
||
|
norm_coef : float; (* norm_coef_a * norm_coef_b * g, with
|
||
|
g = (pi/(alpha+beta))^(3/2) exp (-|A-B|^2 * alpha*beta/(alpha+beta)) *)
|
||
|
totAngMom : AngularMomentum.t;
|
||
|
shell_a : PrimitiveShell.t;
|
||
|
shell_b : PrimitiveShell.t;
|
||
|
i : int; (*TODO remove *)
|
||
|
j : int; (*TODO remove *)
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
val make : PrimitiveShell.t -> PrimitiveShell.t -> t
|
||
|
(** Creates a primitive shell pair using two primitive shells. *)
|
||
|
|
||
|
val create_make_of : PrimitiveShell.t -> PrimitiveShell.t ->
|
||
|
(int -> PrimitiveShell.t -> int -> PrimitiveShell.t -> float -> t option)
|
||
|
(* TODO
|
||
|
(PrimitiveShell.t -> PrimitiveShell.t -> float -> t option)
|
||
|
*)
|
||
|
(** Creates a make function [PrimitiveShell.t -> PrimitiveShell.t -> float -> t] in which
|
||
|
all the quantities common to the shell and independent of the exponent
|
||
|
are pre-computed.
|
||
|
|
||
|
The result is None if the normalization coefficient of the resulting
|
||
|
function is below the cutoff, given as a last argument.
|
||
|
|
||
|
*)
|
||
|
|
||
|
val equivalent : t -> t -> bool
|
||
|
|
||
|
val hash : t -> int
|
||
|
|
||
|
val cmp : t -> t -> int
|
||
|
|
||
|
val monocentric : t -> bool
|
||
|
|
||
|
val center : t -> Coordinate.t
|
||
|
(** Coordinates of the center {%$\mathbf{P}$%}. *)
|
||
|
|
||
|
val norm_coef_scale : t -> float array
|
||
|
|
||
|
val expo : t -> float
|
||
|
(** {% \\[ \alpha + \beta \\] %}*)
|
||
|
|
||
|
val expo_inv : t -> float
|
||
|
(** {% \\[ \frac{1}{\alpha + \beta} \\] %}*)
|
||
|
|
||
|
val totAngMom : t -> AngularMomentum.t
|
||
|
(** Total angular momentum of the shell pair: sum of the angular momenta of
|
||
|
the shells.
|
||
|
*)
|
||
|
|
||
|
val a_minus_b : t -> Coordinate.t
|
||
|
(** {% $\mathbf{A}-\mathbf{B}$ %} *)
|
||
|
|
||
|
val a_minus_b_sq : t -> float
|
||
|
(** {% $|\mathbf{A}-\mathbf{B}|^2$ %} *)
|
||
|
|
||
|
val center_minus_a : t -> Coordinate.t
|
||
|
(** {% $\mathbf{P}-\mathbf{A}$ %} *)
|
||
|
|
||
|
val norm_coef : t -> float
|
||
|
(** Normalization coefficient of the shell pair. *)
|
||
|
|