10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-12-22 04:13:33 +01:00

Atomic shell pair couple org

This commit is contained in:
Anthony Scemama 2021-01-07 09:21:06 +01:00
parent 934d3de77a
commit d1a0145826
17 changed files with 983 additions and 747 deletions

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-01-04 Mon 23:51 -->
<!-- 2021-01-07 Thu 09:10 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Atomic Orbitals</title>
@ -251,36 +251,36 @@
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#orgdad2461">1. Gaussian basis</a>
<li><a href="#org2a03573">1. Gaussian basis</a>
<ul>
<li><a href="#org74f68e8">1.1. Type</a></li>
<li><a href="#orgfdc3c55">1.2. Access</a></li>
<li><a href="#org1c0d454">1.3. Computation</a></li>
<li><a href="#org79e7f88">1.4. Creation</a></li>
<li><a href="#org94dcdb9">1.5. Printers</a></li>
<li><a href="#orge0b8bc4">1.1. Type</a></li>
<li><a href="#orgcc77f3c">1.2. Access</a></li>
<li><a href="#orgcf498d9">1.3. Computation</a></li>
<li><a href="#org2055d70">1.4. Creation</a></li>
<li><a href="#orge0a9e0f">1.5. Printers</a></li>
</ul>
</li>
<li><a href="#orga689f4e">2. Basis</a>
<li><a href="#org7d95757">2. Basis</a>
<ul>
<li><a href="#orgfd1c95a">2.1. Dimensions&#xa0;&#xa0;&#xa0;<span class="tag"><span class="noexports">noexports</span></span></a></li>
<li><a href="#org3d84ea0">2.2. Polymorphic types</a></li>
<li><a href="#org709c411">2.3. Types</a></li>
<li><a href="#org963f093">2.4. Conversions</a></li>
<li><a href="#org72dcc0e">2.5. Access</a></li>
<li><a href="#org4161331">2.6. Printers</a></li>
<li><a href="#org9729ac2">2.1. Dimensions&#xa0;&#xa0;&#xa0;<span class="tag"><span class="noexports">noexports</span></span></a></li>
<li><a href="#org9a18f6b">2.2. Polymorphic types</a></li>
<li><a href="#org959a3bc">2.3. Types</a></li>
<li><a href="#org9986f87">2.4. Conversions</a></li>
<li><a href="#org825a4be">2.5. Access</a></li>
<li><a href="#org657865c">2.6. Printers</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="org-src-container">
<pre class="src src-ocaml" id="org4eaf45c"><span class="org-string">"Atomic basis set"</span>
<pre class="src src-ocaml" id="org5676495"><span class="org-string">"Atomic basis set"</span>
</pre>
</div>
<div id="outline-container-orgdad2461" class="outline-2">
<h2 id="orgdad2461"><span class="section-number-2">1</span> Gaussian basis</h2>
<div id="outline-container-org2a03573" class="outline-2">
<h2 id="org2a03573"><span class="section-number-2">1</span> Gaussian basis</h2>
<div class="outline-text-2" id="text-1">
<p>
Data structure for Gaussian Atomic Orbitals:
@ -298,11 +298,11 @@ nucleus \(A\).
</p>
</div>
<div id="outline-container-org74f68e8" class="outline-3">
<h3 id="org74f68e8"><span class="section-number-3">1.1</span> Type</h3>
<div id="outline-container-orge0b8bc4" class="outline-3">
<h3 id="orge0b8bc4"><span class="section-number-3">1.1</span> Type</h3>
<div class="outline-text-3" id="text-1-1">
<div class="org-src-container">
<pre class="src src-ocaml" id="orga6cc859"><span class="org-tuareg-font-lock-governing">open </span><span class="org-tuareg-font-lock-module">Common</span>
<pre class="src src-ocaml" id="org576c159"><span class="org-tuareg-font-lock-governing">open </span><span class="org-tuareg-font-lock-module">Common</span>
<span class="org-tuareg-font-lock-governing">open </span><span class="org-tuareg-font-lock-module">Particles</span>
<span class="org-tuareg-font-lock-governing">open </span><span class="org-tuareg-font-lock-module">Linear_algebra</span>
<span class="org-tuareg-font-lock-governing">open </span><span class="org-tuareg-font-lock-module">Gaussian_integrals</span>
@ -314,8 +314,8 @@ nucleus \(A\).
</div>
</div>
<div id="outline-container-orgfdc3c55" class="outline-3">
<h3 id="orgfdc3c55"><span class="section-number-3">1.2</span> Access</h3>
<div id="outline-container-orgcc77f3c" class="outline-3">
<h3 id="orgcc77f3c"><span class="section-number-3">1.2</span> Access</h3>
<div class="outline-text-3" id="text-1-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">basis</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">Gaussian.Basis.</span>t
@ -406,8 +406,8 @@ nucleus \(A\).
</div>
</div>
<div id="outline-container-org1c0d454" class="outline-3">
<h3 id="org1c0d454"><span class="section-number-3">1.3</span> Computation</h3>
<div id="outline-container-orgcf498d9" class="outline-3">
<h3 id="orgcf498d9"><span class="section-number-3">1.3</span> Computation</h3>
<div class="outline-text-3" id="text-1-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">values</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">Coordinate.</span>t <span class="org-tuareg-font-lock-operator">-&gt;</span> <span class="org-tuareg-font-lock-module">Gaussian.Basis.</span>t <span class="org-tuareg-font-lock-module">Vector.</span>t
@ -432,8 +432,8 @@ nucleus \(A\).
</div>
</div>
<div id="outline-container-org79e7f88" class="outline-3">
<h3 id="org79e7f88"><span class="section-number-3">1.4</span> Creation</h3>
<div id="outline-container-org2055d70" class="outline-3">
<h3 id="org2055d70"><span class="section-number-3">1.4</span> Creation</h3>
<div class="outline-text-3" id="text-1-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">make</span> <span class="org-tuareg-font-lock-operator">:</span> <span class="org-tuareg-font-lock-label">basis</span><span class="org-tuareg-font-lock-operator">:</span><span class="org-tuareg-font-lock-module">Gaussian.Basis.</span>t <span class="org-tuareg-font-lock-operator">-&gt;</span>
@ -456,15 +456,15 @@ Defaults:
<li><code>cartesian</code> : <code>false</code></li>
</ul>
<pre class="example" id="org2cdf9ac">
<pre class="example" id="org9015ed3">
let b = Ao.Basis_gaussian.make ~basis nuclei ;;
val b : Ao.Basis_gaussian.t = Gaussian Basis, spherical, 15 AOs
</pre>
</div>
</div>
<div id="outline-container-org94dcdb9" class="outline-3">
<h3 id="org94dcdb9"><span class="section-number-3">1.5</span> Printers</h3>
<div id="outline-container-orge0a9e0f" class="outline-3">
<h3 id="orge0a9e0f"><span class="section-number-3">1.5</span> Printers</h3>
<div class="outline-text-3" id="text-1-5">
<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
@ -474,23 +474,23 @@ val b : Ao.Basis_gaussian.t = Gaussian Basis, spherical, 15 AOs
</div>
</div>
<div id="outline-container-orga689f4e" class="outline-2">
<h2 id="orga689f4e"><span class="section-number-2">2</span> Basis</h2>
<div id="outline-container-org7d95757" class="outline-2">
<h2 id="org7d95757"><span class="section-number-2">2</span> Basis</h2>
<div class="outline-text-2" id="text-2">
<p>
Data structure for Atomic Orbitals.
</p>
</div>
<div id="outline-container-orgfd1c95a" class="outline-3">
<h3 id="orgfd1c95a"><span class="section-number-3">2.1</span> Dimensions&#xa0;&#xa0;&#xa0;<span class="tag"><span class="noexports">noexports</span></span></h3>
<div id="outline-container-org9729ac2" class="outline-3">
<h3 id="org9729ac2"><span class="section-number-3">2.1</span> Dimensions&#xa0;&#xa0;&#xa0;<span class="tag"><span class="noexports">noexports</span></span></h3>
</div>
<div id="outline-container-org3d84ea0" class="outline-3">
<h3 id="org3d84ea0"><span class="section-number-3">2.2</span> Polymorphic types</h3>
<div id="outline-container-org9a18f6b" class="outline-3">
<h3 id="org9a18f6b"><span class="section-number-3">2.2</span> Polymorphic types</h3>
<div class="outline-text-3" id="text-2-2">
<div class="org-src-container">
<pre class="src src-ocaml" id="org8858f18"><span class="org-tuareg-font-lock-governing">type</span> <span class="org-type">t</span> <span class="org-tuareg-font-lock-operator">=</span>
<pre class="src src-ocaml" id="org99746e4"><span class="org-tuareg-font-lock-governing">type</span> <span class="org-type">t</span> <span class="org-tuareg-font-lock-operator">=</span>
<span class="org-tuareg-font-lock-operator">|</span> <span class="org-tuareg-font-lock-constructor">Unknown</span>
<span class="org-tuareg-font-lock-operator">|</span> <span class="org-tuareg-font-lock-constructor">Gaussian</span> <span class="org-keyword">of</span> <span class="org-tuareg-font-lock-module">Basis_gaussian.</span>t
</pre>
@ -498,8 +498,8 @@ Data structure for Atomic Orbitals.
</div>
</div>
<div id="outline-container-org709c411" class="outline-3">
<h3 id="org709c411"><span class="section-number-3">2.3</span> Types</h3>
<div id="outline-container-org959a3bc" class="outline-3">
<h3 id="org959a3bc"><span class="section-number-3">2.3</span> Types</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">type</span> <span class="org-type">t</span>
@ -514,8 +514,8 @@ Data structure for Atomic Orbitals.
</div>
</div>
<div id="outline-container-org963f093" class="outline-3">
<h3 id="org963f093"><span class="section-number-3">2.4</span> Conversions</h3>
<div id="outline-container-org9986f87" class="outline-3">
<h3 id="org9986f87"><span class="section-number-3">2.4</span> Conversions</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">of_nuclei_and_basis_filename</span> <span class="org-tuareg-font-lock-operator">:</span>
@ -549,15 +549,15 @@ Defaults:
<li><code>cartesian</code> : <code>false</code></li>
</ul>
<pre class="example" id="org8d860d9">
<pre class="example" id="orgd8b19e0">
let b = Ao.Basis.of_nuclei_and_basis_filename ~nuclei filename;;
val b : Ao.Basis.t = Gaussian Basis, spherical, 15 AOs
</pre>
</div>
</div>
<div id="outline-container-org72dcc0e" class="outline-3">
<h3 id="org72dcc0e"><span class="section-number-3">2.5</span> Access</h3>
<div id="outline-container-org825a4be" class="outline-3">
<h3 id="org825a4be"><span class="section-number-3">2.5</span> Access</h3>
<div class="outline-text-3" id="text-2-5">
<div class="org-src-container">
<pre class="src src-ocaml"><span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">size</span> <span class="org-tuareg-font-lock-operator">:</span> t <span class="org-tuareg-font-lock-operator">-&gt;</span> int
@ -655,8 +655,8 @@ val b : Ao.Basis.t = Gaussian Basis, spherical, 15 AOs
</div>
<div id="outline-container-org4161331" class="outline-3">
<h3 id="org4161331"><span class="section-number-3">2.6</span> Printers</h3>
<div id="outline-container-org657865c" class="outline-3">
<h3 id="org657865c"><span class="section-number-3">2.6</span> Printers</h3>
<div class="outline-text-3" id="text-2-6">
<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
@ -668,7 +668,7 @@ val b : Ao.Basis.t = Gaussian Basis, spherical, 15 AOs
</div>
<div id="postamble" class="status">
<p class="author">Author: Anthony Scemama</p>
<p class="date">Created: 2021-01-04 Mon 23:51</p>
<p class="date">Created: 2021-01-07 Thu 09:10</p>
<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>

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-01-06 Wed 09:02 -->
<!-- 2021-01-07 Thu 09:20 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Gaussian</title>
@ -251,25 +251,33 @@
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#orgab17fb9">1. Atomic shell</a>
<li><a href="#orgf2aa138">1. Atomic shell</a>
<ul>
<li><a href="#org0ac793c">1.1. Type</a></li>
<li><a href="#org25b631d">1.2. Access</a></li>
<li><a href="#org6a770e6">1.3. Creation</a></li>
<li><a href="#orgfd4aeac">1.4. Printers</a></li>
<li><a href="#org231e0f3">1.1. Type</a></li>
<li><a href="#org40ab169">1.2. Access</a></li>
<li><a href="#org6afcebe">1.3. Creation</a></li>
<li><a href="#org11fa7e3">1.4. Printers</a></li>
</ul>
</li>
<li><a href="#org58ca204">2. Atomic shell pair couple</a>
<ul>
<li><a href="#org0ddc259">2.1. Type</a></li>
<li><a href="#org47743f8">2.2. Access</a></li>
<li><a href="#org704f15d">2.3. Creation</a></li>
<li><a href="#orge02d873">2.4. Printers</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="org-src-container">
<pre class="src src-ocaml" id="orgbe48c1b"><span class="org-string">"Gaussian basis sets"</span>
<pre class="src src-ocaml" id="orga58af5b"><span class="org-string">"Gaussian basis sets"</span>
</pre>
</div>
<div id="outline-container-orgab17fb9" class="outline-2">
<h2 id="orgab17fb9"><span class="section-number-2">1</span> Atomic shell</h2>
<div id="outline-container-orgf2aa138" class="outline-2">
<h2 id="orgf2aa138"><span class="section-number-2">1</span> Atomic shell</h2>
<div class="outline-text-2" id="text-1">
<p>
Set of contracted Gaussians differing only by the powers of \(x\), \(y\) and \(z\), with a
@ -302,8 +310,8 @@ particular powers of \(x,y,z\) (<code>PrimitiveShell.norm_coef_scale</code>)</li
</div>
<div id="outline-container-org0ac793c" class="outline-3">
<h3 id="org0ac793c"><span class="section-number-3">1.1</span> Type</h3>
<div id="outline-container-org231e0f3" class="outline-3">
<h3 id="org231e0f3"><span class="section-number-3">1.1</span> Type</h3>
<div class="outline-text-3" id="text-1-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>
@ -314,47 +322,20 @@ particular powers of \(x,y,z\) (<code>PrimitiveShell.norm_coef_scale</code>)</li
</div>
</div>
<div id="outline-container-org25b631d" class="outline-3">
<h3 id="org25b631d"><span class="section-number-3">1.2</span> Access</h3>
<div id="outline-container-org40ab169" class="outline-3">
<h3 id="org40ab169"><span class="section-number-3">1.2</span> Access</h3>
<div class="outline-text-3" id="text-1-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">index</span> <span class="org-tuareg-font-lock-operator">:</span> t <span class="org-tuareg-font-lock-operator">-&gt;</span> int
<span class="org-doc">(** Index in the basis set, represented as an array of contracted shells. *)</span>
<span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">center</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">Coordinate.</span>t
<span class="org-doc">(** Coordinate of the center {% $\mathbf{A} = (X_A,Y_A,Z_A)$ %}. *)</span>
<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
<span class="org-doc">(** Total angular momentum : {% $l = n_x + n_y + n_z$ %}. *)</span>
<span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">size</span> <span class="org-tuareg-font-lock-operator">:</span> t <span class="org-tuareg-font-lock-operator">-&gt;</span> int
<span class="org-doc">(** Number of contracted functions, {% $n$ %} in the definition. *)</span>
<span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">contracted_shells</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">Contracted_shell.</span>t array
<span class="org-doc">(** Array of contracted gaussians *)</span>
<span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">exponents</span> <span class="org-tuareg-font-lock-operator">:</span> t <span class="org-tuareg-font-lock-operator">-&gt;</span> float array array
<span class="org-doc">(** Array of exponents {% $\alpha_{ij}$ %}. The first index is the index of</span>
<span class="org-doc"> the contracted function, and the second index is the index of the primitive.</span>
<span class="org-doc">*)</span>
<span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">coefficients</span> <span class="org-tuareg-font-lock-operator">:</span> t <span class="org-tuareg-font-lock-operator">-&gt;</span> float array array
<span class="org-doc">(** Array of contraction coefficients {% $d_{ij}$ %}. The first index is the index of</span>
<span class="org-doc"> the contracted function, and the second index is the index of the primitive.</span>
<span class="org-doc">*)</span>
<span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">normalizations</span> <span class="org-tuareg-font-lock-operator">:</span> t <span class="org-tuareg-font-lock-operator">-&gt;</span> float array array
<span class="org-doc">(** Normalization coefficients {% $\mathcal{N}_{ij}$ %}. The first index is the index of</span>
<span class="org-doc"> the contracted function, and the second index is the index of the primitive.</span>
<span class="org-doc">*)</span>
<span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">norm_scales</span> <span class="org-tuareg-font-lock-operator">:</span> t <span class="org-tuareg-font-lock-operator">-&gt;</span> float array
<span class="org-doc">(** Scaling factors {% $f(n_x,n_y,n_z)$ %}, given in the same order as</span>
<span class="org-doc"> [Angular_momentum.zkey_array ang_mom]. *)</span>
<span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">size_of_shell</span> <span class="org-tuareg-font-lock-operator">:</span> t <span class="org-tuareg-font-lock-operator">-&gt;</span> int
<span class="org-doc">(** Number of contracted functions in the shell: length of {!norm_coef_scale}. *)</span>
<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
<span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">center</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">Coordinate.</span>t
<span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">coefficients</span> <span class="org-tuareg-font-lock-operator">:</span> t <span class="org-tuareg-font-lock-operator">-&gt;</span> float array array
<span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">contracted_shells</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">Contracted_shell.</span>t array
<span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">exponents</span> <span class="org-tuareg-font-lock-operator">:</span> t <span class="org-tuareg-font-lock-operator">-&gt;</span> float array array
<span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">index</span> <span class="org-tuareg-font-lock-operator">:</span> t <span class="org-tuareg-font-lock-operator">-&gt;</span> int
<span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">normalizations</span> <span class="org-tuareg-font-lock-operator">:</span> t <span class="org-tuareg-font-lock-operator">-&gt;</span> float array array
<span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">norm_scales</span> <span class="org-tuareg-font-lock-operator">:</span> t <span class="org-tuareg-font-lock-operator">-&gt;</span> float array
<span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">size_of_shell</span> <span class="org-tuareg-font-lock-operator">:</span> t <span class="org-tuareg-font-lock-operator">-&gt;</span> int
<span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">size</span> <span class="org-tuareg-font-lock-operator">:</span> t <span class="org-tuareg-font-lock-operator">-&gt;</span> int
</pre>
</div>
@ -368,8 +349,8 @@ particular powers of \(x,y,z\) (<code>PrimitiveShell.norm_coef_scale</code>)</li
</colgroup>
<tbody>
<tr>
<td class="org-left"><code>index</code></td>
<td class="org-left">Index in the basis set, represented as an array of contracted shells.</td>
<td class="org-left"><code>ang_mom</code></td>
<td class="org-left">Total angular momentum : \(l = n_x + n_y + n_z\).</td>
</tr>
<tr>
@ -378,13 +359,8 @@ particular powers of \(x,y,z\) (<code>PrimitiveShell.norm_coef_scale</code>)</li
</tr>
<tr>
<td class="org-left"><code>ang_mom</code></td>
<td class="org-left">Total angular momentum : \(l = n_x + n_y + n_z\).</td>
</tr>
<tr>
<td class="org-left"><code>size</code></td>
<td class="org-left">Number of contracted functions, \(n\) in the definition.</td>
<td class="org-left"><code>coefficients</code></td>
<td class="org-left">Array of contraction coefficients \(d_{ij}\). The first index is the index of the contracted function, and the second index is the index of the primitive.</td>
</tr>
<tr>
@ -398,8 +374,8 @@ particular powers of \(x,y,z\) (<code>PrimitiveShell.norm_coef_scale</code>)</li
</tr>
<tr>
<td class="org-left"><code>coefficients</code></td>
<td class="org-left">Array of contraction coefficients \(d_{ij}\). The first index is the index of the contracted function, and the second index is the index of the primitive.</td>
<td class="org-left"><code>index</code></td>
<td class="org-left">Index in the basis set, represented as an array of contracted shells.</td>
</tr>
<tr>
@ -412,6 +388,11 @@ particular powers of \(x,y,z\) (<code>PrimitiveShell.norm_coef_scale</code>)</li
<td class="org-left">Scaling factors \(f(n_x,n_y,n_z)\), given in the same order as <code>Angular_momentum.zkey_array ang_mom</code>.</td>
</tr>
<tr>
<td class="org-left"><code>size</code></td>
<td class="org-left">Number of contracted functions, \(n\) in the definition.</td>
</tr>
<tr>
<td class="org-left"><code>size_of_shell</code></td>
<td class="org-left">Number of contracted functions in the shell: length of <code>norm_coef_scale</code>.</td>
@ -419,21 +400,19 @@ particular powers of \(x,y,z\) (<code>PrimitiveShell.norm_coef_scale</code>)</li
</tbody>
</table>
<pre class="example" id="org32dc57a">
<pre class="example" id="org8274839">
</pre>
</div>
</div>
<div id="outline-container-org6a770e6" class="outline-3">
<h3 id="org6a770e6"><span class="section-number-3">1.3</span> Creation</h3>
<div id="outline-container-org6afcebe" class="outline-3">
<h3 id="org6afcebe"><span class="section-number-3">1.3</span> Creation</h3>
<div class="outline-text-3" id="text-1-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
<span class="org-doc">(** Creates a contracted shell from a list of coefficients and primitives. *)</span>
<span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">with_index</span> <span class="org-tuareg-font-lock-operator">:</span> t <span class="org-tuareg-font-lock-operator">-&gt;</span> int <span class="org-tuareg-font-lock-operator">-&gt;</span> t
<span class="org-doc">(** Returns a copy of the contracted shell with a modified index. *)</span>
</pre>
</div>
@ -457,16 +436,171 @@ particular powers of \(x,y,z\) (<code>PrimitiveShell.norm_coef_scale</code>)</li
</tr>
</tbody>
</table>
</div>
</div>
<pre class="example" id="orgcab2544">
<div id="outline-container-org11fa7e3" class="outline-3">
<h3 id="org11fa7e3"><span class="section-number-3">1.4</span> Printers</h3>
<div class="outline-text-3" id="text-1-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
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-org58ca204" class="outline-2">
<h2 id="org58ca204"><span class="section-number-2">2</span> Atomic shell pair couple</h2>
<div class="outline-text-2" id="text-2">
<p>
An atomic shell pair couple is the cartesian product between two sets of functions, one
set over electron one and one set over electron two. Both sets are atomic shell
pairs.
</p>
<p>
These are usually called <i>shell quartets</i> in the literature, but we prefer to use
<i>pair</i> for two functions with the same electron, and <i>couple</i> for two functions
acting on different electrons, since they will be coupled by a two-electron operator.
</p>
</div>
<div id="outline-container-org0ddc259" class="outline-3">
<h3 id="org0ddc259"><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>
<span class="org-tuareg-font-lock-governing">open </span><span class="org-tuareg-font-lock-module">Common</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org47743f8" class="outline-3">
<h3 id="org47743f8"><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
<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
<span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">atomic_shell_b</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
<span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">atomic_shell_c</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
<span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">atomic_shell_d</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
<span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">atomic_shell_pair_p</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_pair.</span>t
<span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">atomic_shell_pair_q</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_pair.</span>t
<span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">contracted_shell_pair_couples</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">Contracted_shell_pair_couple.</span>t list
<span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">monocentric</span> <span class="org-tuareg-font-lock-operator">:</span> t <span class="org-tuareg-font-lock-operator">-&gt;</span> bool
<span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">norm_scales</span> <span class="org-tuareg-font-lock-operator">:</span> t <span class="org-tuareg-font-lock-operator">-&gt;</span> float array
<span class="org-tuareg-font-lock-governing">val</span> <span class="org-function-name">zkey_array</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">Zkey.</span>t array
</pre>
</div>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-left" />
<col class="org-left" />
</colgroup>
<tbody>
<tr>
<td class="org-left"><code>ang_mom</code></td>
<td class="org-left">Total angular momentum of the shell pair couple: sum of the angular momenta of all the shells.</td>
</tr>
<tr>
<td class="org-left"><code>atomic_shell_a</code></td>
<td class="org-left">Returns the first atomic shell of the first shell pair.</td>
</tr>
<tr>
<td class="org-left"><code>atomic_shell_b</code></td>
<td class="org-left">Returns the second atomic shell of the first shell pair.</td>
</tr>
<tr>
<td class="org-left"><code>atomic_shell_c</code></td>
<td class="org-left">Returns the first atomic shell of the second shell pair.</td>
</tr>
<tr>
<td class="org-left"><code>atomic_shell_d</code></td>
<td class="org-left">Returns the second atomic shell of the second shell pair.</td>
</tr>
<tr>
<td class="org-left"><code>atomic_shell_pair_p</code></td>
<td class="org-left">Returns the first atomic shell pair that was used to build the shell pair.</td>
</tr>
<tr>
<td class="org-left"><code>atomic_shell_pair_q</code></td>
<td class="org-left">Returns the second atomic shell pair that was used to build the shell pair.</td>
</tr>
<tr>
<td class="org-left"><code>contracted_shell_pair_couples</code></td>
<td class="org-left">Returns the list of significant contracted shell pair couples.</td>
</tr>
<tr>
<td class="org-left"><code>monocentric</code></td>
<td class="org-left">True if all four atomic shells have the same center.</td>
</tr>
<tr>
<td class="org-left"><code>norm_scales</code></td>
<td class="org-left">Scaling factors of normalization coefficients inside the shell. The ordering is the same as <code>zkey_array</code>.</td>
</tr>
<tr>
<td class="org-left"><code>zkey_array</code></td>
<td class="org-left">Returns the array of <code>Zkey.t</code> relative to the four shells of the shell pair couple.</td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="outline-container-org704f15d" class="outline-3">
<h3 id="org704f15d"><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">?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
</pre>
</div>
<p>
Default cutoff is \(\epsilon\).
</p>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-left" />
<col class="org-left" />
</colgroup>
<tbody>
<tr>
<td class="org-left"><code>make</code></td>
<td class="org-left">Creates an atomic shell pair couple using two atomic shell pairs.</td>
</tr>
</tbody>
</table>
<pre class="example" id="org72b679b">
</pre>
</div>
</div>
<div id="outline-container-orgfd4aeac" class="outline-3">
<h3 id="orgfd4aeac"><span class="section-number-3">1.4</span> Printers</h3>
<div class="outline-text-3" id="text-1-4">
<div id="outline-container-orge02d873" class="outline-3">
<h3 id="orge02d873"><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
</pre>
@ -477,7 +611,7 @@ particular powers of \(x,y,z\) (<code>PrimitiveShell.norm_coef_scale</code>)</li
</div>
<div id="postamble" class="status">
<p class="author">Author: Anthony Scemama</p>
<p class="date">Created: 2021-01-06 Wed 09:02</p>
<p class="date">Created: 2021-01-07 Thu 09:20</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-01-04 Mon 23:32 -->
<!-- 2021-01-07 Thu 09:10 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Gaussian integrals</title>
@ -226,13 +226,13 @@
<div id="content">
<h1 class="title">Gaussian integrals</h1>
<div class="org-src-container">
<pre class="src src-ocaml" id="orgd1995a6"><span class="org-string">"Integrals on the Gaussian basis sets"</span>
<pre class="src src-ocaml" id="org51c8dbc"><span class="org-string">"Integrals on the Gaussian basis sets"</span>
</pre>
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: Anthony Scemama</p>
<p class="date">Created: 2021-01-04 Mon 23:32</p>
<p class="date">Created: 2021-01-07 Thu 09:10</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-01-04 Mon 23:47 -->
<!-- 2021-01-07 Thu 09:10 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>QCaml documentation</title>
@ -229,12 +229,12 @@
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#org8320997">1. Documentation of Modules</a></li>
<li><a href="#orgb829db3">1. Documentation of Modules</a></li>
</ul>
</div>
</div>
<div id="orgd9ea58a" class="figure">
<div id="orgdb65f9d" class="figure">
<p><img src="./chamo_bg.png" alt="chamo_bg.png" />
</p>
</div>
@ -259,8 +259,8 @@ This loads all the sub-libraries provided with QCaml, and installs
the pretty printers.
</p>
<div id="outline-container-org8320997" class="outline-2">
<h2 id="org8320997"><span class="section-number-2">1</span> Documentation of Modules</h2>
<div id="outline-container-orgb829db3" class="outline-2">
<h2 id="orgb829db3"><span class="section-number-2">1</span> Documentation of Modules</h2>
<div class="outline-text-2" id="text-1">
<ul class="org-ul">
<li><a href="./ao.html">Ao</a></li>
@ -281,7 +281,7 @@ the pretty printers.
</div>
<div id="postamble" class="status">
<p class="author">Author: Anthony Scemama</p>
<p class="date">Created: 2021-01-04 Mon 23:47</p>
<p class="date">Created: 2021-01-07 Thu 09:10</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-01-04 Mon 23:32 -->
<!-- 2021-01-07 Thu 09:10 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Linear Algebra</title>
@ -226,13 +226,13 @@
<div id="content">
<h1 class="title">Linear Algebra</h1>
<div class="org-src-container">
<pre class="src src-ocaml" id="org5714b09"><span class="org-string">"Linear algebra utilities of QCaml libraries."</span>
<pre class="src src-ocaml" id="org768cba3"><span class="org-string">"Linear algebra utilities of QCaml libraries."</span>
</pre>
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: Anthony Scemama</p>
<p class="date">Created: 2021-01-04 Mon 23:32</p>
<p class="date">Created: 2021-01-07 Thu 09:10</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-01-04 Mon 23:32 -->
<!-- 2021-01-07 Thu 09:10 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Molecular orbitals</title>
@ -229,36 +229,36 @@
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#orgd297c1e">1. Frozen core</a>
<li><a href="#org353e188">1. Frozen core</a>
<ul>
<li><a href="#orgeb2eaff">1.1. Type</a></li>
<li><a href="#org80a3f74">1.2. Creation</a></li>
<li><a href="#orgc9563c7">1.3. Access</a></li>
<li><a href="#orgb3d6d1d">1.4. Printers</a></li>
<li><a href="#org80ba5eb">1.1. Type</a></li>
<li><a href="#org313e780">1.2. Creation</a></li>
<li><a href="#org7cd11a0">1.3. Access</a></li>
<li><a href="#org3333e7f">1.4. Printers</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="org-src-container">
<pre class="src src-ocaml" id="org68f4583"><span class="org-string">"Molecular orbitals"</span>
<pre class="src src-ocaml" id="org51cf850"><span class="org-string">"Molecular orbitals"</span>
</pre>
</div>
<div id="outline-container-orgd297c1e" class="outline-2">
<h2 id="orgd297c1e"><span class="section-number-2">1</span> Frozen core</h2>
<div id="outline-container-org353e188" class="outline-2">
<h2 id="org353e188"><span class="section-number-2">1</span> Frozen core</h2>
<div class="outline-text-2" id="text-1">
<p>
Defines how the core electrons are frozen, for each atom.
</p>
</div>
<div id="outline-container-orgeb2eaff" class="outline-3">
<h3 id="orgeb2eaff"><span class="section-number-3">1.1</span> Type</h3>
<div id="outline-container-org80ba5eb" class="outline-3">
<h3 id="org80ba5eb"><span class="section-number-3">1.1</span> Type</h3>
<div class="outline-text-3" id="text-1-1">
<div class="org-src-container">
<pre class="src src-ocaml" id="orgec8a3c0"><span class="org-tuareg-font-lock-governing">type</span> <span class="org-type">kind</span> <span class="org-tuareg-font-lock-operator">=</span>
<pre class="src src-ocaml" id="org5b3a866"><span class="org-tuareg-font-lock-governing">type</span> <span class="org-type">kind</span> <span class="org-tuareg-font-lock-operator">=</span>
<span class="org-tuareg-font-lock-operator">|</span> <span class="org-tuareg-font-lock-constructor">All_electron</span>
<span class="org-tuareg-font-lock-operator">|</span> <span class="org-tuareg-font-lock-constructor">Small</span>
<span class="org-tuareg-font-lock-operator">|</span> Large
@ -272,8 +272,8 @@ Defines how the core electrons are frozen, for each atom.
</div>
</div>
<div id="outline-container-org80a3f74" class="outline-3">
<h3 id="org80a3f74"><span class="section-number-3">1.2</span> Creation</h3>
<div id="outline-container-org313e780" class="outline-3">
<h3 id="org313e780"><span class="section-number-3">1.2</span> Creation</h3>
<div class="outline-text-3" id="text-1-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">make</span> <span class="org-tuareg-font-lock-operator">:</span> kind <span class="org-tuareg-font-lock-operator">-&gt;</span> <span class="org-tuareg-font-lock-module">Particles.Nuclei.</span>t <span class="org-tuareg-font-lock-operator">-&gt;</span> t
@ -309,7 +309,7 @@ Defines how the core electrons are frozen, for each atom.
</tbody>
</table>
<pre class="example" id="org2ee1cdc">
<pre class="example" id="orgc7e33cb">
let f = Frozen_core.(make Small nuclei) ;;
val f : Frozen_core.t = [|0; 2; 2; 0|]
@ -319,8 +319,8 @@ val f : Frozen_core.t = [|0; 2; 2; 0|]
</div>
</div>
<div id="outline-container-orgc9563c7" class="outline-3">
<h3 id="orgc9563c7"><span class="section-number-3">1.3</span> Access</h3>
<div id="outline-container-org7cd11a0" class="outline-3">
<h3 id="org7cd11a0"><span class="section-number-3">1.3</span> Access</h3>
<div class="outline-text-3" id="text-1-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">num_elec</span> <span class="org-tuareg-font-lock-operator">:</span> t <span class="org-tuareg-font-lock-operator">-&gt;</span> int
@ -349,7 +349,7 @@ val f : Frozen_core.t = [|0; 2; 2; 0|]
</tbody>
</table>
<pre class="example" id="org2dbaeb1">
<pre class="example" id="orge7971ab">
Frozen_core.num_elec f ;;
- : int = 4
@ -359,8 +359,8 @@ Frozen_core.num_mos f ;;
</div>
</div>
<div id="outline-container-orgb3d6d1d" class="outline-3">
<h3 id="orgb3d6d1d"><span class="section-number-3">1.4</span> Printers</h3>
<div id="outline-container-org3333e7f" class="outline-3">
<h3 id="org3333e7f"><span class="section-number-3">1.4</span> Printers</h3>
<div class="outline-text-3" id="text-1-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
@ -372,7 +372,7 @@ Frozen_core.num_mos f ;;
</div>
<div id="postamble" class="status">
<p class="author">Author: Anthony Scemama</p>
<p class="date">Created: 2021-01-04 Mon 23:32</p>
<p class="date">Created: 2021-01-07 Thu 09:10</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-01-04 Mon 23:32 -->
<!-- 2021-01-07 Thu 09:10 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Common</title>
@ -251,75 +251,75 @@
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#orgd026c0b">1. Electrons</a>
<li><a href="#org4a56e32">1. Electrons</a>
<ul>
<li><a href="#org78fdf96">1.1. Type</a></li>
<li><a href="#orgfb45c28">1.2. Creation</a></li>
<li><a href="#orgf3d89c9">1.3. Access</a></li>
<li><a href="#orga3177e1">1.4. Printers</a></li>
<li><a href="#org063ae8a">1.5. Tests</a></li>
<li><a href="#orgdc40278">1.1. Type</a></li>
<li><a href="#org9bccf4d">1.2. Creation</a></li>
<li><a href="#org2a0877e">1.3. Access</a></li>
<li><a href="#org5884747">1.4. Printers</a></li>
<li><a href="#orga9ed18c">1.5. Tests</a></li>
</ul>
</li>
<li><a href="#org37e44c4">2. Element</a>
<li><a href="#org69713dc">2. Element</a>
<ul>
<li><a href="#org44a24ef">2.1. Type</a></li>
<li><a href="#org3151341">2.2. Conversion</a></li>
<li><a href="#orgd001261">2.3. Database information</a></li>
<li><a href="#org94fee9c">2.4. Printers</a></li>
<li><a href="#org6215a28">2.1. Type</a></li>
<li><a href="#orge28cfdc">2.2. Conversion</a></li>
<li><a href="#orgc7c2a05">2.3. Database information</a></li>
<li><a href="#org79cee24">2.4. Printers</a></li>
</ul>
</li>
<li><a href="#orgfc124fd">3. Atomic mass</a></li>
<li><a href="#orgcd7e408">4. Nuclei</a>
<li><a href="#org1195826">3. Atomic mass</a></li>
<li><a href="#org8b815c1">4. Nuclei</a>
<ul>
<li><a href="#org0691df2">4.1. Type</a></li>
<li><a href="#org8e208d0">4.2. xyz file lexer/parser</a>
<li><a href="#org7bba6ad">4.1. Type</a></li>
<li><a href="#org3a3515a">4.2. xyz file lexer/parser</a>
<ul>
<li><a href="#orgc268a5a">4.2.1. Lexer</a></li>
<li><a href="#orgde4d7fe">4.2.2. Parser</a></li>
<li><a href="#org922119a">4.2.1. Lexer</a></li>
<li><a href="#org915bfcd">4.2.2. Parser</a></li>
</ul>
</li>
<li><a href="#org8e73084">4.3. Conversion</a></li>
<li><a href="#org4f3e29a">4.4. <span class="todo TODO">TODO</span> Query</a></li>
<li><a href="#org2ee319b">4.5. Printers</a></li>
<li><a href="#org786f8b3">4.6. Tests</a></li>
<li><a href="#org04a93d0">4.3. Conversion</a></li>
<li><a href="#org8a9faf6">4.4. <span class="todo TODO">TODO</span> Query</a></li>
<li><a href="#orgca89a9a">4.5. Printers</a></li>
<li><a href="#orgb58b45a">4.6. Tests</a></li>
</ul>
</li>
<li><a href="#org504bab1">5. Z-matrix</a>
<li><a href="#orge5eeeb2">5. Z-matrix</a>
<ul>
<li><a href="#org6d42fe8">5.1. Type</a></li>
<li><a href="#orgdd6e9d8">5.2. Conversion</a></li>
<li><a href="#orgbeffa84">5.3. Printers</a></li>
<li><a href="#org25fe90a">5.1. Type</a></li>
<li><a href="#org8691da7">5.2. Conversion</a></li>
<li><a href="#orgb88a055">5.3. Printers</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="org-src-container">
<pre class="src src-ocaml" id="org1dcfffd"><span class="org-string">"Information relative to particles (electrons and nuclei)."</span>
<pre class="src src-ocaml" id="org3f026d7"><span class="org-string">"Information relative to particles (electrons and nuclei)."</span>
</pre>
</div>
<div id="outline-container-orgd026c0b" class="outline-2">
<h2 id="orgd026c0b"><span class="section-number-2">1</span> Electrons</h2>
<div id="outline-container-org4a56e32" class="outline-2">
<h2 id="org4a56e32"><span class="section-number-2">1</span> Electrons</h2>
<div class="outline-text-2" id="text-1">
<p>
Data structure which contains the number of &alpha; and &beta; electrons.
</p>
</div>
<div id="outline-container-org78fdf96" class="outline-3">
<h3 id="org78fdf96"><span class="section-number-3">1.1</span> Type</h3>
<div id="outline-container-orgdc40278" class="outline-3">
<h3 id="orgdc40278"><span class="section-number-3">1.1</span> Type</h3>
<div class="outline-text-3" id="text-1-1">
<div class="org-src-container">
<pre class="src src-ocaml" id="org1875bfe"><span class="org-tuareg-font-lock-governing">type</span> <span class="org-type">t</span>
<pre class="src src-ocaml" id="org1481732"><span class="org-tuareg-font-lock-governing">type</span> <span class="org-type">t</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgfb45c28" class="outline-3">
<h3 id="orgfb45c28"><span class="section-number-3">1.2</span> Creation</h3>
<div id="outline-container-org9bccf4d" class="outline-3">
<h3 id="org9bccf4d"><span class="section-number-3">1.2</span> Creation</h3>
<div class="outline-text-3" id="text-1-2">
<div class="org-src-container">
<pre class="src src-ocaml"><span class="org-tuareg-font-lock-governing">open </span><span class="org-tuareg-font-lock-module">Common</span>
@ -358,8 +358,8 @@ Data structure which contains the number of &alpha; and &beta; electrons.
</div>
</div>
<div id="outline-container-orgf3d89c9" class="outline-3">
<h3 id="orgf3d89c9"><span class="section-number-3">1.3</span> Access</h3>
<div id="outline-container-org2a0877e" class="outline-3">
<h3 id="org2a0877e"><span class="section-number-3">1.3</span> Access</h3>
<div class="outline-text-3" id="text-1-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">charge</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">Charge.</span>t
@ -408,8 +408,8 @@ Data structure which contains the number of &alpha; and &beta; electrons.
</div>
</div>
<div id="outline-container-orga3177e1" class="outline-3">
<h3 id="orga3177e1"><span class="section-number-3">1.4</span> Printers</h3>
<div id="outline-container-org5884747" class="outline-3">
<h3 id="org5884747"><span class="section-number-3">1.4</span> Printers</h3>
<div class="outline-text-3" id="text-1-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
@ -418,24 +418,24 @@ Data structure which contains the number of &alpha; and &beta; electrons.
</div>
</div>
<div id="outline-container-org063ae8a" class="outline-3">
<h3 id="org063ae8a"><span class="section-number-3">1.5</span> Tests</h3>
<div id="outline-container-orga9ed18c" class="outline-3">
<h3 id="orga9ed18c"><span class="section-number-3">1.5</span> Tests</h3>
</div>
</div>
<div id="outline-container-org37e44c4" class="outline-2">
<h2 id="org37e44c4"><span class="section-number-2">2</span> Element</h2>
<div id="outline-container-org69713dc" class="outline-2">
<h2 id="org69713dc"><span class="section-number-2">2</span> Element</h2>
<div class="outline-text-2" id="text-2">
<p>
Chemical elements.
</p>
</div>
<div id="outline-container-org44a24ef" class="outline-3">
<h3 id="org44a24ef"><span class="section-number-3">2.1</span> Type</h3>
<div id="outline-container-org6215a28" class="outline-3">
<h3 id="org6215a28"><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" id="orgbf03032"><span class="org-tuareg-font-lock-governing">type</span> <span class="org-type">t</span> <span class="org-tuareg-font-lock-operator">=</span>
<pre class="src src-ocaml" id="org50fac02"><span class="org-tuareg-font-lock-governing">type</span> <span class="org-type">t</span> <span class="org-tuareg-font-lock-operator">=</span>
<span class="org-tuareg-font-lock-operator">|</span><span class="org-tuareg-font-lock-constructor">X</span>
<span class="org-tuareg-font-lock-operator">|</span><span class="org-tuareg-font-lock-constructor">H</span> <span class="org-tuareg-font-lock-operator">|</span><span class="org-tuareg-font-lock-constructor">He</span>
<span class="org-tuareg-font-lock-operator">|</span><span class="org-tuareg-font-lock-constructor">Li</span><span class="org-tuareg-font-lock-operator">|</span><span class="org-tuareg-font-lock-constructor">Be</span> <span class="org-tuareg-font-lock-operator">|</span><span class="org-tuareg-font-lock-constructor">B</span> <span class="org-tuareg-font-lock-operator">|</span><span class="org-tuareg-font-lock-constructor">C</span> <span class="org-tuareg-font-lock-operator">|</span><span class="org-tuareg-font-lock-constructor">N</span> <span class="org-tuareg-font-lock-operator">|</span><span class="org-tuareg-font-lock-constructor">O</span> <span class="org-tuareg-font-lock-operator">|</span><span class="org-tuareg-font-lock-constructor">F</span> <span class="org-tuareg-font-lock-operator">|</span><span class="org-tuareg-font-lock-constructor">Ne</span>
@ -452,8 +452,8 @@ Chemical elements.
</div>
</div>
<div id="outline-container-org3151341" class="outline-3">
<h3 id="org3151341"><span class="section-number-3">2.2</span> Conversion</h3>
<div id="outline-container-orge28cfdc" class="outline-3">
<h3 id="orge28cfdc"><span class="section-number-3">2.2</span> Conversion</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">of_string</span> <span class="org-tuareg-font-lock-operator">:</span> string <span class="org-tuareg-font-lock-operator">-&gt;</span> t
@ -514,7 +514,7 @@ Chemical elements.
</tbody>
</table>
<pre class="example" id="org9de730e">
<pre class="example" id="org49d5374">
Element.of_string "Fe" ;;
- : Element.t = Particles.Element.Fe
@ -533,8 +533,8 @@ Element.(to_string Fe);;
</div>
</div>
<div id="outline-container-orgd001261" class="outline-3">
<h3 id="orgd001261"><span class="section-number-3">2.3</span> Database information</h3>
<div id="outline-container-orgc7c2a05" class="outline-3">
<h3 id="orgc7c2a05"><span class="section-number-3">2.3</span> Database information</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">covalent_radius</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">Non_negative_float.</span>t
@ -583,8 +583,8 @@ Element.(to_string Fe);;
</div>
</div>
<div id="outline-container-org94fee9c" class="outline-3">
<h3 id="org94fee9c"><span class="section-number-3">2.4</span> Printers</h3>
<div id="outline-container-org79cee24" class="outline-3">
<h3 id="org79cee24"><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
@ -595,30 +595,30 @@ Element.(to_string Fe);;
</div>
</div>
<div id="outline-container-orgfc124fd" class="outline-2">
<h2 id="orgfc124fd"><span class="section-number-2">3</span> Atomic mass</h2>
<div id="outline-container-org1195826" class="outline-2">
<h2 id="org1195826"><span class="section-number-2">3</span> Atomic mass</h2>
<div class="outline-text-2" id="text-3">
<p>
Atomic mass, a non-negative float.
</p>
<div class="org-src-container">
<pre class="src src-ocaml" id="orgbca64fa"><span class="org-tuareg-font-lock-governing">include</span> <span class="org-tuareg-font-lock-governing">module type of</span> <span class="org-tuareg-font-lock-module">Common.Non_negative_float</span>
<pre class="src src-ocaml" id="org0781dc6"><span class="org-tuareg-font-lock-governing">include</span> <span class="org-tuareg-font-lock-governing">module type of</span> <span class="org-tuareg-font-lock-module">Common.Non_negative_float</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgcd7e408" class="outline-2">
<h2 id="orgcd7e408"><span class="section-number-2">4</span> Nuclei</h2>
<div id="outline-container-org8b815c1" class="outline-2">
<h2 id="org8b815c1"><span class="section-number-2">4</span> Nuclei</h2>
<div class="outline-text-2" id="text-4">
</div>
<div id="outline-container-org0691df2" class="outline-3">
<h3 id="org0691df2"><span class="section-number-3">4.1</span> Type</h3>
<div id="outline-container-org7bba6ad" class="outline-3">
<h3 id="org7bba6ad"><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" id="org0668b4e"><span class="org-tuareg-font-lock-governing">open </span><span class="org-tuareg-font-lock-module">Common</span>
<pre class="src src-ocaml" id="orgce6c71b"><span class="org-tuareg-font-lock-governing">open </span><span class="org-tuareg-font-lock-module">Common</span>
<span class="org-tuareg-font-lock-governing">type</span> <span class="org-type">t</span> <span class="org-tuareg-font-lock-operator">=</span> <span class="org-tuareg-font-lock-operator">(</span><span class="org-tuareg-font-lock-module">Element.</span>t <span class="org-tuareg-font-lock-operator">*</span> <span class="org-tuareg-font-lock-module">Coordinate.</span>t<span class="org-tuareg-font-lock-operator">)</span> array
</pre>
@ -626,12 +626,12 @@ Atomic mass, a non-negative float.
</div>
</div>
<div id="outline-container-org8e208d0" class="outline-3">
<h3 id="org8e208d0"><span class="section-number-3">4.2</span> xyz file lexer/parser</h3>
<div id="outline-container-org3a3515a" class="outline-3">
<h3 id="org3a3515a"><span class="section-number-3">4.2</span> xyz file lexer/parser</h3>
<div class="outline-text-3" id="text-4-2">
</div>
<div id="outline-container-orgc268a5a" class="outline-4">
<h4 id="orgc268a5a"><span class="section-number-4">4.2.1</span> Lexer</h4>
<div id="outline-container-org922119a" class="outline-4">
<h4 id="org922119a"><span class="section-number-4">4.2.1</span> Lexer</h4>
<div class="outline-text-4" id="text-4-2-1">
<p>
<code>nuclei_lexer.mll</code> contains the description of the lexemes used in
@ -684,8 +684,8 @@ rule read_all <span class="org-tuareg-font-lock-operator">=</span> parse
</div>
</div>
<div id="outline-container-orgde4d7fe" class="outline-4">
<h4 id="orgde4d7fe"><span class="section-number-4">4.2.2</span> Parser</h4>
<div id="outline-container-org915bfcd" class="outline-4">
<h4 id="org915bfcd"><span class="section-number-4">4.2.2</span> Parser</h4>
<div class="outline-text-4" id="text-4-2-2">
<p>
<code>xyz_parser.mly</code> parses nuclear coordinates in xyz format.
@ -804,8 +804,8 @@ an <code>xyz_file</code> data structure.
</div>
</div>
<div id="outline-container-org8e73084" class="outline-3">
<h3 id="org8e73084"><span class="section-number-3">4.3</span> Conversion</h3>
<div id="outline-container-org04a93d0" class="outline-3">
<h3 id="org04a93d0"><span class="section-number-3">4.3</span> Conversion</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">of_xyz_string</span> <span class="org-tuareg-font-lock-operator">:</span> string <span class="org-tuareg-font-lock-operator">-&gt;</span> t
@ -864,8 +864,8 @@ an <code>xyz_file</code> data structure.
</div>
</div>
<div id="outline-container-org4f3e29a" class="outline-3">
<h3 id="org4f3e29a"><span class="section-number-3">4.4</span> <span class="todo TODO">TODO</span> Query</h3>
<div id="outline-container-org8a9faf6" class="outline-3">
<h3 id="org8a9faf6"><span class="section-number-3">4.4</span> <span class="todo TODO">TODO</span> Query</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">formula</span> <span class="org-tuareg-font-lock-operator">:</span> t <span class="org-tuareg-font-lock-operator">-&gt;</span> string
@ -914,8 +914,8 @@ an <code>xyz_file</code> data structure.
</div>
</div>
<div id="outline-container-org2ee319b" class="outline-3">
<h3 id="org2ee319b"><span class="section-number-3">4.5</span> Printers</h3>
<div id="outline-container-orgca89a9a" class="outline-3">
<h3 id="orgca89a9a"><span class="section-number-3">4.5</span> Printers</h3>
<div class="outline-text-3" id="text-4-5">
<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
@ -924,31 +924,31 @@ an <code>xyz_file</code> data structure.
</div>
</div>
<div id="outline-container-org786f8b3" class="outline-3">
<h3 id="org786f8b3"><span class="section-number-3">4.6</span> Tests</h3>
<div id="outline-container-orgb58b45a" class="outline-3">
<h3 id="orgb58b45a"><span class="section-number-3">4.6</span> Tests</h3>
</div>
</div>
<div id="outline-container-org504bab1" class="outline-2">
<h2 id="org504bab1"><span class="section-number-2">5</span> Z-matrix</h2>
<div id="outline-container-orge5eeeb2" class="outline-2">
<h2 id="orge5eeeb2"><span class="section-number-2">5</span> Z-matrix</h2>
<div class="outline-text-2" id="text-5">
<p>
Z-matrix representation of nuclear coordinates.
</p>
</div>
<div id="outline-container-org6d42fe8" class="outline-3">
<h3 id="org6d42fe8"><span class="section-number-3">5.1</span> Type</h3>
<div id="outline-container-org25fe90a" class="outline-3">
<h3 id="org25fe90a"><span class="section-number-3">5.1</span> Type</h3>
<div class="outline-text-3" id="text-5-1">
<div class="org-src-container">
<pre class="src src-ocaml" id="orga11fab8"><span class="org-tuareg-font-lock-governing">type</span> <span class="org-type">t</span>
<pre class="src src-ocaml" id="org759389e"><span class="org-tuareg-font-lock-governing">type</span> <span class="org-type">t</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgdd6e9d8" class="outline-3">
<h3 id="orgdd6e9d8"><span class="section-number-3">5.2</span> Conversion</h3>
<div id="outline-container-org8691da7" class="outline-3">
<h3 id="org8691da7"><span class="section-number-3">5.2</span> Conversion</h3>
<div class="outline-text-3" id="text-5-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">of_string</span> <span class="org-tuareg-font-lock-operator">:</span> string <span class="org-tuareg-font-lock-operator">-&gt;</span> t
@ -983,7 +983,7 @@ Z-matrix representation of nuclear coordinates.
</tbody>
</table>
<pre class="example" id="org3091e3e">
<pre class="example" id="orgab6c45a">
let zmt = Zmatrix.of_string "
n
n 1 nn
@ -1028,8 +1028,8 @@ H -0.568803 -0.793910 1.726048"
</div>
<div id="outline-container-orgbeffa84" class="outline-3">
<h3 id="orgbeffa84"><span class="section-number-3">5.3</span> Printers</h3>
<div id="outline-container-orgb88a055" class="outline-3">
<h3 id="orgb88a055"><span class="section-number-3">5.3</span> Printers</h3>
<div class="outline-text-3" id="text-5-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">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
@ -1041,7 +1041,7 @@ H -0.568803 -0.793910 1.726048"
</div>
<div id="postamble" class="status">
<p class="author">Author: Anthony Scemama</p>
<p class="date">Created: 2021-01-04 Mon 23:32</p>
<p class="date">Created: 2021-01-07 Thu 09:10</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-01-04 Mon 23:32 -->
<!-- 2021-01-07 Thu 09:10 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Perturbation</title>
@ -229,31 +229,31 @@
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#orgf1e9352">1. MP2</a>
<li><a href="#org92cb6cc">1. MP2</a>
<ul>
<li><a href="#orgca78e95">1.1. Type</a></li>
<li><a href="#orgf79c50f">1.2. Creation</a></li>
<li><a href="#org581cae2">1.3. Access</a></li>
<li><a href="#org1216130">1.4. Printers</a></li>
<li><a href="#org8d007c7">1.5. Tests</a></li>
<li><a href="#org6070c92">1.1. Type</a></li>
<li><a href="#org1425a1d">1.2. Creation</a></li>
<li><a href="#org5bca821">1.3. Access</a></li>
<li><a href="#orgc5aaf2b">1.4. Printers</a></li>
<li><a href="#org4355fa2">1.5. Tests</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="org-src-container">
<pre class="src src-ocaml" id="orgf8d8b0a"><span class="org-string">"Perturbation theory"</span>
<pre class="src src-ocaml" id="org3f49b15"><span class="org-string">"Perturbation theory"</span>
</pre>
</div>
<div id="outline-container-orgf1e9352" class="outline-2">
<h2 id="orgf1e9352"><span class="section-number-2">1</span> MP2</h2>
<div id="outline-container-org92cb6cc" class="outline-2">
<h2 id="org92cb6cc"><span class="section-number-2">1</span> MP2</h2>
<div class="outline-text-2" id="text-1">
</div>
<div id="outline-container-orgca78e95" class="outline-3">
<h3 id="orgca78e95"><span class="section-number-3">1.1</span> Type</h3>
<div id="outline-container-org6070c92" class="outline-3">
<h3 id="org6070c92"><span class="section-number-3">1.1</span> Type</h3>
<div class="outline-text-3" id="text-1-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>
@ -262,8 +262,8 @@
</div>
</div>
<div id="outline-container-orgf79c50f" class="outline-3">
<h3 id="orgf79c50f"><span class="section-number-3">1.2</span> Creation</h3>
<div id="outline-container-org1425a1d" class="outline-3">
<h3 id="org1425a1d"><span class="section-number-3">1.2</span> Creation</h3>
<div class="outline-text-3" id="text-1-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">make</span> <span class="org-tuareg-font-lock-operator">:</span> <span class="org-tuareg-font-lock-label">frozen_core</span><span class="org-tuareg-font-lock-operator">:</span><span class="org-tuareg-font-lock-module">Mo.Frozen_core.</span>t <span class="org-tuareg-font-lock-operator">-&gt;</span> <span class="org-tuareg-font-lock-module">Mo.Basis.</span>t <span class="org-tuareg-font-lock-operator">-&gt;</span> t
@ -286,7 +286,7 @@
</tbody>
</table>
<pre class="example" id="org75b4482">
<pre class="example" id="orgb8185ad">
let mp2 =
Perturbation.Mp2.make ~frozen_core:(Mo.Frozen_core.(make Small nuclei)) mo_basis
;;
@ -295,8 +295,8 @@ val mp2 : Perturbation.Mp2.t = E(MP2)=-0.185523
</div>
</div>
<div id="outline-container-org581cae2" class="outline-3">
<h3 id="org581cae2"><span class="section-number-3">1.3</span> Access</h3>
<div id="outline-container-org5bca821" class="outline-3">
<h3 id="org5bca821"><span class="section-number-3">1.3</span> Access</h3>
<div class="outline-text-3" id="text-1-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">energy</span> <span class="org-tuareg-font-lock-operator">:</span> t <span class="org-tuareg-font-lock-operator">-&gt;</span> float
@ -331,14 +331,14 @@ val mp2 : Perturbation.Mp2.t = E(MP2)=-0.185523
</tbody>
</table>
<pre class="example" id="org36fac7f">
<pre class="example" id="orgc7da836">
</pre>
</div>
</div>
<div id="outline-container-org1216130" class="outline-3">
<h3 id="org1216130"><span class="section-number-3">1.4</span> Printers</h3>
<div id="outline-container-orgc5aaf2b" class="outline-3">
<h3 id="orgc5aaf2b"><span class="section-number-3">1.4</span> Printers</h3>
<div class="outline-text-3" id="text-1-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
@ -347,14 +347,14 @@ val mp2 : Perturbation.Mp2.t = E(MP2)=-0.185523
</div>
</div>
<div id="outline-container-org8d007c7" class="outline-3">
<h3 id="org8d007c7"><span class="section-number-3">1.5</span> Tests</h3>
<div id="outline-container-org4355fa2" class="outline-3">
<h3 id="org4355fa2"><span class="section-number-3">1.5</span> Tests</h3>
</div>
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: Anthony Scemama</p>
<p class="date">Created: 2021-01-04 Mon 23:32</p>
<p class="date">Created: 2021-01-07 Thu 09:10</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-01-06 Wed 09:03 -->
<!-- 2021-01-07 Thu 09:20 -->
<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>
@ -226,13 +226,13 @@
<div id="content">
<h1 class="title">Top-level</h1>
<div class="org-src-container">
<pre class="src src-ocaml" id="org6726456"><span class="org-string">"Installs pretty printers for top-level."</span>
<pre class="src src-ocaml" id="org1883438"><span class="org-string">"Installs pretty printers for top-level."</span>
</pre>
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: Anthony Scemama</p>
<p class="date">Created: 2021-01-06 Wed 09:03</p>
<p class="date">Created: 2021-01-07 Thu 09:20</p>
<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>

