Fixed Tailcall

This commit is contained in:
Anthony Scemama 2022-11-07 14:59:11 +01:00
parent dbbebea8d0
commit 9b5ca55bd8
20 changed files with 365 additions and 366 deletions

View File

@ -385,9 +385,8 @@ let rec to_list ?(accu=[]) = function
| t -> let newlist =
(trailing_zeros t + 1)::accu
in
logand t @@ minus_one t
|> to_list ~accu:newlist
(* |> (to_list [@tailcall]) ~accu:newlist tailcall does not work with 4.13*)
let b = logand t @@ minus_one t in
(to_list [@tailcall]) ~accu:newlist b
#+end_src
#+begin_src ocaml :tangle (eval test-ml) :exports none

View File

@ -1,7 +1,7 @@
(* Single-integer implementation :noexport: *)
(* [[file:~/QCaml/common/bitstring.org::*Single-integer%20implementation][Single-integer implementation:1]] *)
(* [[file:~/QCaml/common/bitstring.org::*Single-integer implementation][Single-integer implementation:1]] *)
module One = struct
let of_int x =
@ -43,7 +43,7 @@ end
(* Zarith implementation :noexport: *)
(* [[file:~/QCaml/common/bitstring.org::*Zarith%20implementation][Zarith implementation:1]] *)
(* [[file:~/QCaml/common/bitstring.org::*Zarith implementation][Zarith implementation:1]] *)
module Many = struct
let of_z x = x
@ -104,7 +104,7 @@ type t =
* | ~to_list~ | Converts a bit string into a list of integers indicating the positions where the bits are set to ~1~. The first value for the position is not ~0~ but ~1~ | *)
(* [[file:~/QCaml/common/bitstring.org::*General%20implementation][General implementation:2]] *)
(* [[file:~/QCaml/common/bitstring.org::*General implementation][General implementation:2]] *)
let of_int x =
One (One.of_int x)
@ -122,7 +122,7 @@ let of_z x =
* #+end_example *)
(* [[file:~/QCaml/common/bitstring.org::*General%20implementation][General implementation:4]] *)
(* [[file:~/QCaml/common/bitstring.org::*General implementation][General implementation:4]] *)
let zero = function
| n when n < 64 -> One (One.zero)
| _ -> Many (Many.zero)
@ -161,7 +161,7 @@ let testbit = function
| Many x -> Many.testbit x
(* General implementation:4 ends here *)
(* [[file:~/QCaml/common/bitstring.org::*General%20implementation][General implementation:6]] *)
(* [[file:~/QCaml/common/bitstring.org::*General implementation][General implementation:6]] *)
let logor a b =
match a,b with
| One a, One b -> One (One.logor a b)
@ -188,7 +188,7 @@ let lognot = function
| Many x -> Many (Many.lognot x)
(* General implementation:6 ends here *)
(* [[file:~/QCaml/common/bitstring.org::*General%20implementation][General implementation:8]] *)
(* [[file:~/QCaml/common/bitstring.org::*General implementation][General implementation:8]] *)
let minus_one = function
| One x -> One (One.minus_one x)
| Many x -> Many (Many.minus_one x)
@ -215,7 +215,7 @@ let plus_one = function
(* [[file:~/QCaml/common/bitstring.org::*General%20implementation][General implementation:9]] *)
(* [[file:~/QCaml/common/bitstring.org::*General implementation][General implementation:9]] *)
let trailing_zeros = function
| One x -> One.trailing_zeros x
| Many x -> Many.trailing_zeros x
@ -248,14 +248,14 @@ let popcount = function
* #+end_example *)
(* [[file:~/QCaml/common/bitstring.org::*General%20implementation][General implementation:10]] *)
(* [[file:~/QCaml/common/bitstring.org::*General implementation][General implementation:10]] *)
let rec to_list ?(accu=[]) = function
| t when (is_zero t) -> List.rev accu
| t -> let newlist =
(trailing_zeros t + 1)::accu
in
logand t @@ minus_one t
|> (to_list [@tailcall]) ~accu:newlist
let b = logand t @@ minus_one t in
(to_list [@tailcall]) ~accu:newlist b
(* General implementation:10 ends here *)
@ -267,7 +267,7 @@ let rec to_list ?(accu=[]) = function
* #+end_example *)
(* [[file:~/QCaml/common/bitstring.org::*General%20implementation][General implementation:12]] *)
(* [[file:~/QCaml/common/bitstring.org::*General implementation][General implementation:12]] *)
let permutations m n =
let rec aux k u rest =

View File

