10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-12-22 12:23:31 +01:00

Documentation in Basis/PrimitiveShell.mli

This commit is contained in:
Anthony Scemama 2018-03-14 21:55:38 +01:00
parent 869e10fe6f
commit e5da95100a
2 changed files with 32 additions and 20 deletions

View File

@ -41,17 +41,18 @@ let make totAngMom center expo =
let norm_coef_func = let norm_coef_func =
compute_norm_coef expo totAngMom compute_norm_coef expo totAngMom
in in
let norm_coef = let norm =
norm_coef_func [| Am.to_int totAngMom ; 0 ; 0 |] 1. /. norm_coef_func [| Am.to_int totAngMom ; 0 ; 0 |]
in in
let powers = let powers =
Am.zkey_array (Am.Singlet totAngMom) Am.zkey_array (Am.Singlet totAngMom)
in in
let norm_coef_scale = lazy ( let norm_coef_scale = lazy (
Array.map (fun a -> Array.map (fun a ->
(norm_coef_func (Zkey.to_int_array a)) /. norm_coef (norm_coef_func (Zkey.to_int_array a)) *. norm
) powers ) ) powers )
in in
let norm_coef = 1. /. norm in
{ expo ; norm_coef ; norm_coef_scale ; center ; totAngMom } { expo ; norm_coef ; norm_coef_scale ; center ; totAngMom }
@ -75,6 +76,8 @@ let center x = x.center
let totAngMom x = x.totAngMom let totAngMom x = x.totAngMom
let norm x = 1. /. x.norm_coef
let norm_coef x = x.norm_coef let norm_coef x = x.norm_coef
let norm_coef_scale x = Lazy.force x.norm_coef_scale let norm_coef_scale x = Lazy.force x.norm_coef_scale

View File

@ -1,11 +1,17 @@
(** Set of Gaussians with a given {!AngularMomentum.t} (** Set of Gaussians differing only by the powers of x, y and z, with a
constant {!AngularMomentum.t}.
{% \\[ {% \\[
g(r) = (x-X_A)^{n_x} (y-Y_A)^{n_y} (z-Z_A)^{n_z} \exp \left( -\alpha |r-R_A|^2 \right) 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)
\\] %} \\] %}
where: where:
- {% $\mathbf{r} = (x,y,z)$ %} is the electron coordinate
- {% $\mathbf{A} = (X_A,Y_A,Z_A)$ %} is the coordinate of center A
- {% $n_x + n_y + n_z = l$ %}, the total angular momentum - {% $n_x + n_y + n_z = l$ %}, the total angular momentum
- {% $\alpha$ %} is the exponent - {% $\alpha$ %} is the exponent
@ -22,31 +28,34 @@ val make : AngularMomentum.t -> Coordinate.t -> float -> t
center and the exponent. *) center and the exponent. *)
val expo : t -> float val expo : t -> float
(** Returns the exponent {% $\alpha$ %}. *) (** Exponent {% $\alpha$ %}. *)
val center : t -> Coordinate.t val center : t -> Coordinate.t
(** Coordinate of the center {% $\mathbf{A} = (X_A,Y_A,Z_A)$ %}. *) (** Coordinate {% $\mathbf{A}$ %}.of the center. *)
val totAngMom : t -> AngularMomentum.t 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 norm_coef : t -> float val norm : t -> float
(** Normalization coefficient of the shell: (** Norm of the shell, defined as
{% \\[ || g_{l,0,0}(\mathbf{r}) || =
{% \\[ \sqrt{ \iiint \left[ (x-X_A)^{l}
\mathcal{N} = \sqrt{\iiint \left[ (x-X_A)^{l} \exp (-\alpha |\mathbf{r}-\mathbf{A}|^2) \right]^2 \, dx\, dy\, dz}
\exp (-\alpha |r-R_A|^2) \right]^2 \, dx\, dy\, dz}
\\] %} \\] %}
*) *)
val norm_coef_scale : t -> float array val norm_coef : t -> float
(** Scaling factors adjusting the normalization coefficient for the. (** Normalization coefficient by which the shell has to be multiplied
particular powers of {% $x,y,z$ %}. They are given in the same order as to be normalized :
[AngularMomentum.zkey_array totAngMom]: {% \\[ \mathcal{N} = \frac{1}{|| g_{l,0,0}(\mathbf{r}) ||} \\] %}.
*)
{% \\[ val norm_coef_scale : t -> float array
f = \frac{1}{\mathcal{N}} \sqrt{\iiint [g(r)]^2 \, d^3r} (** Scaling factors {% $f(n_x,n_y,n_z)$ %} adjusting the normalization coefficient
\\] %} for the powers of {% $x,y,z$ %}. The normalization coefficients of the
functions of the shell are given by {% $\mathcal{N}\times f$ %}. They are
given in the same order as [AngularMomentum.zkey_array totAngMom]:
{% \\[ f(n_x,n_y,n_z) = \frac{|| g_{l,0,0}(\mathbf{r}) ||}{|| g_{n_x,n_y,n_z}(\mathbf{r}) ||} \\] %}
*) *)
val size_of_shell : t -> int val size_of_shell : t -> int