View File

@ -48,15 +48,15 @@ open Common
open Common
type t = {
expo : float array array;
coef : float array array;
norm_coef : float array array;
norm_coef_scale : float array;
contr : Contracted_shell.t array;
index : int;
center : Coordinate.t;
ang_mom : Angular_momentum.t;
}
expo : float array array;
coef : float array array;
norm_coef : float array array;
norm_coef_scale : float array;
contr : Contracted_shell.t array;
index : int;
center : Coordinate.t;
ang_mom : Angular_momentum.t;
}
module Am = Angular_momentum
module Co = Coordinate
@ -66,99 +66,57 @@ module Cs = Contracted_shell
** Access
#+begin_src ocaml :tangle (eval mli)
val index : t -> int
(** Index in the basis set, represented as an array of contracted shells. *)
val center : t -> Coordinate.t
(** Coordinate of the center {% $\mathbf{A} = (X_A,Y_A,Z_A)$ %}. *)
val ang_mom : t -> Angular_momentum.t
(** Total angular momentum : {% $l = n_x + n_y + n_z$ %}. *)
val size : t -> int
(** Number of contracted functions, {% $n$ %} in the definition. *)
val contracted_shells: t -> Contracted_shell.t array
(** Array of contracted gaussians *)
val exponents : t -> float array array
(** Array of exponents {% $\alpha_{ij}$ %}. The first index is the index of
the contracted function, and the second index is the index of the primitive.
*)
val coefficients : t -> float array array
(** Array of contraction coefficients {% $d_{ij}$ %}. The first index is the index of
the contracted function, and the second index is the index of the primitive.
*)
val normalizations : t -> float array array
(** Normalization coefficients {% $\mathcal{N}_{ij}$ %}. The first index is the index of
the contracted function, and the second index is the index of the primitive.
*)
val norm_scales : t -> float array
(** Scaling factors {% $f(n_x,n_y,n_z)$ %}, given in the same order as
[Angular_momentum.zkey_array ang_mom]. *)
val size_of_shell : t -> int
(** Number of contracted functions in the shell: length of {!norm_coef_scale}. *)
val ang_mom : t -> Angular_momentum.t
val center : t -> Coordinate.t
val coefficients : t -> float array array
val contracted_shells : t -> Contracted_shell.t array
val exponents : t -> float array array
val index : t -> int
val normalizations : t -> float array array
val norm_scales : t -> float array
val size_of_shell : t -> int
val size : t -> int
#+end_src
| ~index~ | Index in the basis set, represented as an array of contracted shells. |
| ~center~ | Coordinate of the center $\mathbf{A} = (X_A,Y_A,Z_A)$. |
| ~ang_mom~ | Total angular momentum : $l = n_x + n_y + n_z$. |
| ~size~ | Number of contracted functions, $n$ in the definition. |
| ~contracted_shells:~ | Array of contracted gaussians |
| ~exponents~ | Array of exponents $\alpha_{ij}$. The first index is the index of the contracted function, and the second index is the index of the primitive. |
| ~coefficients~ | Array of contraction coefficients $d_{ij}$. The first index is the index of the contracted function, and the second index is the index of the primitive. |
| ~normalizations~ | Normalization coefficients $\mathcal{N}_{ij}$. The first index is the index of the contracted function, and the second index is the index of the primitive. |
| ~norm_scales~ | Scaling factors $f(n_x,n_y,n_z)$, given in the same order as ~Angular_momentum.zkey_array ang_mom~. |
| ~size_of_shell~ | Number of contracted functions in the shell: length of ~norm_coef_scale~. |
| ~ang_mom~ | Total angular momentum : $l = n_x + n_y + n_z$. |
| ~center~ | Coordinate of the center $\mathbf{A} = (X_A,Y_A,Z_A)$. |
| ~coefficients~ | Array of contraction coefficients $d_{ij}$. The first index is the index of the contracted function, and the second index is the index of the primitive. |
| ~contracted_shells:~ | Array of contracted gaussians |
| ~exponents~ | Array of exponents $\alpha_{ij}$. The first index is the index of the contracted function, and the second index is the index of the primitive. |
| ~index~ | Index in the basis set, represented as an array of contracted shells. |
| ~normalizations~ | Normalization coefficients $\mathcal{N}_{ij}$. The first index is the index of the contracted function, and the second index is the index of the primitive. |
| ~norm_scales~ | Scaling factors $f(n_x,n_y,n_z)$, given in the same order as ~Angular_momentum.zkey_array ang_mom~. |
| ~size~ | Number of contracted functions, $n$ in the definition. |
| ~size_of_shell~ | Number of contracted functions in the shell: length of ~norm_coef_scale~. |
#+begin_example
#+end_example
#+begin_src ocaml :tangle (eval ml) :exports none
let exponents x = x.expo
let coefficients x = x.coef
let center x = x.center
let ang_mom x = x.ang_mom
let size x = Array.length x.contr
let normalizations x = x.norm_coef
let norm_scales x = x.norm_coef_scale
let index x = x.index
let size_of_shell x = Array.length x.norm_coef_scale
let contracted_shells x = x.contr
let ang_mom t = t.ang_mom
let center t = t.center
let coefficients t = t.coef
let contracted_shells t = t.contr
let exponents t = t.expo
let index t = t.index
let normalizations t = t.norm_coef
let norm_scales t = t.norm_coef_scale
let size_of_shell t = Array.length t.norm_coef_scale
let size t = Array.length t.contr
#+end_src
** Creation
#+begin_src ocaml :tangle (eval mli)
val make : ?index:int -> Contracted_shell.t array -> t
(** Creates a contracted shell from a list of coefficients and primitives. *)
val with_index : t -> int -> t
(** Returns a copy of the contracted shell with a modified index. *)
#+end_src
| ~make~ | Creates a contracted shell from a list of coefficients and primitives. |
| ~with_index~ | Returns a copy of the contracted shell with a modified index. |
#+begin_example
#+end_example
#+begin_src ocaml :tangle (eval ml) :exports none
let make ?(index=0) contr =
assert (Array.length contr > 0);
@ -169,20 +127,20 @@ let make ?(index=0) contr =
let center = Cs.center contr.(0) in
let rec unique_center = function
| 0 -> true
| i -> if Cs.center contr.(i) = center then (unique_center [@tailcall]) (i-1) else false
| 0 -> true
| i -> if Cs.center contr.(i) = center then (unique_center [@tailcall]) (i-1) else false
in
if not (unique_center (Array.length contr - 1)) then
invalid_arg "ContractedAtomicShell.make Coordinate.t differ";
let ang_mom = Cs.ang_mom contr.(0) in
let rec unique_angmom = function
| 0 -> true
| i -> if Cs.ang_mom contr.(i) = ang_mom then (unique_angmom [@tailcall]) (i-1) else false
| 0 -> true
| i -> if Cs.ang_mom contr.(i) = ang_mom then (unique_angmom [@tailcall]) (i-1) else false
in
if not (unique_angmom (Array.length contr - 1)) then
invalid_arg "Contracted_shell.make: Angular_momentum.t differ";
let norm_coef =
Array.map Cs.normalizations contr
in
@ -209,9 +167,9 @@ let pp ppf s =
fprintf ppf "@[%3d-%-3d@]" (s.index+1) (s.index+ (size_of_shell s)*(size s));
fprintf ppf "@[%a@ %a@] @[" Am.pp_string s.ang_mom Co.pp s.center;
Array.iter2 (fun e_arr c_arr -> fprintf ppf "@[<v>";
Array.iter2 (fun e c -> fprintf ppf "@[%16.8e %16.8e@]@;" e c)
e_arr c_arr;
fprintf ppf "@;@]") s.expo s.coef;
Array.iter2 (fun e c -> fprintf ppf "@[%16.8e %16.8e@]@;" e c)
e_arr c_arr;
fprintf ppf "@;@]") s.expo s.coef;
fprintf ppf "@]"
#+end_src