@ -9,7 +9,7 @@ type t
(* General implementation *)
(* [[file:~/QCaml/common/bitstring.org::*General%20implementation][General implementation:1]] *)
(* [[file:~/QCaml/common/bitstring.org::*General implementation][General implementation:1]] *)
val of_int : int -> t
val of_z : Z.t -> t
val zero : int -> t

View File

@ -25,7 +25,7 @@ let to_string x =
"0.0"
(* Conversions:2 ends here *)
(* [[file:~/QCaml/common/charge.org::*Simple%20operations][Simple operations:2]] *)
(* [[file:~/QCaml/common/charge.org::*Simple operations][Simple operations:2]] *)
let gen_op op =
fun a b ->
op (to_float a) (to_float b)

View File

@ -23,7 +23,7 @@ val to_string: t -> string
(* Simple operations *)
(* [[file:~/QCaml/common/charge.org::*Simple%20operations][Simple operations:1]] *)
(* [[file:~/QCaml/common/charge.org::*Simple operations][Simple operations:1]] *)
val ( + ) : t -> t -> t
val ( - ) : t -> t -> t
val ( * ) : t -> float -> t

View File

@ -19,7 +19,7 @@ let integrals_cutoff = epsilon
* | ~two_over_sq_pi~ | $2 / \sqrt{\pi}$ | *)
(* [[file:~/QCaml/common/constants.org::*Mathematical%20constants][Mathematical constants:2]] *)
(* [[file:~/QCaml/common/constants.org::*Mathematical constants][Mathematical constants:2]] *)
let pi = acos (-1.)
let two_pi = 2. *. pi
let sq_pi = sqrt pi
@ -36,7 +36,7 @@ let two_over_sq_pi = 2. /. sq_pi
* | ~ev_to_ha~ | eV to Hartree conversion factor : 1 / ~ha_to_ev~ | *)
(* [[file:~/QCaml/common/constants.org::*Physical%20constants][Physical constants:2]] *)
(* [[file:~/QCaml/common/constants.org::*Physical constants][Physical constants:2]] *)
let a0 = 0.529_177_210_67
let a0_inv = 1. /. a0
let ha_to_ev = 27.211_386_02

View File

@ -9,7 +9,7 @@ val integrals_cutoff : float
(* Mathematical constants *)
(* [[file:~/QCaml/common/constants.org::*Mathematical%20constants][Mathematical constants:1]] *)
(* [[file:~/QCaml/common/constants.org::*Mathematical constants][Mathematical constants:1]] *)
val pi : float
val two_pi : float
val sq_pi : float
@ -21,7 +21,7 @@ val two_over_sq_pi : float
(* Physical constants *)
(* [[file:~/QCaml/common/constants.org::*Physical%20constants][Physical constants:1]] *)
(* [[file:~/QCaml/common/constants.org::*Physical constants][Physical constants:1]] *)
val a0 : float
val a0_inv : float
val ha_to_ev : float

View File

@ -87,7 +87,7 @@ let angstrom_to_bohr { x ; y ; z } =
(* [[file:~/QCaml/common/coordinate.org::*Vector%20operations][Vector operations:2]] *)
(* [[file:~/QCaml/common/coordinate.org::*Vector operations][Vector operations:2]] *)
let get axis { x ; y ; z } =
match axis with
| X -> x

View File

@ -40,7 +40,7 @@ val angstrom_to_bohr : angstrom point -> bohr point
(* Vector operations *)
(* [[file:~/QCaml/common/coordinate.org::*Vector%20operations][Vector operations:1]] *)
(* [[file:~/QCaml/common/coordinate.org::*Vector operations][Vector operations:1]] *)
val neg : t -> t
val get : axis -> bohr point -> float
val dot : t -> t -> float

View File

@ -8,7 +8,7 @@
/* | ~leadz~ | ~bsf~ instruction | */
/* [[file:~/QCaml/common/util.org::*External%20C%20functions][External C functions:1]] */
/* [[file:~/QCaml/common/util.org::*External C functions][External C functions:1]] */
#include <math.h>
#include <caml/mlvalues.h>
#include <caml/alloc.h>

View File

