mirror of
https://gitlab.com/scemama/QCaml.git
synced 2025-01-03 01:55:40 +01:00
Documentation
This commit is contained in:
parent
db9aff95d3
commit
209dadb633
@ -3,19 +3,15 @@ open Constants
|
|||||||
open Coordinate
|
open Coordinate
|
||||||
|
|
||||||
type t = {
|
type t = {
|
||||||
expo : float array; (* Gaussian exponents *)
|
expo : float array;
|
||||||
coef : float array; (* Contraction coefficients *)
|
coef : float array;
|
||||||
center : Coordinate.t; (* Center of all the Gaussians *)
|
center : Coordinate.t;
|
||||||
totAngMom : AngularMomentum.t; (* Total angular momentum *)
|
totAngMom : AngularMomentum.t;
|
||||||
size : int; (* Number of contracted Gaussians *)
|
size : int;
|
||||||
norm_coef : float array; (* Normalization coefficient of the class
|
norm_coef : float array;
|
||||||
corresponding to the i-th contraction *)
|
norm_coef_scale : float array;
|
||||||
norm_coef_scale : float array; (* Inside a class, the norm is the norm
|
powers : Zkey.t array;
|
||||||
of the function with (totAngMom,0,0) *.
|
index : int;
|
||||||
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 *)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module Am = AngularMomentum
|
module Am = AngularMomentum
|
||||||
|
@ -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 {
|
type t = private {
|
||||||
expo : float array;
|
expo : float array; (** Array of exponents {% $\alpha_i$ %} *)
|
||||||
coef : float array;
|
coef : float array; (** Array of contraction coefficients {% $d_i$ %} *)
|
||||||
center : Coordinate.t;
|
center : Coordinate.t; (** Coordinate of the center {% $\mathbf{A} = (X_A,Y_A,Z_A)$ %} *)
|
||||||
totAngMom : AngularMomentum.t;
|
totAngMom : AngularMomentum.t; (** Total angular momentum : {% $l = n_x + n_y + n_z$ %} *)
|
||||||
size : int;
|
size : int; (** Number of contracted functions, {% $m$ %} in the formula *)
|
||||||
norm_coef : float array;
|
norm_coef : float array; (** Normalization coefficients of primitive functions {% $\mathcal{N}_i$ %} *)
|
||||||
norm_coef_scale : float array;
|
norm_coef_scale : float array; (** Scaling factors {% $f_i$ %}, given in the same order as [powers]. *)
|
||||||
index : int;
|
powers : Zkey.t array; (** Triplets {% $(n_x,n_y,n_z)$ %} encoded in a {!Zkey.t}. *)
|
||||||
powers : Zkey.t array;
|
index : int; (** Index in the basis set, represented as an array of contracted shells. *)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
28
INSTALL.md
Normal file
28
INSTALL.md
Normal 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
|
||||||
|
```
|
||||||
|
|
7
Makefile
7
Makefile
@ -4,9 +4,10 @@ INCLUDE_DIRS=Nuclei,Utils,Basis,HartreeFock
|
|||||||
LIBS=
|
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 -noassert -unsafe"
|
|
||||||
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"
|
||||||
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
|
MLLFILES=$(wildcard */*.mll) $(wildcard *.mll) Utils/math_functions.c
|
||||||
MLYFILES=$(wildcard */*.mly) $(wildcard *.mly)
|
MLYFILES=$(wildcard */*.mly) $(wildcard *.mly)
|
||||||
MLFILES= $(wildcard */*.ml) $(wildcard *.ml)
|
MLFILES= $(wildcard */*.ml) $(wildcard *.ml)
|
||||||
@ -49,7 +50,7 @@ doc: qpackage.odocl
|
|||||||
$(OCAMLBUILD) -ocamlc ocamlcp $*.byte -use-ocamlfind $(PKGS)
|
$(OCAMLBUILD) -ocamlc ocamlcp $*.byte -use-ocamlfind $(PKGS)
|
||||||
|
|
||||||
clean:
|
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: run_integrals.native
|
||||||
./debug.sh
|
./debug.sh
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
|
|
||||||
* gmp : GNU Multiple Precision arithmetic library
|
|
||||||
* BLAS/LAPACK : Linear algebra
|
* BLAS/LAPACK : Linear algebra
|
||||||
* Zarith : Arbitrary-precision integers
|
|
||||||
* LaCaml : LAPACK OCaml interface
|
* 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
1
_tags
@ -1,3 +1,4 @@
|
|||||||
true: package(str,unix,bigarray,zarith,lacaml)
|
true: package(str,unix,bigarray,zarith,lacaml)
|
||||||
<*.byte> : linkdep(Utils/math_functions.o), custom
|
<*.byte> : linkdep(Utils/math_functions.o), custom
|
||||||
<*.native>: linkdep(Utils/math_functions.o)
|
<*.native>: linkdep(Utils/math_functions.o)
|
||||||
|
<odoc-ltxhtml>: not_hygienic
|
||||||
|
Loading…
Reference in New Issue
Block a user