View File

@ -0,0 +1,168 @@
#+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
* Atomic shell pair couple
:PROPERTIES:
:header-args: :noweb yes :comments both
:END:
An atomic shell pair couple is the cartesian product between two sets of functions, one
set over electron one and one set over electron two. Both sets are atomic shell
pairs.
These are usually called /shell quartets/ in the literature, but we prefer to use
/pair/ for two functions with the same electron, and /couple/ for two functions
acting on different electrons, since they will be coupled by a two-electron operator.
** Type
#+begin_src ocaml :tangle (eval mli)
type t
open Common
#+end_src
#+begin_src ocaml :tangle (eval ml) :exports none
open Common
type t =
{
contracted_shell_pair_couples : Contracted_shell_pair_couple.t list ;
atomic_shell_pair_p: Atomic_shell_pair.t ;
atomic_shell_pair_q: Atomic_shell_pair.t ;
atomic_shell_a : Atomic_shell.t ;
atomic_shell_b : Atomic_shell.t ;
atomic_shell_c : Atomic_shell.t ;
atomic_shell_d : Atomic_shell.t ;
ang_mom : Angular_momentum.t ;
}
module Am = Angular_momentum
module Co = Coordinate
module As = Atomic_shell
module Asp = Atomic_shell_pair
module Cspc = Contracted_shell_pair_couple
#+end_src
** Access
#+begin_src ocaml :tangle (eval mli)
val ang_mom : t -> Angular_momentum.t
val atomic_shell_a : t -> Atomic_shell.t
val atomic_shell_b : t -> Atomic_shell.t
val atomic_shell_c : t -> Atomic_shell.t
val atomic_shell_d : t -> Atomic_shell.t
val atomic_shell_pair_p : t -> Atomic_shell_pair.t
val atomic_shell_pair_q : t -> Atomic_shell_pair.t
val contracted_shell_pair_couples : t -> Contracted_shell_pair_couple.t list
val monocentric : t -> bool
val norm_scales : t -> float array
val zkey_array : t -> Zkey.t array
#+end_src
| ~ang_mom~ | Total angular momentum of the shell pair couple: sum of the angular momenta of all the shells. |
| ~atomic_shell_a~ | Returns the first atomic shell of the first shell pair. |
| ~atomic_shell_b~ | Returns the second atomic shell of the first shell pair. |
| ~atomic_shell_c~ | Returns the first atomic shell of the second shell pair. |
| ~atomic_shell_d~ | Returns the second atomic shell of the second shell pair. |
| ~atomic_shell_pair_p~ | Returns the first atomic shell pair that was used to build the shell pair. |
| ~atomic_shell_pair_q~ | Returns the second atomic shell pair that was used to build the shell pair. |
| ~contracted_shell_pair_couples~ | Returns the list of significant contracted shell pair couples. |
| ~monocentric~ | True if all four atomic shells have the same center. |
| ~norm_scales~ | Scaling factors of normalization coefficients inside the shell. The ordering is the same as ~zkey_array~. |
| ~zkey_array~ | Returns the array of ~Zkey.t~ relative to the four shells of the shell pair couple. |
#+begin_src ocaml :tangle (eval ml) :exports none
let contracted_shell_pair_couples t = t.contracted_shell_pair_couples
let monocentric t =
Asp.monocentric t.atomic_shell_pair_p && Asp.monocentric t.atomic_shell_pair_q &&
As.center (Asp.atomic_shell_a t.atomic_shell_pair_p) = As.center (Asp.atomic_shell_a t.atomic_shell_pair_q)
let ang_mom t = t.ang_mom
let atomic_shell_pair_p t = t.atomic_shell_pair_p
let atomic_shell_pair_q t = t.atomic_shell_pair_q
let atomic_shell_a t = t.atomic_shell_a
let atomic_shell_b t = t.atomic_shell_b
let atomic_shell_c t = t.atomic_shell_c
let atomic_shell_d t = t.atomic_shell_d
let zkey_array t =
match t.contracted_shell_pair_couples with
| f::_ -> Cspc.zkey_array f
| _ -> invalid_arg "AtomicShellPairCouple.zkey_array"
let norm_scales t =
match t.contracted_shell_pair_couples with
| f::_ -> Cspc.norm_scales f
| _ -> invalid_arg "AtomicShellPairCouple.norm_scales"
#+end_src
** Creation
#+begin_src ocaml :tangle (eval mli)
val make : ?cutoff:float -> Atomic_shell_pair.t -> Atomic_shell_pair.t -> t option
#+end_src
Default cutoff is $\epsilon$.
| ~make~ | Creates an atomic shell pair couple using two atomic shell pairs. |
#+begin_example
#+end_example
#+begin_src ocaml :tangle (eval ml) :exports none
let make ?(cutoff=Constants.epsilon) atomic_shell_pair_p atomic_shell_pair_q =
let ang_mom =
Am.(Asp.ang_mom atomic_shell_pair_p + Asp.ang_mom atomic_shell_pair_q)
in
let atomic_shell_a = Asp.atomic_shell_a atomic_shell_pair_p
and atomic_shell_b = Asp.atomic_shell_b atomic_shell_pair_p
and atomic_shell_c = Asp.atomic_shell_a atomic_shell_pair_q
and atomic_shell_d = Asp.atomic_shell_b atomic_shell_pair_q
in
let contracted_shell_pair_couples =
List.concat_map (fun ap_ab ->
List.map (fun ap_cd ->
Cspc.make ~cutoff ap_ab ap_cd
) (Asp.contracted_shell_pairs atomic_shell_pair_q)
) (Asp.contracted_shell_pairs atomic_shell_pair_p)
|> Util.list_some
in
match contracted_shell_pair_couples with
| [] -> None
| _ -> Some { atomic_shell_pair_p ; atomic_shell_pair_q ; ang_mom ;
atomic_shell_a ; atomic_shell_b ; atomic_shell_c ; atomic_shell_d ;
contracted_shell_pair_couples ;
}
#+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 =
Format.fprintf ppf "[(%d,%d),(%d,%d)]"
(Atomic_shell.index t.atomic_shell_a)
(Atomic_shell.index t.atomic_shell_b)
(Atomic_shell.index t.atomic_shell_c)
(Atomic_shell.index t.atomic_shell_d)
#+end_src

