10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-07-25 12:17:25 +02:00

Added prim in ContractedShell

This commit is contained in:
Anthony Scemama 2018-03-14 21:51:27 +01:00
parent 6a62b28145
commit 869e10fe6f
2 changed files with 33 additions and 28 deletions

View File

@ -7,9 +7,10 @@ type t = {
coef : float array; (** Array of contraction coefficients {% $d_i$ %} *)
center : Coordinate.t; (** Coordinate of the center {% $\mathbf{A} = (X_A,Y_A,Z_A)$ %} *)
totAngMom : AngularMomentum.t; (** Total angular momentum : {% $l = n_x + n_y + n_z$ %} *)
norm_coef : float array; (** Normalization coefficients of primitive functions {% $\mathcal{N}_i$ %} *)
norm_coef : float array; (** Normalization coefficients of primitive functions {% $1/\mathcal{N}_i$ %} *)
norm_coef_scale : float array; (** Scaling factors {% $f_i$ %}, given in the same order as [AngularMomentum.zkey_array totAngMom]. *)
index : int; (** Index in the basis set, represented as an array of contracted shells. *)
prim : PrimitiveShell.t array;
}
module Am = AngularMomentum
@ -47,7 +48,7 @@ let make ?(index=0) lc =
let norm_coef_scale = Ps.norm_coef_scale prim.(0)
in
{ index ; expo ; coef ; center ; totAngMom ; norm_coef ;
norm_coef_scale }
norm_coef_scale ; prim }
let with_index a i =
@ -85,3 +86,5 @@ let norm_coef_scale x = x.norm_coef_scale
let index x = x.index
let size_of_shell x = Array.length x.norm_coef_scale
let prim x = x.prim

View File

@ -1,69 +1,71 @@
(** Set of contracted Gaussians with a given {!AngularMomentum.t}
(** Set of contracted Gaussians differing only by the powers of x, y and z, with a
constant {!AngularMomentum.t}.
{% \\[
\chi(r) = (x-X_A)^{n_x} (y-Y_A)^{n_y} (z-Z_A)^{n_z} \sum_{i=1}^{m} \mathcal{N}_i f_i d_i \exp \left( -\alpha_i |r-R_A|^2 \right)
\\] %}
{%
\begin{align*}
\chi_{n_x,n_y,n_z}(r) & = f(n_x,n_y,n_z) \sum_{i=1}^{m} \mathcal{N}_i d_i g_{i\,n_x,n_y,n_z}(r) \\
& = (x-X_A)^{n_x} (y-Y_A)^{n_y} (z-Z_A)^{n_z} f(n_x,n_y,n_z) \sum_{i=1}^{m} \mathcal{N}_i d_i \exp \left( -\alpha_i |r-R_A|^2 \right)
\end{align*}
%}
where:
- {% $g_{i\,n_x,n_y,n_z}(r)$ %} is the i-th {!PrimitiveShell.t}
- {% $n_x + n_y + n_z = l$ %}, the total angular momentum
- {% $\alpha_i$ %} are the exponents (tabulated)
- {% $d_i$ %} are the contraction coefficients
- {% $\mathcal{N}_i$ %} is the normalization coefficient of the i-th primitive:
- {% $\mathcal{N}_i$ %} is the normalization coefficient of the i-th primitive shell
({!PrimitiveShell.norm_coef})
{% \\[
\mathcal{N}_i = \sqrt{\iiint \left[ (x-X_A)^{l} \exp (-\alpha_i |r-R_A|^2) \right]^2 \, dx\, dy\, dz}
\\] %}
- {% $f_i$ %} is a scaling factor adjusting the normalization coefficient for the
particular powers of {% $x,y,z$ %}:
{% \\[
f_i = \frac{1}{\mathcal{N}_i}
\sqrt{\iiint \left[ (x-X_A)^{n_x} (y-Y_A)^{n_y} (z-Z_A)^{n_z} \exp (-\alpha_i |r-R_A|^2) \right]^2 \, dx\, dy\, dz}
\\] %}
- {% $f(n_x,n_y,n_z)$ %} is a scaling factor adjusting the normalization coefficient for the
particular powers of {% $x,y,z$ %} ({!PrimitiveShell.norm_coef_scale})
*)
type t
val to_string : t -> string
(** Pretty-printing of the contracted shell in a string *)
(** Pretty-printing of the contracted shell in a string. *)
val make : ?index:int -> (float * PrimitiveShell.t) array -> t
(** Creates a contracted shell from a list of coefficients and primitives. *)
val with_index : t -> int -> t
(** Returns a copy of the contracted shell with a modified index *)
(** Returns a copy of the contracted shell with a modified index. *)
val expo : t -> float array
(** Array of exponents {% $\alpha_i$ %} *)
(** Array of exponents {% $\alpha_i$ %}. *)
val coef : t -> float array
(** Array of contraction coefficients {% $d_i$ %} *)
(** Array of contraction coefficients {% $d_i$ %}. *)
val prim : t -> PrimitiveShell.t array
(** Array of primitive gaussians *)
val center : t -> Coordinate.t
(** Coordinate of the center {% $\mathbf{A} = (X_A,Y_A,Z_A)$ %} *)
(** Coordinate of the center {% $\mathbf{A} = (X_A,Y_A,Z_A)$ %}. *)
val totAngMom : t -> AngularMomentum.t
(** Total angular momentum : {% $l = n_x + n_y + n_z$ %} *)
(** Total angular momentum : {% $l = n_x + n_y + n_z$ %}. *)
val size : t -> int
(** Number of contracted functions, {% $m$ %} in the formula *)
(** Number of contracted functions, {% $m$ %} in the definition. *)
val norm_coef : t -> float array
(** Normalization coefficients of primitive functions {% $\mathcal{N}_i$ %} *)
(** Normalization coefficients {% $\mathcal{N}_i$ %} of the primitive shells. *)
val norm_coef_scale : t -> float array
(** Scaling factors {% $f_i$ %}, given in the same order as [AngularMomentum.zkey_array totAngMom]. *)
(** Scaling factors {% $f(n_x,n_y,n_z)$ %}, given in the same order as
[AngularMomentum.zkey_array totAngMom]. *)
val index : t -> int
(** Index in the basis set, represented as an array of contracted shells. *)
val size_of_shell : t -> int
(** Number of contracted functions in the shell *)
(** Number of contracted functions in the shell. *)