diff --git a/ao/README.org b/ao/README.org index 957e408..a35bc76 100644 --- a/ao/README.org +++ b/ao/README.org @@ -69,6 +69,7 @@ with open(dunetest,'w') as f: #+name: noimplementation #+begin_src elisp + (modules_without_implementation ao_dim) #+end_src ** Extra C files diff --git a/ao/basis.org b/ao/basis.org new file mode 100644 index 0000000..d54a0dc --- /dev/null +++ b/ao/basis.org @@ -0,0 +1,223 @@ +#+begin_src elisp tangle: no :results none :exports none +(setq pwd (file-name-directory buffer-file-name)) +(setq name (file-name-nondirectory (substring buffer-file-name 0 -4))) +(setq lib (concat pwd "lib/")) +(setq testdir (concat pwd "test/")) +(setq mli (concat lib name ".mli")) +(setq ml (concat lib name ".ml")) +(setq test-ml (concat testdir name ".ml")) +(org-babel-tangle) +#+end_src + +* Basis + :PROPERTIES: + :header-args: :noweb yes :comments both + :END: + + Data structure for Atomic Orbitals. + +** Dimensions :noexports: + + #+NAME: types + #+begin_src ocaml :tangle lib/ao_dim.mli :exports none +type t + #+end_src + +** Type + + #+NAME: types + #+begin_src ocaml :tangle (eval mli) +type t +type ao = Ao_dim.t + +open Common +open Particles +open Operators +open Linear_algebra + #+end_src + + #+begin_src ocaml :tangle (eval ml) :exports none +type t = + { ao_basis : Basis_poly.t ; + cartesian : bool + } + +type ao = Ao_dim.t + +open Linear_algebra +open Common + #+end_src + +** Conversions + + #+begin_src ocaml :tangle (eval mli) +val of_nuclei_and_basis_filename : + ?kind:[> `Gaussian ] -> ?operators:Operator.t list -> ?cartesian:bool -> + nuclei:Nuclei.t -> string -> t + #+end_src + + | ~of_nuclei_and_basis_filename~ | Creates the data structure for the atomic orbitals basis from a molecule ~Nuclei.t~ and the name of the basis-set file | + + #+begin_src ocaml :tangle (eval ml) :exports none +let of_nuclei_and_basis_filename ?(kind=`Gaussian) ?operators ?(cartesian=false) + ~nuclei filename = + match kind with + | `Gaussian -> + let basis = + Gaussian.Basis.of_nuclei_and_basis_filename ~nuclei filename + in + let ao_basis = + Basis_poly.Gaussian (Basis_gaussian.make ~basis ?operators ~cartesian nuclei ) + in + { ao_basis ; cartesian } + | _ -> failwith "of_nuclei_and_basis_filename needs to be called with `Gaussian" + #+end_src + + +** Access + + #+begin_src ocaml :tangle (eval mli) +val size : t -> int +val ao_basis : t -> Basis_poly.t +val overlap : t -> (ao,ao) Matrix.t +val multipole : t -> string -> (ao,ao) Matrix.t +val ortho : t -> (ao,'a) Matrix.t +val eN_ints : t -> (ao,ao) Matrix.t +val kin_ints : t -> (ao,ao) Matrix.t +val ee_ints : t -> ao Four_idx_storage.t +val ee_lr_ints : t -> ao Four_idx_storage.t +val f12_ints : t -> ao Four_idx_storage.t +val f12_over_r12_ints : t -> ao Four_idx_storage.t +val cartesian : t -> bool +val values : t -> Coordinate.t -> ao Vector.t + #+end_src + + | ~size~ | Number of atomic orbitals in the AO basis set | + | ~ao_basis~ | One-electron basis set | + | ~overlap~ | Overlap matrix | + | ~multipole~ | Multipole matrices | + | ~ortho~ | Orthonormalization matrix of the overlap | + | ~eN_ints~ | Electron-nucleus potential integrals | + | ~kin_ints~ | Kinetic energy integrals | + | ~ee_ints~ | Electron-electron potential integrals | + | ~ee_lr_ints~ | Electron-electron long-range potential integrals | + | ~f12_ints~ | Electron-electron potential integrals | + | ~f12_over_r12_ints~ | Electron-electron potential integrals | + | ~cartesian~ | If true, use cartesian Gaussians (6d, 10f, ...) | + | ~values~ | Values of the AOs evaluated at a given point | + + + #+begin_src ocaml :tangle (eval ml) :exports none +let not_implemented () = + Util.not_implemented "Only Gaussian is implemented" + +let ao_basis t = t.ao_basis + +let size t = + match t.ao_basis with + | Basis_poly.Gaussian b -> Basis_gaussian.size b + | _ -> not_implemented () + +let overlap t = + begin + match t.ao_basis with + | Basis_poly.Gaussian b -> Basis_gaussian.overlap b + | _ -> not_implemented () + end + |> Matrix.relabel + +let multipole t = + begin + match t.ao_basis with + | Basis_poly.Gaussian b -> + let m = Basis_gaussian.multipole b in + fun s -> + Gaussian_integrals.Multipole.matrix m s + |> Matrix.relabel + | _ -> not_implemented () + end + +let ortho t = + begin + match t.ao_basis with + | Basis_poly.Gaussian b -> Basis_gaussian.ortho b + | _ -> not_implemented () + end + |> Matrix.relabel + +let eN_ints t = + begin + match t.ao_basis with + | Basis_poly.Gaussian b -> Basis_gaussian.eN_ints b + | _ -> not_implemented () + end + |> Matrix.relabel + +let kin_ints t = + begin + match t.ao_basis with + | Basis_poly.Gaussian b -> Basis_gaussian.kin_ints b + | _ -> not_implemented () + end + |> Matrix.relabel + +let ee_ints t = + begin + match t.ao_basis with + | Basis_poly.Gaussian b -> Basis_gaussian.ee_ints b + | _ -> not_implemented () + end + |> Four_idx_storage.relabel + +let ee_lr_ints t = + begin + match t.ao_basis with + | Basis_poly.Gaussian b -> Basis_gaussian.ee_lr_ints b + | _ -> not_implemented () + end + |> Four_idx_storage.relabel + +let f12_ints t = + begin + match t.ao_basis with + | Basis_poly.Gaussian b -> Basis_gaussian.f12_ints b + | _ -> not_implemented () + end + |> Four_idx_storage.relabel + +let f12_over_r12_ints t = + begin + match t.ao_basis with + | Basis_poly.Gaussian b -> Basis_gaussian.f12_over_r12_ints b + | _ -> not_implemented () + end + |> Four_idx_storage.relabel + +let cartesian t = t.cartesian + + +let values t point = + begin + match t.ao_basis with + | Basis_poly.Gaussian b -> Basis_gaussian.values b point + | _ -> not_implemented () + end + |> Vector.relabel + + #+end_src + +** Printers + + #+begin_src ocaml :tangle (eval mli) +val pp : Format.formatter -> t -> unit + #+end_src + + #+begin_src ocaml :tangle (eval ml) :exports none +let pp ppf t = + if t.cartesian then + Format.fprintf ppf "@[Basis (cartesian coord)@]" + else + Format.fprintf ppf "@[Basis (spherical coord)@]" + #+end_src + +** Tests diff --git a/ao/lib/ao_dim.ml b/ao/lib/ao_dim.ml deleted file mode 100644 index 63c57c4..0000000 --- a/ao/lib/ao_dim.ml +++ /dev/null @@ -1 +0,0 @@ -type t diff --git a/ao/lib/ao_dim.mli b/ao/lib/ao_dim.mli index 63c57c4..40af92b 100644 --- a/ao/lib/ao_dim.mli +++ b/ao/lib/ao_dim.mli @@ -1 +1,7 @@ +(* Dimensions :noexports: + * + * #+NAME: types *) + +(* [[file:~/QCaml/ao/basis.org::types][types]] *) type t +(* types ends here *) diff --git a/ao/lib/basis.ml b/ao/lib/basis.ml index e1a004c..2693465 100644 --- a/ao/lib/basis.ml +++ b/ao/lib/basis.ml @@ -1,6 +1,4 @@ -open Linear_algebra -open Common - +(* [[file:~/QCaml/ao/basis.org::*Type][Type:2]] *) type t = { ao_basis : Basis_poly.t ; cartesian : bool @@ -8,6 +6,16 @@ type t = type ao = Ao_dim.t +open Linear_algebra +open Common +(* Type:2 ends here *) + + + +(* | ~of_nuclei_and_basis_filename~ | Creates the data structure for the atomic orbitals basis from a molecule ~Nuclei.t~ and the name of the basis-set file | *) + + +(* [[file:~/QCaml/ao/basis.org::*Conversions][Conversions:2]] *) let of_nuclei_and_basis_filename ?(kind=`Gaussian) ?operators ?(cartesian=false) ~nuclei filename = match kind with @@ -20,7 +28,27 @@ let of_nuclei_and_basis_filename ?(kind=`Gaussian) ?operators ?(cartesian=false) in { ao_basis ; cartesian } | _ -> failwith "of_nuclei_and_basis_filename needs to be called with `Gaussian" +(* Conversions:2 ends here *) + + +(* | ~size~ | Number of atomic orbitals in the AO basis set | + * | ~ao_basis~ | One-electron basis set | + * | ~overlap~ | Overlap matrix | + * | ~multipole~ | Multipole matrices | + * | ~ortho~ | Orthonormalization matrix of the overlap | + * | ~eN_ints~ | Electron-nucleus potential integrals | + * | ~kin_ints~ | Kinetic energy integrals | + * | ~ee_ints~ | Electron-electron potential integrals | + * | ~ee_lr_ints~ | Electron-electron long-range potential integrals | + * | ~f12_ints~ | Electron-electron potential integrals | + * | ~f12_over_r12_ints~ | Electron-electron potential integrals | + * | ~cartesian~ | If true, use cartesian Gaussians (6d, 10f, ...) | + * | ~values~ | Values of the AOs evaluated at a given point | *) + + + +(* [[file:~/QCaml/ao/basis.org::*Access][Access:2]] *) let not_implemented () = Util.not_implemented "Only Gaussian is implemented" @@ -116,4 +144,12 @@ let values t point = | _ -> not_implemented () end |> Vector.relabel - +(* Access:2 ends here *) + +(* [[file:~/QCaml/ao/basis.org::*Printers][Printers:2]] *) +let pp ppf t = + if t.cartesian then + Format.fprintf ppf "@[Basis (cartesian coord)@]" + else + Format.fprintf ppf "@[Basis (spherical coord)@]" +(* Printers:2 ends here *) diff --git a/ao/lib/basis.mli b/ao/lib/basis.mli index c4e38ce..57046b3 100644 --- a/ao/lib/basis.mli +++ b/ao/lib/basis.mli @@ -1,60 +1,48 @@ -(** Data structure for Atomic Orbitals. *) +(* Type + * + * #+NAME: types *) + +(* [[file:~/QCaml/ao/basis.org::types][types]] *) +type t +type ao = Ao_dim.t open Common open Particles open Operators open Linear_algebra +(* types ends here *) -type t -type ao = Ao_dim.t - -(** {1 Accessors} *) - -val size : t -> int -(** Number of atomic orbitals in the AO basis set *) - -val ao_basis : t -> Basis_poly.t -(** One-electron basis set *) - -val overlap : t -> (ao,ao) Matrix.t -(** Overlap matrix *) - -val multipole : t -> string -> (ao,ao) Matrix.t -(** Multipole matrices *) - -val ortho : t -> (ao,'a) Matrix.t -(** Orthonormalization matrix of the overlap *) - -val eN_ints : t -> (ao,ao) Matrix.t -(** Electron-nucleus potential integrals *) - -val kin_ints : t -> (ao,ao) Matrix.t -(** Kinetic energy integrals *) - -val ee_ints : t -> ao Four_idx_storage.t -(** Electron-electron potential integrals *) - -val ee_lr_ints : t -> ao Four_idx_storage.t -(** Electron-electron long-range potential integrals *) - -val f12_ints : t -> ao Four_idx_storage.t -(** Electron-electron potential integrals *) - -val f12_over_r12_ints : t -> ao Four_idx_storage.t -(** Electron-electron potential integrals *) - -val cartesian : t -> bool -(** If true, use cartesian Gaussians (6d, 10f, ...) *) - -val values : t -> Coordinate.t -> ao Vector.t -(** Values of the AOs evaluated at a given point *) +(* Conversions *) - -(** {1 Creators} *) - +(* [[file:~/QCaml/ao/basis.org::*Conversions][Conversions:1]] *) val of_nuclei_and_basis_filename : ?kind:[> `Gaussian ] -> ?operators:Operator.t list -> ?cartesian:bool -> nuclei:Nuclei.t -> string -> t -(** Creates the data structure for the atomic orbitals basis from a molecule - {Nuclei.t} and the name of the basis-set file *) +(* Conversions:1 ends here *) + +(* Access *) + + +(* [[file:~/QCaml/ao/basis.org::*Access][Access:1]] *) +val size : t -> int +val ao_basis : t -> Basis_poly.t +val overlap : t -> (ao,ao) Matrix.t +val multipole : t -> string -> (ao,ao) Matrix.t +val ortho : t -> (ao,'a) Matrix.t +val eN_ints : t -> (ao,ao) Matrix.t +val kin_ints : t -> (ao,ao) Matrix.t +val ee_ints : t -> ao Four_idx_storage.t +val ee_lr_ints : t -> ao Four_idx_storage.t +val f12_ints : t -> ao Four_idx_storage.t +val f12_over_r12_ints : t -> ao Four_idx_storage.t +val cartesian : t -> bool +val values : t -> Coordinate.t -> ao Vector.t +(* Access:1 ends here *) + +(* Printers *) + + +(* [[file:~/QCaml/ao/basis.org::*Printers][Printers:1]] *) +val pp : Format.formatter -> t -> unit +(* Printers:1 ends here *) diff --git a/ao/lib/dune b/ao/lib/dune index c5ad017..9397380 100644 --- a/ao/lib/dune +++ b/ao/lib/dune @@ -12,7 +12,7 @@ qcaml.gaussian_integrals qcaml.operators ) - + (modules_without_implementation ao_dim) ) diff --git a/common/coordinate.org b/common/coordinate.org index 06c372f..d7429c2 100644 --- a/common/coordinate.org +++ b/common/coordinate.org @@ -41,7 +41,20 @@ type axis = X | Y | Z #+end_src #+begin_src ocaml :tangle (eval ml) :exports none -<> +type bohr +type angstrom + +type xyz = { + x : float ; + y : float ; + z : float ; +} + +type 'a point = xyz + +type t = bohr point + +type axis = X | Y | Z #+end_src ** Creation @@ -61,7 +74,7 @@ external make : 'a point -> t = "%identity" external make_angstrom : 'a point -> angstrom point = "%identity" let zero = - make { x = 0. ; y = 0. ; z = 0. } + make { x = 0. ; y = 0. ; z = 0. } #+end_src ** Conversion diff --git a/common/lib/coordinate.ml b/common/lib/coordinate.ml index af56d2d..9e3a051 100644 --- a/common/lib/coordinate.ml +++ b/common/lib/coordinate.ml @@ -86,7 +86,7 @@ let angstrom_to_bohr { x ; y ; z } = -(* [[file:~/QCaml/common/coordinate.org::*Vector operations][Vector operations:2]] *) +(* [[file:~/QCaml/common/coordinate.org::*Vector%20operations][Vector operations:2]] *) let get axis { x ; y ; z } = match axis with | X -> x diff --git a/common/lib/coordinate.mli b/common/lib/coordinate.mli index 0d77caa..512eb36 100644 --- a/common/lib/coordinate.mli +++ b/common/lib/coordinate.mli @@ -39,7 +39,7 @@ val angstrom_to_bohr : angstrom point -> bohr point (* Vector operations *) -(* [[file:~/QCaml/common/coordinate.org::*Vector operations][Vector operations:1]] *) +(* [[file:~/QCaml/common/coordinate.org::*Vector%20operations][Vector operations:1]] *) val neg : t -> t val get : axis -> bohr point -> float val dot : t -> t -> float diff --git a/docs/ao.html b/docs/ao.html index fc409f7..77bba47 100644 --- a/docs/ao.html +++ b/docs/ao.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Atomic Orbitals @@ -225,14 +225,202 @@

