diff --git a/Basis/PrimitiveShell.ml b/Basis/PrimitiveShell.ml index 65877bd..1aac6a1 100644 --- a/Basis/PrimitiveShell.ml +++ b/Basis/PrimitiveShell.ml @@ -41,17 +41,18 @@ let make totAngMom center expo = let norm_coef_func = compute_norm_coef expo totAngMom in - let norm_coef = - norm_coef_func [| Am.to_int totAngMom ; 0 ; 0 |] + let norm = + 1. /. norm_coef_func [| Am.to_int totAngMom ; 0 ; 0 |] in let powers = Am.zkey_array (Am.Singlet totAngMom) in let norm_coef_scale = lazy ( Array.map (fun a -> - (norm_coef_func (Zkey.to_int_array a)) /. norm_coef + (norm_coef_func (Zkey.to_int_array a)) *. norm ) powers ) in + let norm_coef = 1. /. norm in { expo ; norm_coef ; norm_coef_scale ; center ; totAngMom } @@ -75,6 +76,8 @@ let center x = x.center let totAngMom x = x.totAngMom +let norm x = 1. /. x.norm_coef + let norm_coef x = x.norm_coef let norm_coef_scale x = Lazy.force x.norm_coef_scale diff --git a/Basis/PrimitiveShell.mli b/Basis/PrimitiveShell.mli index 9efa8ca..116b787 100644 --- a/Basis/PrimitiveShell.mli +++ b/Basis/PrimitiveShell.mli @@ -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: +- {% $\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 - {% $\alpha$ %} is the exponent @@ -22,31 +28,34 @@ val make : AngularMomentum.t -> Coordinate.t -> float -> t center and the exponent. *) val expo : t -> float -(** Returns the exponent {% $\alpha$ %}. *) +(** Exponent {% $\alpha$ %}. *) 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 (** Total angular momentum : {% $l = n_x + n_y + n_z$ %}. *) -val norm_coef : t -> float -(** Normalization coefficient of the shell: +val norm : t -> float +(** Norm of the shell, defined as + {% \\[ || g_{l,0,0}(\mathbf{r}) || = + \sqrt{ \iiint \left[ (x-X_A)^{l} + \exp (-\alpha |\mathbf{r}-\mathbf{A}|^2) \right]^2 \, dx\, dy\, dz} + \\] %} +*) - {% \\[ - \mathcal{N} = \sqrt{\iiint \left[ (x-X_A)^{l} - \exp (-\alpha |r-R_A|^2) \right]^2 \, dx\, dy\, dz} - \\] %} +val norm_coef : t -> float +(** Normalization coefficient by which the shell has to be multiplied + to be normalized : + {% \\[ \mathcal{N} = \frac{1}{|| g_{l,0,0}(\mathbf{r}) ||} \\] %}. *) val norm_coef_scale : t -> float array -(** Scaling factors adjusting the normalization coefficient for the. - particular powers of {% $x,y,z$ %}. They are given in the same order as - [AngularMomentum.zkey_array totAngMom]: - - {% \\[ - 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