10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-08-29 15:53:41 +02:00

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 of_nuclei_and_basis_filename ~nuclei ~filename =
let general_basis = let general_basis =
GamessReader.read ~filename GamessReader.read_basis filename
in in
of_nuclei_and_general_basis nuclei general_basis 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) (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$ %} 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 - {% $f_i$ %} is a scaling factor adjusting the normalization coefficient for the
@ -23,7 +23,7 @@ where:
{% \\[ {% \\[
f_i = \frac{1}{\mathcal{N}_i} 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 let read_basis filename =
Element.t and the value is the parsed basis set. *)
let read ~filename =
let lexbuf = let lexbuf =
let ic = open_in filename in let ic = open_in filename in
Lexing.from_channel ic 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). Download the source code [here](https://github.com/scemama/odoc-ltxhtml).
```bash ```bash
git clone https://github.com/akabe/odoc-ltxhtml git clone https://github.com/scemama/odoc-ltxhtml
cd odoc-ltxhtml cd odoc-ltxhtml
make install make install
``` ```

View File

@ -5,8 +5,8 @@ LIBS=
PKGS= PKGS=
OCAMLCFLAGS="-g -warn-error A" OCAMLCFLAGS="-g -warn-error A"
OCAMLOPTFLAGS="opt -O3 -nodynlink -remove-unused-arguments -rounds 16 -inline 100 -inline-max-unroll 100" OCAMLOPTFLAGS="opt -O3 -nodynlink -remove-unused-arguments -rounds 16 -inline 100 -inline-max-unroll 100"
ODOC_LTXHTML_DIR=qpackage.docdir/ltx #ODOC_LTXHTML_DIR=qpackage.docdir/ltx
ODOCFLAGS=-docflags "-g ltxhtml.cma" ODOCFLAGS=-docflags "-g ltxhtml.cma -sort"
OCAMLBUILD=ocamlbuild -j 0 -cflags $(OCAMLCFLAGS) -lflags $(OCAMLCFLAGS) $(ODOCFLAGS) -Is $(INCLUDE_DIRS) -ocamlopt $(OCAMLOPTFLAGS) OCAMLBUILD=ocamlbuild -j 0 -cflags $(OCAMLCFLAGS) -lflags $(OCAMLCFLAGS) $(ODOCFLAGS) -Is $(INCLUDE_DIRS) -ocamlopt $(OCAMLOPTFLAGS)
MLLFILES=$(wildcard */*.mll) $(wildcard *.mll) Utils/math_functions.c MLLFILES=$(wildcard */*.mll) $(wildcard *.mll) Utils/math_functions.c
MLYFILES=$(wildcard */*.mly) $(wildcard *.mly) 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 type t = S | P | D | F | G | H | I | J | K | L | M | N | O

View File

@ -3,28 +3,28 @@
val epsilon : float 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 val integrals_cutoff : float
(** Cutoff value for integrals. Default is 10{^-15}. *) (** Cutoff value for integrals. Default is 10{^-15}. *)
val pi : float val pi : float
(** pi = 3.141_592_653_589_793_12 *) (** {% $\pi$ %} = 3.141_592_653_589_793_12 *)
val sq_pi : float val sq_pi : float
(** [sqrt pi] *) (** {% $\sqrt{\pi}$ %} *)
val sq_pi_over_two : float val sq_pi_over_two : float
(** [(sqrt pi) /. 2.] *) (** {% $\frac{\sqrt{\pi}}{2}$ %} *)
val pi_inv : float val pi_inv : float
(** [ 1. /. pi ] *) (** {% $\frac{1}{\pi}$ %} *)
val two_over_sq_pi : float val two_over_sq_pi : float
(** [ 2. /. (sqrt pi) ] *) (** {% $\frac{2}{\sqrt{\pi}}$ %} *)
val a0 : float 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 val a0_inv : float
(** [ 1. /. a0 ] *) (** {% $\frac{1}{a_0}$ %} *)

View File

@ -3,7 +3,7 @@
type t = { type t = {
n_alpha : int ; (** Number of alpha electrons *) n_alpha : int ; (** Number of alpha electrons *)
n_beta : int ; (** Number of beta 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 *) (** 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" external erf_float : float -> float = "erf_float_bytecode" "erf_float"
[@@unboxed] [@@noalloc] [@@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 val fact : int -> float
(** Factorial function. (** 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 val incomplete_gamma : alpha:float -> float -> float
(** {{:https://en.wikipedia.org/wiki/Incomplete_gamma_function} (** {{: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 val array_sum : float array -> float
(** Returns the sum of all the elements of the array *) (** 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 *) (** 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 val diagonalize_symm : Lacaml.D.mat -> Lacaml.D.mat * Lacaml.D.vec
(** Diagonalize a symmetric matrix. Returns the eigenvectors and the eigenvalues. *) (** Diagonalize a symmetric matrix. Returns the eigenvectors and the eigenvalues. *)