Atomic Orbitals

+
-
"Atomic basis set"
+
"Atomic basis set"
 
+ + +
+

1 Basis

+
+

+Data structure for Atomic Orbitals. +

+
+ +
+

1.1 Dimensions   noexports

+
+ +
+

1.2 Type

+
+
+
type t
+type ao = Ao_dim.t 
+
+open Common
+open Particles
+open Operators
+open Linear_algebra
+
+
+
+
+ +
+

1.3 Conversions

+
+
+
val of_nuclei_and_basis_filename :
+  ?kind:[> `Gaussian ] -> ?operators:Operator.t list -> ?cartesian:bool ->
+  nuclei:Nuclei.t -> string -> t
+
+
+ + + + +++ ++ + + + + + + +
of_nuclei_and_basis_filenameCreates the data structure for the atomic orbitals basis from a molecule Nuclei.t and the name of the basis-set file
+
+
+ +
+

1.4 Access

+
+
+
val size              : t -> int
+val ao_basis          : t -> Basis_poly.t
+val overlap           : t -> (ao,ao) Matrix.t
+val multipole         : t -> string -> (ao,ao) Matrix.t
+val ortho             : t -> (ao,'a) Matrix.t
+val eN_ints           : t -> (ao,ao) Matrix.t
+val kin_ints          : t -> (ao,ao) Matrix.t
+val ee_ints           : t -> ao Four_idx_storage.t
+val ee_lr_ints        : t -> ao Four_idx_storage.t
+val f12_ints          : t -> ao Four_idx_storage.t
+val f12_over_r12_ints : t -> ao Four_idx_storage.t
+val cartesian         : t -> bool
+val values            : t -> Coordinate.t -> ao Vector.t
+
+
+ + + + +++ ++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
sizeNumber of atomic orbitals in the AO basis set
ao_basisOne-electron basis set
overlapOverlap matrix
multipoleMultipole matrices
orthoOrthonormalization matrix of the overlap
eN_intsElectron-nucleus potential integrals
kin_intsKinetic energy integrals
ee_intsElectron-electron potential integrals
ee_lr_intsElectron-electron long-range potential integrals
f12_intsElectron-electron potential integrals
f12_over_r12_intsElectron-electron potential integrals
cartesianIf true, use cartesian Gaussians (6d, 10f, …)
valuesValues of the AOs evaluated at a given point
+
+
+ + +
+

1.5 Printers

+
+
+
val pp : Format.formatter -> t -> unit
+
+
+
+
+ +
+

1.6 Tests

+
+

Author: Anthony Scemama

-

Created: 2021-01-01 Fri 18:06

+

Created: 2021-01-04 Mon 09:19

Validate

diff --git a/docs/common.html b/docs/common.html index a9bcce7..fcf8e40 100644 --- a/docs/common.html +++ b/docs/common.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Common @@ -251,140 +251,140 @@

Table of Contents

-
"Utility functions used by all the other directories."
+
"Utility functions used by all the other directories."
 
-
-

1 Angular Momentum

+
+

1 Angular Momentum

Azimuthal quantum number, repsesented as \( s,p,d,\dots \) .

-
-

1.1 Type

+
+

1.1 Type

-
type t =
+
type t =
   | S | P | D | F | G | H | I | J | K | L | M | N | O
   | Int of int
 
@@ -411,8 +411,8 @@ quartets, use in the two-electron operators.
 
-
-

1.2 Conversions

+
+

1.2 Conversions

val of_char : char -> t
@@ -461,7 +461,7 @@ quartets, use in the two-electron operators.
 
 
 
-
+
 Angular_momentum.of_char 'p';;
 - : Angular_momentum.t = P
 
@@ -480,8 +480,8 @@ Angular_momentum.(to_string D);;
 
-
-

1.3 Shell functions

+
+

1.3 Shell functions

val n_functions : t -> int
@@ -510,7 +510,7 @@ Angular_momentum.(to_string D);;
 
 
 
-
+
 Angular_momentum.(n_functions D) ;;
 - : int = 6
 
@@ -523,8 +523,8 @@ Angular_momentum.( zkey_array (Doublet (P,S)) );;
 
-
-

1.4 Arithmetic

+
+

1.4 Arithmetic

val ( + ) : t -> t -> t
@@ -532,7 +532,7 @@ Angular_momentum.( zkey_array (Doublet (P,S)) );;
 
-
+
 Angular_momentum.(D + P);;
 - : Angular_momentum.t = F
 
@@ -542,8 +542,8 @@ Angular_momentum.(F - P);;
 
-
-

1.5 Printers

+
+

1.5 Printers

Printers can print as a string (default) or as an integer. @@ -558,12 +558,12 @@ Printers can print as a string (default) or as an integer.

-
-

1.6 TODO Tests

+
+

1.6 TODO Tests

-
-

2 Bit string

+
+

2 Bit string

We define here a data type to handle bit strings efficiently. When @@ -575,8 +575,8 @@ bit string as a multi-precision integer.

-
-

2.1 Type

+
+

2.1 Type

type t
@@ -585,8 +585,8 @@ bit string as a multi-precision integer.
 
-
-

2.2 General implementation

+
+

2.2 General implementation

val of_int : int -> t
@@ -735,13 +735,13 @@ bit string as a multi-precision integer.
 
 
 
-
+
 Bitstring.of_int 15;;
 - : Bitstring.t =
 ++++------------------------------------------------------------
 
-
+
 Bitstring.(shift_left (of_int 15) 2);;
 - : Bitstring.t =
 --++++----------------------------------------------------------
@@ -761,7 +761,7 @@ Bitstring.(testbit (of_int 15) 4);;
 - : bool = false
 
-
+
 Bitstring.(logor (of_int 15) (of_int 73));;
 - : Bitstring.t =
 ++++--+---------------------------------------------------------
@@ -776,7 +776,7 @@ Bitstring.(logxor (of_int 15) (of_int 73));;
 
-
+
 Bitstring.(plus_one (of_int 15));;
 - : Bitstring.t =
 ----+-----------------------------------------------------------
@@ -787,7 +787,7 @@ Bitstring.(minus_one (of_int 15));;
 
-
+
 Bitstring.(trailing_zeros (of_int 12));;
 - : int = 2
 
@@ -798,12 +798,12 @@ Bitstring.(popcount (of_int 15));;
 - : int = 4
 
-
+
 Bitstring.(to_list (of_int 45));;
 - : int list = [1; 3; 4; 6]
 
-
+
    Bitstring.permutations 2 4;;
 - : Bitstring.t list =
 [++--------------------------------------------------------------;
@@ -816,8 +816,8 @@ Bitstring.(to_list (of_int 45));;
 
-
-

2.3 Printers

+
+

2.3 Printers

val pp : Format.formatter -> t -> unit
@@ -827,13 +827,13 @@ Bitstring.(to_list (of_int 45));;
 
-
-

3 Charge

+
+

3 Charge

-
-

3.1 Type

+
+

3.1 Type

type t
@@ -846,8 +846,8 @@ This type should be used for all charges in the program (electrons, nuclei, 
 
-
-

3.2 Conversions

+
+

3.2 Conversions

val of_float : float -> t
@@ -863,8 +863,8 @@ This type should be used for all charges in the program (electrons, nuclei, 
 
-
-

3.3 Simple operations

+
+

3.3 Simple operations

val ( + ) : t -> t -> t
@@ -877,8 +877,8 @@ This type should be used for all charges in the program (electrons, nuclei, 
 
-
-

3.4 Printers

+
+

3.4 Printers

val pp : Format.formatter -> t -> unit
@@ -888,8 +888,8 @@ This type should be used for all charges in the program (electrons, nuclei, 
 
-
-

4 Command line

+
+

4 Command line

This module is a wrapper around the Getopt library and helps to @@ -945,11 +945,11 @@ Then, define what to do with the arguments:

-
-

4.1 Type

+
+

4.1 Type

-
type short_opt     = char
+
type short_opt     = char
 type long_opt      = string
 type optional      = Mandatory | Optional
 type documentation = string
@@ -980,8 +980,8 @@ don't (ls -l) and for some arguments the argument is optional
 
-
-

4.2 Mutable attributes

+
+

4.2 Mutable attributes

All the options are stored in the hash table dict where the key @@ -1011,8 +1011,8 @@ Function to create an anonymous argument.

-
-

4.3 Query functions

+
+

4.3 Query functions

val get       : long_opt -> string option
@@ -1050,8 +1050,8 @@ Function to create an anonymous argument.
 
-
-

4.4 Specification

+
+

4.4 Specification

val set_specs : description list -> unit
@@ -1066,16 +1066,16 @@ Sets the specifications of the current program from a list of
 
-
-

5 Constants

+
+

5 Constants

All constants used in the program.

-
-

5.1 Thresholds

+
+

5.1 Thresholds

val epsilon          : float
@@ -1106,8 +1106,8 @@ All constants used in the program.
 
-
-

5.2 Mathematical constants

+
+

5.2 Mathematical constants

val pi             : float
@@ -1162,8 +1162,8 @@ All constants used in the program.
 
-
-

5.3 Physical constants

+
+

5.3 Physical constants

val a0       : float
@@ -1207,8 +1207,8 @@ All constants used in the program.
 
-
-

6 Coordinate

+
+

6 Coordinate

Coordinates in 3D space. @@ -1221,11 +1221,11 @@ module.

-
-

6.1 Type

+
+

6.1 Type

-
type bohr 
+
type bohr 
 type angstrom 
 
 type xyz = {
@@ -1244,8 +1244,8 @@ module.
 
-
-

6.2 Creation

+
+

6.2 Creation

val make          : 'a point -> t
@@ -1282,8 +1282,8 @@ module.
 
-
-

6.3 Conversion

+
+

6.3 Conversion

val bohr_to_angstrom : bohr point -> angstrom point
@@ -1314,8 +1314,8 @@ module.
 
-
-

6.4 Vector operations

+
+

6.4 Vector operations

val neg    : t -> t
@@ -1374,7 +1374,7 @@ module.
 
 
 
-
+
 Coordinate.neg { x=1. ; y=2. ; z=3. } ;;
 - : Coordinate.t =  -1.0000  -2.0000  -3.0000
 
@@ -1400,8 +1400,8 @@ Coordinate.(
 
-
-

6.5 Printers

+
+

6.5 Printers

val pp : Format.formatter -> t -> unit
@@ -1417,13 +1417,13 @@ Coordinates can be printed in bohr or angstrom.
 
-
-

7 Non-negative float

+
+

7 Non-negative float

-
-

7.1 Type

+
+

7.1 Type

type t = private float
@@ -1432,8 +1432,8 @@ Coordinates can be printed in bohr or angstrom.
 
-
-

7.2 Conversions

+
+

7.2 Conversions

val of_float        : float -> t
@@ -1453,16 +1453,16 @@ The unsafe variant doesn't do this check.
 
-
-

8 Powers

+
+

8 Powers

Contains powers of x, y and z describing the polynomials in atomic basis sets.

-
-

8.1 Type

+
+

8.1 Type

type t = private {
@@ -1480,8 +1480,8 @@ Contains powers of x, y and z describing the polynomials in atomic basis sets.
 
-
-

8.2 Conversions

+
+

8.2 Conversions

val of_int_tuple : int * int * int -> t
@@ -1489,7 +1489,7 @@ Contains powers of x, y and z describing the polynomials in atomic basis sets.
 
-
+
 Powers.of_int_tuple (2,3,1);;
 - : Powers.t = x^2 + y^3 + z^1
 
@@ -1499,8 +1499,8 @@ Powers.(to_int_tuple (of_int_tuple (2,3,1)));;
 
-
-

8.3 Operations

+
+

8.3 Operations

val get  : Coordinate.axis -> t -> int
@@ -1535,7 +1535,7 @@ Powers.(to_int_tuple (of_int_tuple (2,3,1)));;
 
 
 
-
+
 Powers.get Coordinate.Y (Powers.of_int_tuple (2,3,1));;
 - : int = 3
 
@@ -1549,8 +1549,8 @@ Powers.decr Coordinate.Y (Powers.of_int_tuple (2,3,1));;
 
-
-

8.4 Printers

+
+

8.4 Printers

val pp : Format.formatter -> t -> unit
@@ -1560,8 +1560,8 @@ Powers.decr Coordinate.Y (Powers.of_int_tuple (2,3,1));;
 
-
-

9 QCaml

+
+

9 QCaml

QCaml-specific parameters @@ -1596,8 +1596,8 @@ QCaml-specific parameters

-
-

10 Range

+
+

10 Range

A range is a sorted list of integers in an interval. @@ -1612,8 +1612,8 @@ A range is a sorted list of integers in an interval.

-
-

10.1 Type

+
+

10.1 Type

type t
@@ -1622,8 +1622,8 @@ A range is a sorted list of integers in an interval.
 
-
-

10.2 Conversion

+
+

10.2 Conversion

val of_string   : string -> t
@@ -1634,8 +1634,8 @@ A range is a sorted list of integers in an interval.
 
-
-

10.3 Printers

+
+

10.3 Printers

val pp : Format.formatter -> t -> unit
@@ -1645,16 +1645,16 @@ A range is a sorted list of integers in an interval.
 
-
-

11 Spin

+
+

11 Spin

Electron spin

-
-

11.1 Type

+
+

11.1 Type

type t = Alfa | Beta
@@ -1669,8 +1669,8 @@ letters as Beta, so the alignment of the code is nicer.
 
-
-

11.2 Functions

+
+

11.2 Functions

val other : t -> t
@@ -1683,8 +1683,8 @@ Returns the opposite spin
 
-
-

11.3 Printers

+
+

11.3 Printers

val pp : Format.formatter -> t -> unit
@@ -1694,8 +1694,8 @@ Returns the opposite spin
 
-
-

12 Util

+
+

12 Util

Utility functions. @@ -1703,8 +1703,8 @@ Utility functions.

-
-

12.1 External C functions

+
+

12.1 External C functions

@@ -1748,8 +1748,8 @@ Utility functions.
-
-

12.1.1 Erf

+
+

12.1.1 Erf

external erf_float : float -> float = "erf_float_bytecode" "erf_float" [@@unboxed] [@@noalloc]
@@ -1758,8 +1758,8 @@ Utility functions.
 
-
-

12.1.2 Erfc

+
+

12.1.2 Erfc

external erfc_float : float -> float = "erfc_float_bytecode" "erfc_float" [@@unboxed] [@@noalloc]
@@ -1768,8 +1768,8 @@ Utility functions.
 
-
-

12.1.3 Gamma

+
+

12.1.3 Gamma

external gamma_float : float -> float = "gamma_float_bytecode" "gamma_float" [@@unboxed] [@@noalloc]
@@ -1778,8 +1778,8 @@ Utility functions.
 
-
-

12.1.4 Popcnt

+
+

12.1.4 Popcnt

val popcnt : int64 -> int
@@ -1788,8 +1788,8 @@ Utility functions.
 
-
-

12.1.5 Trailz

+
+

12.1.5 Trailz

val trailz : int64 -> int
@@ -1798,8 +1798,8 @@ Utility functions.
 
-
-

12.1.6 Leadz

+
+

12.1.6 Leadz

val leadz : int64 -> int
@@ -1808,13 +1808,13 @@ Utility functions.
 
-
-

12.1.7 Test

+
+

12.1.7 Test

-
-

12.2 General functions

+
+

12.2 General functions

val fact : int -> float
@@ -1887,8 +1887,8 @@ Utility functions.
 
-
-

12.3 Functions related to the Boys function

+
+

12.3 Functions related to the Boys function

val incomplete_gamma : alpha:float -> float -> float
@@ -1945,8 +1945,8 @@ where \(\gamma\) is the incomplete gamma function.
 
-
-

12.4 List functions

+
+

12.4 List functions

val list_some  : 'a option list -> 'a list
@@ -1983,8 +1983,8 @@ where \(\gamma\) is the incomplete gamma function.
 
-
-

12.5 Array functions

+
+

12.5 Array functions

val array_range   : int -> int -> int array
@@ -2021,8 +2021,8 @@ where \(\gamma\) is the incomplete gamma function.
 
-
-

12.6 Stream functions

+
+

12.6 Stream functions

val stream_range   : int -> int -> int Stream.t
@@ -2059,8 +2059,8 @@ where \(\gamma\) is the incomplete gamma function.
 
-
-

12.7 Printers

+
+

12.7 Printers

val pp_float_array_size   : Format.formatter -> float array -> unit
@@ -2107,7 +2107,7 @@ where \(\gamma\) is the incomplete gamma function.
 
 
 
-
+
 pp_float_array_size:
 [ 6:   1.000000   1.732051   1.732051   1.000000   1.732051   1.000000 ]
 
@@ -2130,8 +2130,8 @@ pp_bitstring 14:
 
-
-

13 Zkey

+
+

13 Zkey

Encodes the powers of x, y, z in a compact form, suitable for being @@ -2144,7 +2144,7 @@ The small integers x, y and z are stored compactly in this 126-bits space:

-
+
                                 Left                                                                Right
  3 [--------------------------------------------------------------]       [------------------|---------------|---------------|---------------]
                                                                                                      x               y               z        
@@ -2165,8 +2165,8 @@ The values of x,y,z should be positive and should not exceed 32767 for
 

-
-

13.1 Types

+
+

13.1 Types

type t 
@@ -2182,8 +2182,8 @@ The values of x,y,z should be positive and should not exceed 32767 for
 
-
-

13.2 Conversions

+
+

13.2 Conversions

val of_powers_three  : Powers.t -> t
@@ -2262,8 +2262,8 @@ The values of x,y,z should be positive and should not exceed 32767 for
 
-
-

13.3 Functions for hash tables

+
+

13.3 Functions for hash tables

val hash    : t -> int
@@ -2300,8 +2300,8 @@ The values of x,y,z should be positive and should not exceed 32767 for
 
-
-

13.4 Printers

+
+

13.4 Printers

val pp : Format.formatter -> t -> unit
@@ -2311,16 +2311,16 @@ The values of x,y,z should be positive and should not exceed 32767 for
 
-
-

14 Zmap

+
+

14 Zmap

A hash table where the keys are Zkey

-
-

14.1 Type

+
+

14.1 Type

include module type of Hashtbl.Make(Zkey)
@@ -2332,7 +2332,7 @@ A hash table where the keys are Zkey
 

Author: Anthony Scemama

-

Created: 2021-01-01 Fri 17:56

+

Created: 2021-01-04 Mon 09:11

Validate

diff --git a/docs/index.html b/docs/index.html index c70c6ee..23a49f1 100644 --- a/docs/index.html +++ b/docs/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + QCaml documentation @@ -229,7 +229,7 @@

Table of Contents

@@ -238,6 +238,12 @@ QCaml is an OCaml library for writing quantum chemistry codes. It is written using literate programming with org-mode.

+ +
+

chamo_bg.png +

+
+

To use it interactively in the top level or in a Jupyter or org-mode notebook, use @@ -253,8 +259,8 @@ This loads all the sub-libraries provided with QCaml, and installs the pretty printers.

-
-

1 Documentation of Modules

+
+

1 Documentation of Modules

- Ao
@@ -276,7 +282,7 @@ the pretty printers.
 

Author: Anthony Scemama

-

Created: 2021-01-01 Fri 18:35

+

Created: 2021-01-01 Fri 18:54

Validate