From f139be52868da9f2de7a5203dea7895d96b450fc Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 6 Mar 2018 18:25:48 +0100 Subject: [PATCH] Documentation --- Basis/Basis.ml | 2 +- Basis/ContractedShell.mli | 6 +++--- Basis/GamessReader.ml | 4 +--- INSTALL.md | 2 +- Makefile | 4 ++-- Utils/AngularMomentum.mli | 2 +- Utils/Constants.mli | 16 ++++++++-------- Utils/Electrons.mli | 2 +- Utils/Util.mli | 10 +++++----- 9 files changed, 23 insertions(+), 25 deletions(-) diff --git a/Basis/Basis.ml b/Basis/Basis.ml index 3795ba1..4d153a2 100644 --- a/Basis/Basis.ml +++ b/Basis/Basis.ml @@ -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 diff --git a/Basis/ContractedShell.mli b/Basis/ContractedShell.mli index 54ee98e..c09cc4e 100644 --- a/Basis/ContractedShell.mli +++ b/Basis/ContractedShell.mli @@ -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} \\] %} *) diff --git a/Basis/GamessReader.ml b/Basis/GamessReader.ml index eca4fb9..a7e5c38 100644 --- a/Basis/GamessReader.ml +++ b/Basis/GamessReader.ml @@ -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 diff --git a/INSTALL.md b/INSTALL.md index 911fa5f..4e2d32d 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -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 ``` diff --git a/Makefile b/Makefile index a7987c9..22205b8 100644 --- a/Makefile +++ b/Makefile @@ -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) diff --git a/Utils/AngularMomentum.mli b/Utils/AngularMomentum.mli index dd0bea9..e71efec 100644 --- a/Utils/AngularMomentum.mli +++ b/Utils/AngularMomentum.mli @@ -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 diff --git a/Utils/Constants.mli b/Utils/Constants.mli index 38934ba..f533666 100644 --- a/Utils/Constants.mli +++ b/Utils/Constants.mli @@ -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}$ %} *) diff --git a/Utils/Electrons.mli b/Utils/Electrons.mli index 248a68d..68c6cca 100644 --- a/Utils/Electrons.mli +++ b/Utils/Electrons.mli @@ -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$ %} *) } diff --git a/Utils/Util.mli b/Utils/Util.mli index 4560f6c..c2db0ed 100644 --- a/Utils/Util.mli +++ b/Utils/Util.mli @@ -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. *)