Documentation

This commit is contained in:
Anthony Scemama 2018-03-06 18:25:48 +01:00
parent 209dadb633
commit f139be5286
9 changed files with 23 additions and 25 deletions

View File

@ -67,7 +67,7 @@ let to_string b =
let of_nuclei_and_basis_filename ~nuclei ~filename =
let general_basis =
GamessReader.read ~filename
GamessReader.read_basis filename
in
of_nuclei_and_general_basis nuclei general_basis

View File

@ -1,4 +1,4 @@
(** A contracted shell is the set of functions is given by
(** Set of contracted Gaussians with a given {!AngularMomentum.t}
{% \\[
(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)
@ -15,7 +15,7 @@ where:
- {% $\mathcal{N}_i$ %} is the normalization coefficient of the i-th primitive:
{% \\[
\mathcal{N}_i = \sqrt{\iiint \left[ (x-X_A)^{l} \exp (-\alpha_i |r-R_A|^2) \right]^2 \, dx dy dz}
\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
@ -23,7 +23,7 @@ where:
{% \\[
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}
\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}
\\] %}
*)

View File

@ -1,6 +1,4 @@
(** Read a basis set file in GAMESS format and return an association list where the key is an
Element.t and the value is the parsed basis set. *)
let read ~filename =
let read_basis filename =
let lexbuf =
let ic = open_in filename in
Lexing.from_channel ic

View File

@ -21,7 +21,7 @@ This plugin allows to embed equations in the documentation generated by Ocamldoc
Download the source code [here](https://github.com/scemama/odoc-ltxhtml).
```bash
git clone https://github.com/akabe/odoc-ltxhtml
git clone https://github.com/scemama/odoc-ltxhtml
cd odoc-ltxhtml
make install
```

View File

@ -5,8 +5,8 @@ LIBS=
PKGS=
OCAMLCFLAGS="-g -warn-error A"
OCAMLOPTFLAGS="opt -O3 -nodynlink -remove-unused-arguments -rounds 16 -inline 100 -inline-max-unroll 100"
ODOC_LTXHTML_DIR=qpackage.docdir/ltx
ODOCFLAGS=-docflags "-g ltxhtml.cma"
#ODOC_LTXHTML_DIR=qpackage.docdir/ltx
ODOCFLAGS=-docflags "-g ltxhtml.cma -sort"
OCAMLBUILD=ocamlbuild -j 0 -cflags $(OCAMLCFLAGS) -lflags $(OCAMLCFLAGS) $(ODOCFLAGS) -Is $(INCLUDE_DIRS) -ocamlopt $(OCAMLOPTFLAGS)
MLLFILES=$(wildcard */*.mll) $(wildcard *.mll) Utils/math_functions.c
MLYFILES=$(wildcard */*.mly) $(wildcard *.mly)

View File

@ -1,4 +1,4 @@
(** Azimuthal quantum number, represented as s,p,d,... *)
(** Azimuthal quantum number, represented as {% $s,p,d,\dots$ %} *)
type t = S | P | D | F | G | H | I | J | K | L | M | N | O

View File

@ -3,28 +3,28 @@
val epsilon : float
(** Value below which a float is considered null. Default is 10{^-20}. *)
(** Value below which a float is considered null. Default is {% $\epsilon$ %} = 10{^-20}. *)
val integrals_cutoff : float
(** Cutoff value for integrals. Default is 10{^-15}. *)
val pi : float
(** pi = 3.141_592_653_589_793_12 *)
(** {% $\pi$ %} = 3.141_592_653_589_793_12 *)
val sq_pi : float
(** [sqrt pi] *)
(** {% $\sqrt{\pi}$ %} *)
val sq_pi_over_two : float
(** [(sqrt pi) /. 2.] *)
(** {% $\frac{\sqrt{\pi}}{2}$ %} *)
val pi_inv : float
(** [ 1. /. pi ] *)
(** {% $\frac{1}{\pi}$ %} *)
val two_over_sq_pi : float
(** [ 2. /. (sqrt pi) ] *)
(** {% $\frac{2}{\sqrt{\pi}}$ %} *)
val a0 : float
(** Bohr radius : a{_0} = 0.529_177_210_671_2 Angstrom *)
(** Bohr radius : {% $a_0$ %} = 0.529_177_210_671_2 Angstrom *)
val a0_inv : float
(** [ 1. /. a0 ] *)
(** {% $\frac{1}{a_0}$ %} *)

View File

@ -3,7 +3,7 @@
type t = {
n_alpha : int ; (** Number of alpha electrons *)
n_beta : int ; (** Number of beta electrons *)
multiplicity : int ; (** Spin multiplicity: 2S+1 *)
multiplicity : int ; (** Spin multiplicity: {% $2S+1$ %} *)
}

View File

@ -1,6 +1,6 @@
(** All utilities which should be included in all source files are defined here *)
(** {1 Functions from libm} *)
(** {2 Functions from libm} *)
external erf_float : float -> float = "erf_float_bytecode" "erf_float"
[@@unboxed] [@@noalloc]
@ -16,7 +16,7 @@ external gamma_float : float -> float = "gamma_float_bytecode" "gamma_float"
(** {1 General functions} *)
(** {2 General functions} *)
val fact : int -> float
(** Factorial function.
@ -33,7 +33,7 @@ val chop : float -> (unit -> float) -> float
(** {1 Functions related to the Boys function} *)
(** {2 Functions related to the Boys function} *)
val incomplete_gamma : alpha:float -> float -> float
(** {{:https://en.wikipedia.org/wiki/Incomplete_gamma_function}
@ -48,7 +48,7 @@ val boys_function : maxm:int -> float -> float array
*)
(** {1 Extension of the Array module} *)
(** {2 Extension of the Array module} *)
val array_sum : float array -> float
(** Returns the sum of all the elements of the array *)
@ -57,7 +57,7 @@ val array_product : float array -> float
(** Returns the product of all the elements of the array *)
(** {1 Linear algebra } *)
(** {2 Linear algebra } *)
val diagonalize_symm : Lacaml.D.mat -> Lacaml.D.mat * Lacaml.D.vec
(** Diagonalize a symmetric matrix. Returns the eigenvectors and the eigenvalues. *)