Documentation

This commit is contained in:
Anthony Scemama 2018-03-06 00:47:33 +01:00
parent db9aff95d3
commit 209dadb633
6 changed files with 84 additions and 28 deletions

View File

@ -3,19 +3,15 @@ open Constants
open Coordinate
type t = {
expo : float array; (* Gaussian exponents *)
coef : float array; (* Contraction coefficients *)
center : Coordinate.t; (* Center of all the Gaussians *)
totAngMom : AngularMomentum.t; (* Total angular momentum *)
size : int; (* Number of contracted Gaussians *)
norm_coef : float array; (* Normalization coefficient of the class
corresponding to the i-th contraction *)
norm_coef_scale : float array; (* Inside a class, the norm is the norm
of the function with (totAngMom,0,0) *.
this scaling factor *)
index : int; (* Index in the array of contracted shells *)
powers : Zkey.t array; (* Array of Zkeys corresponding to the
powers of (x,y,z) in the class *)
expo : float array;
coef : float array;
center : Coordinate.t;
totAngMom : AngularMomentum.t;
size : int;
norm_coef : float array;
norm_coef_scale : float array;
powers : Zkey.t array;
index : int;
}
module Am = AngularMomentum

View File

@ -1,13 +1,43 @@
(** A contracted shell is the set of functions is given by
{% \\[
(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)
\\] %}
where:
- {% $n_x + n_y + n_z = l$ %}, the total angular momentum
- {% $\alpha_i$ %} are the exponents (tabulated)
- {% $d_i$ %} are the contraction coefficients
- {% $\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}
\\] %}
- {% $f_i$ %} is a scaling factor adjusting the normalization coefficient for the
particular powers of {% $x,y,z$ %}:
{% \\[
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}
\\] %}
*)
type t = private {
expo : float array;
coef : float array;
center : Coordinate.t;
totAngMom : AngularMomentum.t;
size : int;
norm_coef : float array;
norm_coef_scale : float array;
index : int;
powers : Zkey.t array;
expo : float array; (** Array of exponents {% $\alpha_i$ %} *)
coef : float array; (** Array of contraction coefficients {% $d_i$ %} *)
center : Coordinate.t; (** Coordinate of the center {% $\mathbf{A} = (X_A,Y_A,Z_A)$ %} *)
totAngMom : AngularMomentum.t; (** Total angular momentum : {% $l = n_x + n_y + n_z$ %} *)
size : int; (** Number of contracted functions, {% $m$ %} in the formula *)
norm_coef : float array; (** Normalization coefficients of primitive functions {% $\mathcal{N}_i$ %} *)
norm_coef_scale : float array; (** Scaling factors {% $f_i$ %}, given in the same order as [powers]. *)
powers : Zkey.t array; (** Triplets {% $(n_x,n_y,n_z)$ %} encoded in a {!Zkey.t}. *)
index : int; (** Index in the basis set, represented as an array of contracted shells. *)
}

28
INSTALL.md Normal file
View File

@ -0,0 +1,28 @@
# BLAS/Lapack
Install OpenBLAS from your system package manager, for example:
```bash
sudo apt-get install libopenblas-dev
```
# LaCAML
LaCAML is the OCaml binding to the LAPACK library.
```bash
opam install lacaml
```
# odoc-ltxhtml
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
cd odoc-ltxhtml
make install
```

View File

@ -4,9 +4,10 @@ INCLUDE_DIRS=Nuclei,Utils,Basis,HartreeFock
LIBS=
PKGS=
OCAMLCFLAGS="-g -warn-error A"
#OCAMLOPTFLAGS="opt -O3 -nodynlink -remove-unused-arguments -rounds 16 -inline 100 -inline-max-unroll 100 -noassert -unsafe"
OCAMLOPTFLAGS="opt -O3 -nodynlink -remove-unused-arguments -rounds 16 -inline 100 -inline-max-unroll 100"
OCAMLBUILD=ocamlbuild -j 0 -cflags $(OCAMLCFLAGS) -lflags $(OCAMLCFLAGS) -Is $(INCLUDE_DIRS) -ocamlopt $(OCAMLOPTFLAGS)
ODOC_LTXHTML_DIR=qpackage.docdir/ltx
ODOCFLAGS=-docflags "-g ltxhtml.cma"
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)
MLFILES= $(wildcard */*.ml) $(wildcard *.ml)
@ -49,7 +50,7 @@ doc: qpackage.odocl
$(OCAMLBUILD) -ocamlc ocamlcp $*.byte -use-ocamlfind $(PKGS)
clean:
rm -rf _build $(ALL_EXE) $(ALL_TESTS) *.native *.byte
$(OCAMLBUILD) -clean # rm -rf _build $(ALL_EXE) $(ALL_TESTS) *.native *.byte
debug: run_integrals.native
./debug.sh

View File

@ -1,9 +1,9 @@
Requirements
------------
* gmp : GNU Multiple Precision arithmetic library
* BLAS/LAPACK : Linear algebra
* Zarith : Arbitrary-precision integers
* LaCaml : LAPACK OCaml interface
* SklMl : Parallel skeletons for OCaml
* Zarith : Arbitrary-precision integers
* gmp : GNU Multiple Precision arithmetic library
* odoc-ltxhtml : https://github.com/akabe/odoc-ltxhtml

1
_tags
View File

@ -1,3 +1,4 @@
true: package(str,unix,bigarray,zarith,lacaml)
<*.byte> : linkdep(Utils/math_functions.o), custom
<*.native>: linkdep(Utils/math_functions.o)
<odoc-ltxhtml>: not_hygienic