@ -45,7 +45,7 @@ let leadz i = leadz i |> Int32.to_int
* | ~of_some~ | Extracts the value of an option | *)
(* [[file:~/QCaml/common/util.org::*General%20functions][General functions:2]] *)
(* [[file:~/QCaml/common/util.org::*General functions][General functions:2]] *)
let memo_float_of_int =
Array.init 64 float_of_int
@ -152,7 +152,7 @@ let of_some = function
(* [[file:~/QCaml/common/util.org::*Functions%20related%20to%20the%20Boys%20function][Functions related to the Boys function:2]] *)
(* [[file:~/QCaml/common/util.org::*Functions related to the Boys function][Functions related to the Boys function:2]] *)
let incomplete_gamma ~alpha x =
assert (alpha >= 0.);
assert (x >= 0.);
@ -214,7 +214,7 @@ let incomplete_gamma ~alpha x =
* - $F_m(t) = \frac{ 2t\, F_{m+1}(t) + e^{-t} }{2m+1}$ *)
(* [[file:~/QCaml/common/util.org::*Functions%20related%20to%20the%20Boys%20function][Functions related to the Boys function:4]] *)
(* [[file:~/QCaml/common/util.org::*Functions related to the Boys function][Functions related to the Boys function:4]] *)
let boys_function ~maxm t =
assert (t >= 0.);
match maxm with
@ -260,7 +260,7 @@ let boys_function ~maxm t =
* | ~list_pack~ | ~list_pack n l~ Creates a list of ~n~-elements lists | *)
(* [[file:~/QCaml/common/util.org::*List%20functions][List functions:2]] *)
(* [[file:~/QCaml/common/util.org::*List functions][List functions:2]] *)
let list_some l =
List.filter (function None -> false | _ -> true) l
|> List.rev_map (function Some x -> x | _ -> assert false)
@ -298,7 +298,7 @@ let list_pack n l =
* | ~array_product~ | Returns the product of all the elements of the array | *)
(* [[file:~/QCaml/common/util.org::*Array%20functions][Array functions:2]] *)
(* [[file:~/QCaml/common/util.org::*Array functions][Array functions:2]] *)
let array_range first last =
if last < first then [| |] else
Array.init (last-first+1) (fun i -> i+first)
@ -319,7 +319,7 @@ let array_product a =
* | ~stream_fold~ | Apply a fold to the elements of the stream | *)
(* [[file:~/QCaml/common/util.org::*Stream%20functions][Stream functions:2]] *)
(* [[file:~/QCaml/common/util.org::*Stream functions][Stream functions:2]] *)
let stream_range first last =
Stream.from (fun i ->
let result = i+first in

View File

@ -28,7 +28,7 @@ val leadz : int64 -> int
(* General functions *)
(* [[file:~/QCaml/common/util.org::*General%20functions][General functions:1]] *)
(* [[file:~/QCaml/common/util.org::*General functions][General functions:1]] *)
val fact : int -> float
(* @raise Invalid_argument for negative arguments or arguments >100. *)
val binom : int -> int -> int
@ -48,19 +48,19 @@ val not_implemented : string -> 'a
(* Functions related to the Boys function *)
(* [[file:~/QCaml/common/util.org::*Functions%20related%20to%20the%20Boys%20function][Functions related to the Boys function:1]] *)
(* [[file:~/QCaml/common/util.org::*Functions related to the Boys function][Functions related to the Boys function:1]] *)
val incomplete_gamma : alpha:float -> float -> float
(* @raise Failure when the calculation doesn't converge. *)
(* Functions related to the Boys function:1 ends here *)
(* [[file:~/QCaml/common/util.org::*Functions%20related%20to%20the%20Boys%20function][Functions related to the Boys function:3]] *)
(* [[file:~/QCaml/common/util.org::*Functions related to the Boys function][Functions related to the Boys function:3]] *)
val boys_function : maxm:int -> float -> float array
(* Functions related to the Boys function:3 ends here *)
(* List functions *)
(* [[file:~/QCaml/common/util.org::*List%20functions][List functions:1]] *)
(* [[file:~/QCaml/common/util.org::*List functions][List functions:1]] *)
val list_some : 'a option list -> 'a list
val list_range : int -> int -> int list
val list_pack : int -> 'a list -> 'a list list
@ -69,7 +69,7 @@ val list_pack : int -> 'a list -> 'a list list
(* Array functions *)
(* [[file:~/QCaml/common/util.org::*Array%20functions][Array functions:1]] *)
(* [[file:~/QCaml/common/util.org::*Array functions][Array functions:1]] *)
val array_range : int -> int -> int array
val array_sum : float array -> float
val array_product : float array -> float
@ -78,7 +78,7 @@ val array_product : float array -> float
(* Stream functions *)
(* [[file:~/QCaml/common/util.org::*Stream%20functions][Stream functions:1]] *)
(* [[file:~/QCaml/common/util.org::*Stream functions][Stream functions:1]] *)
val stream_range : int -> int -> int Stream.t
val stream_to_list : 'a Stream.t -> 'a list
val stream_fold : ('a -> 'b -> 'a) -> 'a -> 'b Stream.t -> 'a

View File

@ -232,7 +232,7 @@ let to_powers { left ; right ; kind } =
* | ~compare~ | Comparison function, used for sorting | *)
(* [[file:~/QCaml/common/zkey.org::*Functions%20for%20hash%20tables][Functions for hash tables:2]] *)
(* [[file:~/QCaml/common/zkey.org::*Functions for hash tables][Functions for hash tables:2]] *)
let hash = Hashtbl.hash
let equal

View File

@ -32,7 +32,7 @@ val to_string : t -> string
(* Functions for hash tables *)
(* [[file:~/QCaml/common/zkey.org::*Functions%20for%20hash%20tables][Functions for hash tables:1]] *)
(* [[file:~/QCaml/common/zkey.org::*Functions for hash tables][Functions for hash tables:1]] *)
val hash : t -> int
val equal : t -> t -> bool
val compare : t -> t -> int

View File

@ -1,7 +1,7 @@
(* Tests header :noexport: *)
(* [[file:~/QCaml/common/bitstring.org::*Tests%20header][Tests header:1]] *)
(* [[file:~/QCaml/common/bitstring.org::*Tests header][Tests header:1]] *)
open Common.Bitstring
let check_bool = Alcotest.(check bool)
let check msg x = check_bool msg true x
@ -12,7 +12,7 @@ let test_all () =
let many_x = of_z z in
(* Tests header:1 ends here *)
(* [[file:~/QCaml/common/bitstring.org::*General%20implementation][General implementation:3]] *)
(* [[file:~/QCaml/common/bitstring.org::*General implementation][General implementation:3]] *)
check_bool "of_x" true (one_x = (of_int x));
check_bool "of_z" true (one_x = (of_z (Z.of_int x)));
(* General implementation:3 ends here *)
@ -41,7 +41,7 @@ check_bool "of_z" true (one_x = (of_z (Z.of_int x)));
* #+end_example *)
(* [[file:~/QCaml/common/bitstring.org::*General%20implementation][General implementation:5]] *)
(* [[file:~/QCaml/common/bitstring.org::*General implementation][General implementation:5]] *)
check_bool "shift_left1" true (of_int (x lsl 3) = shift_left one_x 3);
check_bool "shift_left2" true (of_z (Z.shift_left z 3) = shift_left many_x 3);
check_bool "shift_left3" true (of_z (Z.shift_left z 100) = shift_left many_x 100);
@ -77,7 +77,7 @@ check_bool "testbit6" false (testbit (of_z (Z.of_int 8)) 4);
(* [[file:~/QCaml/common/bitstring.org::*General%20implementation][General implementation:7]] *)
(* [[file:~/QCaml/common/bitstring.org::*General implementation][General implementation:7]] *)
check_bool "logor1" true (of_int (1 lor 2) = logor (of_int 1) (of_int 2));
check_bool "logor2" true (of_z (Z.of_int (1 lor 2)) = logor (of_z Z.one) (of_z (Z.of_int 2)));
check_bool "logxor1" true (of_int (1 lxor 2) = logxor (of_int 1) (of_int 2));
@ -86,7 +86,7 @@ check_bool "logand1" true (of_int (1 land 3) = logand (of_int 1) (of_int 3));
check_bool "logand2" true (of_z (Z.of_int (1 land 3)) = logand (of_z Z.one) (of_z (Z.of_int 3)));
(* General implementation:7 ends here *)
(* [[file:~/QCaml/common/bitstring.org::*General%20implementation][General implementation:11]] *)
(* [[file:~/QCaml/common/bitstring.org::*General implementation][General implementation:11]] *)
check_bool "to_list" true ([ 1 ; 3 ; 4 ; 6 ] = (to_list (of_int 45)));
(* General implementation:11 ends here *)
@ -105,7 +105,7 @@ check_bool "to_list" true ([ 1 ; 3 ; 4 ; 6 ] = (to_list (of_int 45)));
* #+end_example *)
(* [[file:~/QCaml/common/bitstring.org::*General%20implementation][General implementation:13]] *)
(* [[file:~/QCaml/common/bitstring.org::*General implementation][General implementation:13]] *)
check "permutations"
(permutations 2 4 = List.map of_int
[ 3 ; 5 ; 6 ; 9 ; 10 ; 12 ]);

View File

@ -1,7 +1,7 @@
(* Test header :noexport: *)
(* [[file:~/QCaml/common/util.org::*Test%20header][Test header:1]] *)
(* [[file:~/QCaml/common/util.org::*Test header][Test header:1]] *)
open Common.Util
open Alcotest
(* Test header:1 ends here *)
@ -35,7 +35,7 @@ let test_external () =
()
(* Test:1 ends here *)
(* [[file:~/QCaml/common/util.org::*General%20functions][General functions:3]] *)
(* [[file:~/QCaml/common/util.org::*General functions][General functions:3]] *)
let test_general () =
check int "of_some_of_int_fast" 1 (of_some (Some 1)) ;
check int "binom" 35 (binom 7 4);
@ -46,7 +46,7 @@ let test_general () =
()
(* General functions:3 ends here *)
(* [[file:~/QCaml/common/util.org::*Functions%20related%20to%20the%20Boys%20function][Functions related to the Boys function:5]] *)
(* [[file:~/QCaml/common/util.org::*Functions related to the Boys function][Functions related to the Boys function:5]] *)
let test_boys () =
check (float 1.e-15) "incomplete_gamma" 0.0 (incomplete_gamma ~alpha:0.5 0.);
check (float 1.e-15) "incomplete_gamma" 1.114707979049507 (incomplete_gamma ~alpha:0.5 0.4);
@ -63,7 +63,7 @@ let test_boys () =
()
(* Functions related to the Boys function:5 ends here *)
(* [[file:~/QCaml/common/util.org::*List%20functions][List functions:3]] *)
(* [[file:~/QCaml/common/util.org::*List functions][List functions:3]] *)
let test_list () =
check bool "list_range" true ([ 2; 3; 4 ] = list_range 2 4);
check bool "list_some" true ([ 2; 3; 4 ] =
@ -74,7 +74,7 @@ let test_list () =
()
(* List functions:3 ends here *)
(* [[file:~/QCaml/common/util.org::*Array%20functions][Array functions:3]] *)
(* [[file:~/QCaml/common/util.org::*Array functions][Array functions:3]] *)
let test_array () =
check bool "array_range" true ([| 2; 3; 4 |] = array_range 2 4);
check (float 1.e-15) "array_sum" 9. (array_sum [| 2.; 3.; 4. |]);
@ -85,7 +85,7 @@ let test_array () =
(* Test footer :noexport: *)
(* [[file:~/QCaml/common/util.org::*Test%20footer][Test footer:1]] *)
(* [[file:~/QCaml/common/util.org::*Test footer][Test footer:1]] *)
let tests = [
"External", `Quick, test_external;
"General" , `Quick, test_general;

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2021-10-19 Tue 16:20 -->
<!-- 2022-11-07 Mon 11:28 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Gaussian</title>
@ -272,41 +272,41 @@ org_html_manager.setup(); // activate after the parameters are set
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#org458f6db">1. Summary</a></li>
<li><a href="#org000b493">2. Atomic shell</a>
<li><a href="#org573b439">1. Summary</a></li>
<li><a href="#org20f831d">2. Atomic shell</a>
<ul>
<li><a href="#orgd5a7f6d">2.1. Type</a></li>
<li><a href="#org3d580ec">2.2. Access</a></li>
<li><a href="#org2a3c76d">2.3. Creation</a></li>
<li><a href="#orge3b7bbf">2.4. Printers</a></li>
<li><a href="#org56e4f66">2.1. Type</a></li>
<li><a href="#org40ad070">2.2. Access</a></li>
<li><a href="#org62b2450">2.3. Creation</a></li>
<li><a href="#org8b146e2">2.4. Printers</a></li>
</ul>
</li>
<li><a href="#org403784b">3. Atomic shell pair couple</a>
<li><a href="#orge593280">3. Atomic shell pair couple</a>
<ul>
<li><a href="#orgd59f48c">3.1. Type</a></li>
<li><a href="#org044c217">3.2. Access</a></li>
<li><a href="#org6a9efbf">3.3. Creation</a></li>
<li><a href="#orgcabf1a1">3.4. Printers</a></li>
<li><a href="#orgb99cd3b">3.1. Type</a></li>
<li><a href="#org6cba6ba">3.2. Access</a></li>
<li><a href="#orgafdde1e">3.3. Creation</a></li>
<li><a href="#org6ac533e">3.4. Printers</a></li>
</ul>
</li>
<li><a href="#org6e4ac83">4. Atomic shell pair</a>
<li><a href="#org230e186">4. Atomic shell pair</a>
<ul>
<li><a href="#org9a03038">4.1. Type</a></li>
<li><a href="#org9072da8">4.2. Access</a></li>
<li><a href="#orgf7291bd">4.3. Creation</a></li>
<li><a href="#orge4f55f1">4.4. Printers</a></li>
<li><a href="#orgb93d9e9">4.1. Type</a></li>
<li><a href="#org74b9b4a">4.2. Access</a></li>
<li><a href="#org0b5ef37">4.3. Creation</a></li>
<li><a href="#orgfa1afa2">4.4. Printers</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div id="outline-container-org458f6db" class="outline-2">
<h2 id="org458f6db"><span class="section-number-2">1</span> Summary</h2>
<div id="outline-container-org573b439" class="outline-2">
<h2 id="org573b439"><span class="section-number-2">1</span> Summary</h2>
</div>
<div id="outline-container-org000b493" class="outline-2">
<h2 id="org000b493"><span class="section-number-2">2</span> Atomic shell</h2>
<div id="outline-container-org20f831d" class="outline-2">
<h2 id="org20f831d"><span class="section-number-2">2</span> Atomic shell</h2>
<div class="outline-text-2" id="text-2">
<p>
Set of contracted Gaussians differing only by the powers of \(x\), \(y\) and \(z\), with a
@ -339,8 +339,8 @@ particular powers of \(x,y,z\) (<code>PrimitiveShell.norm_coef_scale</code>)</li
</div>
<div id="outline-container-orgd5a7f6d" class="outline-3">
<h3 id="orgd5a7f6d"><span class="section-number-3">2.1</span> Type</h3>
<div id="outline-container-org56e4f66" class="outline-3">
<h3 id="org56e4f66"><span class="section-number-3">2.1</span> Type</h3>
<div class="outline-text-3" id="text-2-1">
<div class="org-src-container">
<pre class="src src-ocaml"><span class="org-tuareg-font-lock-governing">type</span> <span class="org-type">t</span>
@ -351,8 +351,8 @@ particular powers of \(x,y,z\) (<code>PrimitiveShell.norm_coef_scale</code>)</li
</div>
</div>
<div id="outline-container-org3d580ec" class="outline-3">
<h3 id="org3d580ec"><span class="section-number-3">2.2</span> Access</h3>
<div id="outline-container-org40ad070" class="outline-3">
<h3 id="org40ad070"><span class="section-number-3">2.2</span> Access</h3>
<div class="outline-text-3" id="text-2-2">
<div class="org-src-container">
<pre class="src src-ocaml"><span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">ang_mom</span> <span class="org-tuareg-font-lock-operator">:</span> t <span class="org-tuareg-font-lock-operator">-&gt;</span> <span class="org-tuareg-font-lock-module">Angular_momentum.</span>t
@ -429,14 +429,14 @@ particular powers of \(x,y,z\) (<code>PrimitiveShell.norm_coef_scale</code>)</li
</tbody>
</table>
<pre class="example" id="org1efe2a1">
<pre class="example" id="org88d8b42">
</pre>
</div>
</div>
<div id="outline-container-org2a3c76d" class="outline-3">
<h3 id="org2a3c76d"><span class="section-number-3">2.3</span> Creation</h3>
<div id="outline-container-org62b2450" class="outline-3">
<h3 id="org62b2450"><span class="section-number-3">2.3</span> Creation</h3>
<div class="outline-text-3" id="text-2-3">
<div class="org-src-container">
<pre class="src src-ocaml"><span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">make</span> <span class="org-tuareg-font-lock-operator">:</span> <span class="org-tuareg-font-lock-label">?index</span><span class="org-tuareg-font-lock-operator">:</span>int <span class="org-tuareg-font-lock-operator">-&gt;</span> <span class="org-tuareg-font-lock-module">Contracted_shell.</span>t array <span class="org-tuareg-font-lock-operator">-&gt;</span> t
@ -468,8 +468,8 @@ particular powers of \(x,y,z\) (<code>PrimitiveShell.norm_coef_scale</code>)</li
</div>
</div>
<div id="outline-container-orge3b7bbf" class="outline-3">
<h3 id="orge3b7bbf"><span class="section-number-3">2.4</span> Printers</h3>
<div id="outline-container-org8b146e2" class="outline-3">
<h3 id="org8b146e2"><span class="section-number-3">2.4</span> Printers</h3>
<div class="outline-text-3" id="text-2-4">
<div class="org-src-container">
<pre class="src src-ocaml"><span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">pp</span> <span class="org-tuareg-font-lock-operator">:</span> <span class="org-tuareg-font-lock-module">Format.</span>formatter <span class="org-tuareg-font-lock-operator">-&gt;</span> t <span class="org-tuareg-font-lock-operator">-&gt;</span> unit
@ -479,8 +479,8 @@ particular powers of \(x,y,z\) (<code>PrimitiveShell.norm_coef_scale</code>)</li
</div>
</div>
<div id="outline-container-org403784b" class="outline-2">
<h2 id="org403784b"><span class="section-number-2">3</span> Atomic shell pair couple</h2>
<div id="outline-container-orge593280" class="outline-2">
<h2 id="orge593280"><span class="section-number-2">3</span> Atomic shell pair couple</h2>
<div class="outline-text-2" id="text-3">
<p>
An atomic shell pair couple is the cartesian product between two sets of functions, one
@ -496,8 +496,8 @@ acting on different electrons, since they will be coupled by a two-electron oper
</div>
<div id="outline-container-orgd59f48c" class="outline-3">
<h3 id="orgd59f48c"><span class="section-number-3">3.1</span> Type</h3>
<div id="outline-container-orgb99cd3b" class="outline-3">
<h3 id="orgb99cd3b"><span class="section-number-3">3.1</span> Type</h3>
<div class="outline-text-3" id="text-3-1">
<div class="org-src-container">
<pre class="src src-ocaml"><span class="org-tuareg-font-lock-governing">type</span> <span class="org-type">t</span>
@ -508,8 +508,8 @@ acting on different electrons, since they will be coupled by a two-electron oper
</div>
</div>
<div id="outline-container-org044c217" class="outline-3">
<h3 id="org044c217"><span class="section-number-3">3.2</span> Access</h3>
<div id="outline-container-org6cba6ba" class="outline-3">
<h3 id="org6cba6ba"><span class="section-number-3">3.2</span> Access</h3>
<div class="outline-text-3" id="text-3-2">
<div class="org-src-container">
<pre class="src src-ocaml"><span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">ang_mom</span> <span class="org-tuareg-font-lock-operator">:</span> t <span class="org-tuareg-font-lock-operator">-&gt;</span> <span class="org-tuareg-font-lock-module">Angular_momentum.</span>t
@ -594,8 +594,8 @@ acting on different electrons, since they will be coupled by a two-electron oper
</div>
</div>
<div id="outline-container-org6a9efbf" class="outline-3">
<h3 id="org6a9efbf"><span class="section-number-3">3.3</span> Creation</h3>
<div id="outline-container-orgafdde1e" class="outline-3">
<h3 id="orgafdde1e"><span class="section-number-3">3.3</span> Creation</h3>
<div class="outline-text-3" id="text-3-3">
<div class="org-src-container">
<pre class="src src-ocaml"><span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">make</span> <span class="org-tuareg-font-lock-operator">:</span> <span class="org-tuareg-font-lock-label">?cutoff</span><span class="org-tuareg-font-lock-operator">:</span>float <span class="org-tuareg-font-lock-operator">-&gt;</span> <span class="org-tuareg-font-lock-module">Atomic_shell_pair.</span>t <span class="org-tuareg-font-lock-operator">-&gt;</span> <span class="org-tuareg-font-lock-module">Atomic_shell_pair.</span>t <span class="org-tuareg-font-lock-operator">-&gt;</span> t option
@ -621,14 +621,14 @@ Default cutoff is \(\epsilon\).
</tbody>
</table>
<pre class="example" id="org406c3a5">
<pre class="example" id="org4638f8b">
</pre>
</div>
</div>
<div id="outline-container-orgcabf1a1" class="outline-3">
<h3 id="orgcabf1a1"><span class="section-number-3">3.4</span> Printers</h3>
<div id="outline-container-org6ac533e" class="outline-3">
<h3 id="org6ac533e"><span class="section-number-3">3.4</span> Printers</h3>
<div class="outline-text-3" id="text-3-4">
<div class="org-src-container">
<pre class="src src-ocaml"><span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">pp</span> <span class="org-tuareg-font-lock-operator">:</span> <span class="org-tuareg-font-lock-module">Format.</span>formatter <span class="org-tuareg-font-lock-operator">-&gt;</span> t <span class="org-tuareg-font-lock-operator">-&gt;</span> unit
@ -638,8 +638,8 @@ Default cutoff is \(\epsilon\).
</div>
</div>
<div id="outline-container-org6e4ac83" class="outline-2">
<h2 id="org6e4ac83"><span class="section-number-2">4</span> Atomic shell pair</h2>
<div id="outline-container-org230e186" class="outline-2">
<h2 id="org230e186"><span class="section-number-2">4</span> Atomic shell pair</h2>
<div class="outline-text-2" id="text-4">
<p>
Data structure to represent pairs of atomic shells. The products of
@ -651,8 +651,8 @@ An atomic shell pair is an array of pairs of contracted shells.
</p>
</div>
<div id="outline-container-org9a03038" class="outline-3">
<h3 id="org9a03038"><span class="section-number-3">4.1</span> Type</h3>
<div id="outline-container-orgb93d9e9" class="outline-3">
<h3 id="orgb93d9e9"><span class="section-number-3">4.1</span> Type</h3>
<div class="outline-text-3" id="text-4-1">
<div class="org-src-container">
<pre class="src src-ocaml"><span class="org-tuareg-font-lock-governing">type</span> <span class="org-type">t</span>
@ -663,8 +663,8 @@ An atomic shell pair is an array of pairs of contracted shells.
</div>
</div>
<div id="outline-container-org9072da8" class="outline-3">
<h3 id="org9072da8"><span class="section-number-3">4.2</span> Access</h3>
<div id="outline-container-org74b9b4a" class="outline-3">
<h3 id="org74b9b4a"><span class="section-number-3">4.2</span> Access</h3>
<div class="outline-text-3" id="text-4-2">
<div class="org-src-container">
<pre class="src src-ocaml"><span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">atomic_shell_a</span> <span class="org-tuareg-font-lock-operator">:</span> t <span class="org-tuareg-font-lock-operator">-&gt;</span> <span class="org-tuareg-font-lock-module">Atomic_shell.</span>t
@ -731,8 +731,8 @@ An atomic shell pair is an array of pairs of contracted shells.
</div>
</div>
<div id="outline-container-orgf7291bd" class="outline-3">
<h3 id="orgf7291bd"><span class="section-number-3">4.3</span> Creation</h3>
<div id="outline-container-org0b5ef37" class="outline-3">
<h3 id="org0b5ef37"><span class="section-number-3">4.3</span> Creation</h3>
<div class="outline-text-3" id="text-4-3">
<div class="org-src-container">
<pre class="src src-ocaml"><span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">make</span> <span class="org-tuareg-font-lock-operator">:</span> <span class="org-tuareg-font-lock-label">?cutoff</span><span class="org-tuareg-font-lock-operator">:</span>float <span class="org-tuareg-font-lock-operator">-&gt;</span> <span class="org-tuareg-font-lock-module">Atomic_shell.</span>t <span class="org-tuareg-font-lock-operator">-&gt;</span> <span class="org-tuareg-font-lock-module">Atomic_shell.</span>t <span class="org-tuareg-font-lock-operator">-&gt;</span> t option
@ -765,8 +765,8 @@ If an atomic shell pair is not significant, sets the value to <code>None</code>.
</div>
</div>
<div id="outline-container-orge4f55f1" class="outline-3">
<h3 id="orge4f55f1"><span class="section-number-3">4.4</span> Printers</h3>
<div id="outline-container-orgfa1afa2" class="outline-3">
<h3 id="orgfa1afa2"><span class="section-number-3">4.4</span> Printers</h3>
<div class="outline-text-3" id="text-4-4">
<div class="org-src-container">
<pre class="src src-ocaml"><span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">pp</span> <span class="org-tuareg-font-lock-operator">:</span> <span class="org-tuareg-font-lock-module">Format.</span>formatter <span class="org-tuareg-font-lock-operator">-&gt;</span> t <span class="org-tuareg-font-lock-operator">-&gt;</span> unit
@ -778,7 +778,7 @@ If an atomic shell pair is not significant, sets the value to <code>None</code>.
</div>
<div id="postamble" class="status">
<p class="author">Author: Anthony Scemama</p>
<p class="date">Created: 2021-10-19 Tue 16:20</p>
<p class="date">Created: 2022-11-07 Mon 11:28</p>
<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2021-10-19 Tue 16:20 -->
<!-- 2022-11-07 Mon 14:58 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Top-level</title>
@ -250,18 +250,18 @@ org_html_manager.setup(); // activate after the parameters are set
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#org5ece5ba">1. Summary</a></li>
<li><a href="#org031e9dd">1. Summary</a></li>
</ul>
</div>
</div>
<div id="outline-container-org5ece5ba" class="outline-2">
<h2 id="org5ece5ba"><span class="section-number-2">1</span> Summary</h2>
<div id="outline-container-org031e9dd" class="outline-2">
<h2 id="org031e9dd"><span class="section-number-2">1</span> Summary</h2>
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: Anthony Scemama</p>
<p class="date">Created: 2021-10-19 Tue 16:20</p>
<p class="date">Created: 2022-11-07 Mon 14:58</p>
<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>

View File

@ -1,4 +1,4 @@
(* [[file:~/QCaml/top/install_printers.org::*Intall%20printers][Intall printers:3]] *)
(* [[file:~/QCaml/top/install_printers.org::*Intall printers][Intall printers:3]] *)
let printers =
[
"Ao.Basis.pp" ;