View File

@ -2,15 +2,15 @@
open Common
type t = {
expo : float array array;
coef : float array array;
norm_coef : float array array;
norm_coef_scale : float array;
contr : Contracted_shell.t array;
index : int;
center : Coordinate.t;
ang_mom : Angular_momentum.t;
}
expo : float array array;
coef : float array array;
norm_coef : float array array;
norm_coef_scale : float array;
contr : Contracted_shell.t array;
index : int;
center : Coordinate.t;
ang_mom : Angular_momentum.t;
}
module Am = Angular_momentum
module Co = Coordinate
@ -19,52 +19,39 @@ module Cs = Contracted_shell
(* | ~index~ | Index in the basis set, represented as an array of contracted shells. |
(* | ~ang_mom~ | Total angular momentum : $l = n_x + n_y + n_z$. |
* | ~center~ | Coordinate of the center $\mathbf{A} = (X_A,Y_A,Z_A)$. |
* | ~ang_mom~ | Total angular momentum : $l = n_x + n_y + n_z$. |
* | ~size~ | Number of contracted functions, $n$ in the definition. |
* | ~coefficients~ | Array of contraction coefficients $d_{ij}$. The first index is the index of the contracted function, and the second index is the index of the primitive. |
* | ~contracted_shells:~ | Array of contracted gaussians |
* | ~exponents~ | Array of exponents $\alpha_{ij}$. The first index is the index of the contracted function, and the second index is the index of the primitive. |
* | ~coefficients~ | Array of contraction coefficients $d_{ij}$. The first index is the index of the contracted function, and the second index is the index of the primitive. |
* | ~index~ | Index in the basis set, represented as an array of contracted shells. |
* | ~normalizations~ | Normalization coefficients $\mathcal{N}_{ij}$. The first index is the index of the contracted function, and the second index is the index of the primitive. |
* | ~norm_scales~ | Scaling factors $f(n_x,n_y,n_z)$, given in the same order as ~Angular_momentum.zkey_array ang_mom~. |
* | ~size~ | Number of contracted functions, $n$ in the definition. |
* | ~size_of_shell~ | Number of contracted functions in the shell: length of ~norm_coef_scale~. |
*
* #+begin_example
* #+begin_example
*
* #+end_example *)
* #+end_example *)
(* [[file:~/QCaml/gaussian/atomic_shell.org::*Access][Access:2]] *)
let exponents x = x.expo
let coefficients x = x.coef
let center x = x.center
let ang_mom x = x.ang_mom
let size x = Array.length x.contr
let normalizations x = x.norm_coef
let norm_scales x = x.norm_coef_scale
let index x = x.index
let size_of_shell x = Array.length x.norm_coef_scale
let contracted_shells x = x.contr
let ang_mom t = t.ang_mom
let center t = t.center
let coefficients t = t.coef
let contracted_shells t = t.contr
let exponents t = t.expo
let index t = t.index
let normalizations t = t.norm_coef
let norm_scales t = t.norm_coef_scale
let size_of_shell t = Array.length t.norm_coef_scale
let size t = Array.length t.contr
(* Access:2 ends here *)
(* | ~make~ | Creates a contracted shell from a list of coefficients and primitives. |
* | ~with_index~ | Returns a copy of the contracted shell with a modified index. |
*
* #+begin_example
*
* #+end_example *)
* | ~with_index~ | Returns a copy of the contracted shell with a modified index. | *)
(* [[file:~/QCaml/gaussian/atomic_shell.org::*Creation][Creation:2]] *)
@ -77,20 +64,20 @@ let make ?(index=0) contr =
let center = Cs.center contr.(0) in
let rec unique_center = function
| 0 -> true
| i -> if Cs.center contr.(i) = center then (unique_center [@tailcall]) (i-1) else false
| 0 -> true
| i -> if Cs.center contr.(i) = center then (unique_center [@tailcall]) (i-1) else false
in
if not (unique_center (Array.length contr - 1)) then
invalid_arg "ContractedAtomicShell.make Coordinate.t differ";
let ang_mom = Cs.ang_mom contr.(0) in
let rec unique_angmom = function
| 0 -> true
| i -> if Cs.ang_mom contr.(i) = ang_mom then (unique_angmom [@tailcall]) (i-1) else false
| 0 -> true
| i -> if Cs.ang_mom contr.(i) = ang_mom then (unique_angmom [@tailcall]) (i-1) else false
in
if not (unique_angmom (Array.length contr - 1)) then
invalid_arg "Contracted_shell.make: Angular_momentum.t differ";
let norm_coef =
Array.map Cs.normalizations contr
in
@ -110,8 +97,8 @@ let pp ppf s =
fprintf ppf "@[%3d-%-3d@]" (s.index+1) (s.index+ (size_of_shell s)*(size s));
fprintf ppf "@[%a@ %a@] @[" Am.pp_string s.ang_mom Co.pp s.center;
Array.iter2 (fun e_arr c_arr -> fprintf ppf "@[<v>";
Array.iter2 (fun e c -> fprintf ppf "@[%16.8e %16.8e@]@;" e c)
e_arr c_arr;
fprintf ppf "@;@]") s.expo s.coef;
Array.iter2 (fun e c -> fprintf ppf "@[%16.8e %16.8e@]@;" e c)
e_arr c_arr;
fprintf ppf "@;@]") s.expo s.coef;
fprintf ppf "@]"
(* Printers:2 ends here *)

View File

@ -11,42 +11,16 @@ open Common
(* [[file:~/QCaml/gaussian/atomic_shell.org::*Access][Access:1]] *)
val index : t -> int
(** Index in the basis set, represented as an array of contracted shells. *)
val center : t -> Coordinate.t
(** Coordinate of the center {% $\mathbf{A} = (X_A,Y_A,Z_A)$ %}. *)
val ang_mom : t -> Angular_momentum.t
(** Total angular momentum : {% $l = n_x + n_y + n_z$ %}. *)
val size : t -> int
(** Number of contracted functions, {% $n$ %} in the definition. *)
val contracted_shells: t -> Contracted_shell.t array
(** Array of contracted gaussians *)
val exponents : t -> float array array
(** Array of exponents {% $\alpha_{ij}$ %}. The first index is the index of
the contracted function, and the second index is the index of the primitive.
*)
val coefficients : t -> float array array
(** Array of contraction coefficients {% $d_{ij}$ %}. The first index is the index of
the contracted function, and the second index is the index of the primitive.
*)
val normalizations : t -> float array array
(** Normalization coefficients {% $\mathcal{N}_{ij}$ %}. The first index is the index of
the contracted function, and the second index is the index of the primitive.
*)
val norm_scales : t -> float array
(** Scaling factors {% $f(n_x,n_y,n_z)$ %}, given in the same order as
[Angular_momentum.zkey_array ang_mom]. *)
val size_of_shell : t -> int
(** Number of contracted functions in the shell: length of {!norm_coef_scale}. *)
val ang_mom : t -> Angular_momentum.t
val center : t -> Coordinate.t
val coefficients : t -> float array array
val contracted_shells : t -> Contracted_shell.t array
val exponents : t -> float array array
val index : t -> int
val normalizations : t -> float array array
val norm_scales : t -> float array
val size_of_shell : t -> int
val size : t -> int
(* Access:1 ends here *)
(* Creation *)
@ -54,10 +28,8 @@ val size_of_shell : t -> int
(* [[file:~/QCaml/gaussian/atomic_shell.org::*Creation][Creation:1]] *)
val make : ?index:int -> Contracted_shell.t array -> t
(** Creates a contracted shell from a list of coefficients and primitives. *)
val with_index : t -> int -> t
(** Returns a copy of the contracted shell with a modified index. *)
(* Creation:1 ends here *)
(* Printers *)

View File

@ -1,3 +1,4 @@
(* [[file:~/QCaml/gaussian/atomic_shell_pair_couple.org::*Type][Type:2]] *)
open Common
type t =
@ -17,7 +18,64 @@ module Co = Coordinate
module As = Atomic_shell
module Asp = Atomic_shell_pair
module Cspc = Contracted_shell_pair_couple
(* Type:2 ends here *)
(* | ~ang_mom~ | Total angular momentum of the shell pair couple: sum of the angular momenta of all the shells. |
* | ~atomic_shell_a~ | Returns the first atomic shell of the first shell pair. |
* | ~atomic_shell_b~ | Returns the second atomic shell of the first shell pair. |
* | ~atomic_shell_c~ | Returns the first atomic shell of the second shell pair. |
* | ~atomic_shell_d~ | Returns the second atomic shell of the second shell pair. |
* | ~atomic_shell_pair_p~ | Returns the first atomic shell pair that was used to build the shell pair. |
* | ~atomic_shell_pair_q~ | Returns the second atomic shell pair that was used to build the shell pair. |
* | ~contracted_shell_pair_couples~ | Returns the list of significant contracted shell pair couples. |
* | ~monocentric~ | True if all four atomic shells have the same center. |
* | ~norm_scales~ | Scaling factors of normalization coefficients inside the shell. The ordering is the same as ~zkey_array~. |
* | ~zkey_array~ | Returns the array of ~Zkey.t~ relative to the four shells of the shell pair couple. | *)
(* [[file:~/QCaml/gaussian/atomic_shell_pair_couple.org::*Access][Access:2]] *)
let contracted_shell_pair_couples t = t.contracted_shell_pair_couples
let monocentric t =
Asp.monocentric t.atomic_shell_pair_p && Asp.monocentric t.atomic_shell_pair_q &&
As.center (Asp.atomic_shell_a t.atomic_shell_pair_p) = As.center (Asp.atomic_shell_a t.atomic_shell_pair_q)
let ang_mom t = t.ang_mom
let atomic_shell_pair_p t = t.atomic_shell_pair_p
let atomic_shell_pair_q t = t.atomic_shell_pair_q
let atomic_shell_a t = t.atomic_shell_a
let atomic_shell_b t = t.atomic_shell_b
let atomic_shell_c t = t.atomic_shell_c
let atomic_shell_d t = t.atomic_shell_d
let zkey_array t =
match t.contracted_shell_pair_couples with
| f::_ -> Cspc.zkey_array f
| _ -> invalid_arg "AtomicShellPairCouple.zkey_array"
let norm_scales t =
match t.contracted_shell_pair_couples with
| f::_ -> Cspc.norm_scales f
| _ -> invalid_arg "AtomicShellPairCouple.norm_scales"
(* Access:2 ends here *)
(* Default cutoff is $\epsilon$.
*
* | ~make~ | Creates an atomic shell pair couple using two atomic shell pairs. |
*
* #+begin_example
*
* #+end_example *)
(* [[file:~/QCaml/gaussian/atomic_shell_pair_couple.org::*Creation][Creation:2]] *)
let make ?(cutoff=Constants.epsilon) atomic_shell_pair_p atomic_shell_pair_q =
let ang_mom =
Am.(Asp.ang_mom atomic_shell_pair_p + Asp.ang_mom atomic_shell_pair_q)
@ -41,32 +99,13 @@ let make ?(cutoff=Constants.epsilon) atomic_shell_pair_p atomic_shell_pair_q =
atomic_shell_a ; atomic_shell_b ; atomic_shell_c ; atomic_shell_d ;
contracted_shell_pair_couples ;
}
(* Creation:2 ends here *)
let contracted_shell_pair_couples t = t.contracted_shell_pair_couples
let monocentric t =
Asp.monocentric t.atomic_shell_pair_p && Asp.monocentric t.atomic_shell_pair_q &&
As.center (Asp.atomic_shell_a t.atomic_shell_pair_p) = As.center (Asp.atomic_shell_a t.atomic_shell_pair_q)
let ang_mom t = t.ang_mom
let atomic_shell_pair_p t = t.atomic_shell_pair_p
let atomic_shell_pair_q t = t.atomic_shell_pair_q
let atomic_shell_a t = t.atomic_shell_a
let atomic_shell_b t = t.atomic_shell_b
let atomic_shell_c t = t.atomic_shell_c
let atomic_shell_d t = t.atomic_shell_d
let zkey_array t =
match t.contracted_shell_pair_couples with
| f::_ -> Cspc.zkey_array f
| _ -> invalid_arg "AtomicShellPairCouple.zkey_array"
let norm_scales t =
match t.contracted_shell_pair_couples with
| f::_ -> Cspc.norm_scales f
| _ -> invalid_arg "AtomicShellPairCouple.norm_scales"
(* [[file:~/QCaml/gaussian/atomic_shell_pair_couple.org::*Printers][Printers:2]] *)
let pp ppf t =
Format.fprintf ppf "[(%d,%d),(%d,%d)]"
(Atomic_shell.index t.atomic_shell_a)
(Atomic_shell.index t.atomic_shell_b)
(Atomic_shell.index t.atomic_shell_c)
(Atomic_shell.index t.atomic_shell_d)
(* Printers:2 ends here *)

View File

@ -1,62 +1,39 @@
(** Data structure describing a couple of atomic shells pairs.
An atomic shell pair couple is the cartesian product between two sets of functions, one
set over electron one and one set over electron two. Both sets are atomic shell
pairs.
These are usually called {e shell quartets} in the literature, but we prefer to use
{e pair} for two functions with the same electron, and {e couple} for two functions
acting on different electrons, since they will be coupled by a two-electron operator.
(* Type *)
*)
type t
(* [[file:~/QCaml/gaussian/atomic_shell_pair_couple.org::*Type][Type:1]] *)
type t
open Common
(* Type:1 ends here *)
val make : ?cutoff:float -> Atomic_shell_pair.t -> Atomic_shell_pair.t -> t option
(** Creates an atomic shell pair couple using two atomic shell pairs.
*)
val ang_mom : t -> Angular_momentum.t
(** Total angular momentum of the shell pair couple: sum of the angular momenta of
all the shells. *)
(* Access *)
val atomic_shell_a : t -> Atomic_shell.t
(** Returns the first atomic shell of the first shell pair. *)
val atomic_shell_b : t -> Atomic_shell.t
(** Returns the second atomic shell of the first shell pair. *)
val atomic_shell_c : t -> Atomic_shell.t
(** Returns the first atomic shell of the second shell pair. *)
val atomic_shell_d : t -> Atomic_shell.t
(** Returns the second atomic shell of the second shell pair. *)
val atomic_shell_pair_p : t -> Atomic_shell_pair.t
(** Returns the first atomic shell pair that was used to build the shell pair. *)
val atomic_shell_pair_q : t -> Atomic_shell_pair.t
(** Returns the second atomic shell pair that was used to build the shell pair. *)
val monocentric : t -> bool
(** True if all four atomic shells have the same center. *)
(* [[file:~/QCaml/gaussian/atomic_shell_pair_couple.org::*Access][Access:1]] *)
val ang_mom : t -> Angular_momentum.t
val atomic_shell_a : t -> Atomic_shell.t
val atomic_shell_b : t -> Atomic_shell.t
val atomic_shell_c : t -> Atomic_shell.t
val atomic_shell_d : t -> Atomic_shell.t
val atomic_shell_pair_p : t -> Atomic_shell_pair.t
val atomic_shell_pair_q : t -> Atomic_shell_pair.t
val contracted_shell_pair_couples : t -> Contracted_shell_pair_couple.t list
(** Returns the list of significant contracted shell pair couples. *)
val monocentric : t -> bool
val norm_scales : t -> float array
val zkey_array : t -> Zkey.t array
(* Access:1 ends here *)
val zkey_array : t -> Zkey.t array
(** Returns the array of {!Zkey.t} relative to the four shells of the
shell pair couple.
*)
val norm_scales : t -> float array
(** Scaling factors of normalization coefficients inside the shell. The
ordering is the same as {!zkey_array}.
*)
(* Creation *)
(* [[file:~/QCaml/gaussian/atomic_shell_pair_couple.org::*Creation][Creation:1]] *)
val make : ?cutoff:float -> Atomic_shell_pair.t -> Atomic_shell_pair.t -> t option
(* Creation:1 ends here *)
(* Printers *)
(* [[file:~/QCaml/gaussian/atomic_shell_pair_couple.org::*Printers][Printers:1]] *)
val pp : Format.formatter -> t -> unit
(* Printers:1 ends here *)

View File

@ -12,6 +12,7 @@ let printers =
"Common.Spin.pp" ;
"Common.Zkey.pp" ;
"Gaussian.Atomic_shell.pp" ;
"Gaussian.Atomic_shell_pair_couple.pp" ;
"Mo.Frozen_core.pp" ;
"Particles.Electrons.pp" ;
"Particles.Element.pp" ;