1
0
mirror of https://github.com/TREX-CoE/qmckl.git synced 2025-01-08 20:33:40 +01:00

Deploying to gh-pages from @ TREX-CoE/qmckl@ce480af775 🚀

This commit is contained in:
scemama 2021-03-19 18:00:30 +00:00
parent 0262ff2603
commit 2558764c93
9 changed files with 216 additions and 200 deletions

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head> <head>
<!-- 2021-03-19 Fri 17:18 --> <!-- 2021-03-19 Fri 18:00 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<title>QMCkl source code documentation</title> <title>QMCkl source code documentation</title>
@ -348,7 +348,7 @@ and bug reports should be submitted at
</div> </div>
<div id="postamble" class="status"> <div id="postamble" class="status">
<p class="author">Author: TREX CoE</p> <p class="author">Author: TREX CoE</p>
<p class="date">Created: 2021-03-19 Fri 17:18</p> <p class="date">Created: 2021-03-19 Fri 18:00</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p> <p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div> </div>
</body> </body>

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head> <head>
<!-- 2021-03-19 Fri 17:18 --> <!-- 2021-03-19 Fri 18:00 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<title>QMCkl source code documentation</title> <title>QMCkl source code documentation</title>
@ -348,7 +348,7 @@ and bug reports should be submitted at
</div> </div>
<div id="postamble" class="status"> <div id="postamble" class="status">
<p class="author">Author: TREX CoE</p> <p class="author">Author: TREX CoE</p>
<p class="date">Created: 2021-03-19 Fri 17:18</p> <p class="date">Created: 2021-03-19 Fri 18:00</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p> <p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div> </div>
</body> </body>

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head> <head>
<!-- 2021-03-19 Fri 17:18 --> <!-- 2021-03-19 Fri 18:00 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Introduction</title> <title>Introduction</title>
@ -333,30 +333,30 @@ for the JavaScript code in this tag.
<h2>Table of Contents</h2> <h2>Table of Contents</h2>
<div id="text-table-of-contents"> <div id="text-table-of-contents">
<ul> <ul>
<li><a href="#orgb84e130">1. Using QMCkl</a></li> <li><a href="#org996b629">1. Using QMCkl</a></li>
<li><a href="#orgba89f10">2. Developing in QMCkl</a> <li><a href="#orgc23932f">2. Developing in QMCkl</a>
<ul> <ul>
<li><a href="#org8865bee">2.1. Literate programming</a></li> <li><a href="#org7fd8fd1">2.1. Literate programming</a></li>
<li><a href="#org70990e1">2.2. Source code editing</a></li> <li><a href="#orge22c666">2.2. Source code editing</a></li>
<li><a href="#org96dbf61">2.3. Choice of the programming language</a></li> <li><a href="#org3779332">2.3. Choice of the programming language</a></li>
<li><a href="#orgbe582df">2.4. Coding rules</a></li> <li><a href="#org04801c7">2.4. Coding rules</a></li>
<li><a href="#orgf6dc091">2.5. Design of the library</a></li> <li><a href="#org205833f">2.5. Design of the library</a></li>
<li><a href="#orgbc379aa">2.6. Naming conventions</a></li> <li><a href="#orgc47584c">2.6. Naming conventions</a></li>
<li><a href="#org124c975">2.7. Application programming interface</a></li> <li><a href="#orga8b00e3">2.7. Application programming interface</a></li>
<li><a href="#org4938a77">2.8. Global state</a></li> <li><a href="#orge614929">2.8. Global state</a></li>
<li><a href="#org6dc73af">2.9. Low-level functions</a></li> <li><a href="#org0b60987">2.9. Low-level functions</a></li>
<li><a href="#orgd395216">2.10. High-level functions</a></li> <li><a href="#orge548ec0">2.10. High-level functions</a></li>
<li><a href="#orgbae067e">2.11. Numerical precision</a></li> <li><a href="#org1ef7b83">2.11. Numerical precision</a></li>
<li><a href="#org5ae9eec">2.12. Algorithms</a></li> <li><a href="#org5e8d840">2.12. Algorithms</a></li>
<li><a href="#org5f35cd7">2.13. Rules for the API</a></li> <li><a href="#orgedb632a">2.13. Rules for the API</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>
<div id="outline-container-orgb84e130" class="outline-2"> <div id="outline-container-org996b629" class="outline-2">
<h2 id="orgb84e130"><span class="section-number-2">1</span> Using QMCkl</h2> <h2 id="org996b629"><span class="section-number-2">1</span> Using QMCkl</h2>
<div class="outline-text-2" id="text-1"> <div class="outline-text-2" id="text-1">
<p> <p>
The <code>qmckl.h</code> header file has to be included in C codes when The <code>qmckl.h</code> header file has to be included in C codes when
@ -385,12 +385,12 @@ Both files are located in the <code>include/</code> directory.
</div> </div>
</div> </div>
<div id="outline-container-orgba89f10" class="outline-2"> <div id="outline-container-orgc23932f" class="outline-2">
<h2 id="orgba89f10"><span class="section-number-2">2</span> Developing in QMCkl</h2> <h2 id="orgc23932f"><span class="section-number-2">2</span> Developing in QMCkl</h2>
<div class="outline-text-2" id="text-2"> <div class="outline-text-2" id="text-2">
</div> </div>
<div id="outline-container-org8865bee" class="outline-3"> <div id="outline-container-org7fd8fd1" class="outline-3">
<h3 id="org8865bee"><span class="section-number-3">2.1</span> Literate programming</h3> <h3 id="org7fd8fd1"><span class="section-number-3">2.1</span> Literate programming</h3>
<div class="outline-text-3" id="text-2-1"> <div class="outline-text-3" id="text-2-1">
<p> <p>
In a traditional source code, most of the lines of source files of a program In a traditional source code, most of the lines of source files of a program
@ -436,8 +436,8 @@ interactively, in the same spirit as Jupyter notebooks.
</div> </div>
<div id="outline-container-org70990e1" class="outline-3"> <div id="outline-container-orge22c666" class="outline-3">
<h3 id="org70990e1"><span class="section-number-3">2.2</span> Source code editing</h3> <h3 id="orge22c666"><span class="section-number-3">2.2</span> Source code editing</h3>
<div class="outline-text-3" id="text-2-2"> <div class="outline-text-3" id="text-2-2">
<p> <p>
For a tutorial on literate programming with org-mode, follow <a href="http://www.howardism.org/Technical/Emacs/literate-programming-tutorial.html">this link</a>. For a tutorial on literate programming with org-mode, follow <a href="http://www.howardism.org/Technical/Emacs/literate-programming-tutorial.html">this link</a>.
@ -469,8 +469,8 @@ org-mode.
</div> </div>
<div id="outline-container-org96dbf61" class="outline-3"> <div id="outline-container-org3779332" class="outline-3">
<h3 id="org96dbf61"><span class="section-number-3">2.3</span> Choice of the programming language</h3> <h3 id="org3779332"><span class="section-number-3">2.3</span> Choice of the programming language</h3>
<div class="outline-text-3" id="text-2-3"> <div class="outline-text-3" id="text-2-3">
<p> <p>
Most of the codes of the <a href="https://trex-coe.eu">TREX CoE</a> are written in Fortran with some scripts in Most of the codes of the <a href="https://trex-coe.eu">TREX CoE</a> are written in Fortran with some scripts in
@ -518,8 +518,8 @@ For more guidelines on using Fortran to generate a C interface, see
</div> </div>
</div> </div>
<div id="outline-container-orgbe582df" class="outline-3"> <div id="outline-container-org04801c7" class="outline-3">
<h3 id="orgbe582df"><span class="section-number-3">2.4</span> Coding rules</h3> <h3 id="org04801c7"><span class="section-number-3">2.4</span> Coding rules</h3>
<div class="outline-text-3" id="text-2-4"> <div class="outline-text-3" id="text-2-4">
<p> <p>
The authors should follow the recommendations of the The authors should follow the recommendations of the
@ -535,8 +535,8 @@ freed</li>
</div> </div>
<div id="outline-container-orgf6dc091" class="outline-3"> <div id="outline-container-org205833f" class="outline-3">
<h3 id="orgf6dc091"><span class="section-number-3">2.5</span> Design of the library</h3> <h3 id="org205833f"><span class="section-number-3">2.5</span> Design of the library</h3>
<div class="outline-text-3" id="text-2-5"> <div class="outline-text-3" id="text-2-5">
<p> <p>
The proposed API should allow the library to: deal with memory transfers The proposed API should allow the library to: deal with memory transfers
@ -547,8 +547,8 @@ functions (see below).
</div> </div>
</div> </div>
<div id="outline-container-orgbc379aa" class="outline-3"> <div id="outline-container-orgc47584c" class="outline-3">
<h3 id="orgbc379aa"><span class="section-number-3">2.6</span> Naming conventions</h3> <h3 id="orgc47584c"><span class="section-number-3">2.6</span> Naming conventions</h3>
<div class="outline-text-3" id="text-2-6"> <div class="outline-text-3" id="text-2-6">
<p> <p>
To avoid namespace collisions, we use <code>qmckl_</code> as a prefix for all exported To avoid namespace collisions, we use <code>qmckl_</code> as a prefix for all exported
@ -573,8 +573,8 @@ form is allowed.
</div> </div>
</div> </div>
<div id="outline-container-org124c975" class="outline-3"> <div id="outline-container-orga8b00e3" class="outline-3">
<h3 id="org124c975"><span class="section-number-3">2.7</span> Application programming interface</h3> <h3 id="orga8b00e3"><span class="section-number-3">2.7</span> Application programming interface</h3>
<div class="outline-text-3" id="text-2-7"> <div class="outline-text-3" id="text-2-7">
<p> <p>
In the C language, the number of bits used by the integer types can change In the C language, the number of bits used by the integer types can change
@ -607,15 +607,15 @@ bindings in other languages in other repositories.
</div> </div>
</div> </div>
<div id="outline-container-org4938a77" class="outline-3"> <div id="outline-container-orge614929" class="outline-3">
<h3 id="org4938a77"><span class="section-number-3">2.8</span> Global state</h3> <h3 id="orge614929"><span class="section-number-3">2.8</span> Global state</h3>
<div class="outline-text-3" id="text-2-8"> <div class="outline-text-3" id="text-2-8">
<p> <p>
Global variables should be avoided in the library, because it is Global variables should be avoided in the library, because it is
possible that one single program needs to use multiple instances possible that one single program needs to use multiple instances
of the library. To solve this problem we propose to use a pointer of the library. To solve this problem we propose to use a pointer
to a <a href="./qmckl_context.html"><code>context</code></a> variable, built by the library with the to a <a href="./qmckl_context.html"><code>context</code></a> variable, built by the library with the
<code>qmckl_context_create</code> function. The <a id="orgc261e39">=context=</a> contains the global <code>qmckl_context_create</code> function. The <a id="orga1092df">=context=</a> contains the global
state of the library, and is used as the first argument of many state of the library, and is used as the first argument of many
QMCkl functions. QMCkl functions.
</p> </p>
@ -635,8 +635,8 @@ versions can be destroyed with <code>qmckl_context_destroy</code>.
</div> </div>
</div> </div>
<div id="outline-container-org6dc73af" class="outline-3"> <div id="outline-container-org0b60987" class="outline-3">
<h3 id="org6dc73af"><span class="section-number-3">2.9</span> Low-level functions</h3> <h3 id="org0b60987"><span class="section-number-3">2.9</span> Low-level functions</h3>
<div class="outline-text-3" id="text-2-9"> <div class="outline-text-3" id="text-2-9">
<p> <p>
Low-level functions are very simple functions which are leaves of Low-level functions are very simple functions which are leaves of
@ -645,14 +645,14 @@ the function call tree (they don't call any other QMCkl function).
<p> <p>
These functions are <i>pure</i>, and unaware of the QMCkl These functions are <i>pure</i>, and unaware of the QMCkl
<a href="#orgc261e39"><code>context</code></a>. They are not allowed to allocate/deallocate memory, and <a href="#orga1092df"><code>context</code></a>. They are not allowed to allocate/deallocate memory, and
if they need temporary memory it should be provided in input. if they need temporary memory it should be provided in input.
</p> </p>
</div> </div>
</div> </div>
<div id="outline-container-orgd395216" class="outline-3"> <div id="outline-container-orge548ec0" class="outline-3">
<h3 id="orgd395216"><span class="section-number-3">2.10</span> High-level functions</h3> <h3 id="orge548ec0"><span class="section-number-3">2.10</span> High-level functions</h3>
<div class="outline-text-3" id="text-2-10"> <div class="outline-text-3" id="text-2-10">
<p> <p>
High-level functions are at the top of the function call tree. High-level functions are at the top of the function call tree.
@ -665,27 +665,27 @@ temporary storage, to simplify the use of accelerators.
<p> <p>
The high-level functions should be pure, unless the introduction The high-level functions should be pure, unless the introduction
of non-purity is justified. All the side effects should be made in of non-purity is justified. All the side effects should be made in
the <a href="#orgc261e39"><code>context</code></a> variable. the <a href="#orga1092df"><code>context</code></a> variable.
</p> </p>
</div> </div>
</div> </div>
<div id="outline-container-orgbae067e" class="outline-3"> <div id="outline-container-org1ef7b83" class="outline-3">
<h3 id="orgbae067e"><span class="section-number-3">2.11</span> Numerical precision</h3> <h3 id="org1ef7b83"><span class="section-number-3">2.11</span> Numerical precision</h3>
<div class="outline-text-3" id="text-2-11"> <div class="outline-text-3" id="text-2-11">
<p> <p>
The number of bits of precision required for a function should be The number of bits of precision required for a function should be
given as an input of low-level computational functions. This input given as an input of low-level computational functions. This input
will be used to define the values of the different thresholds that will be used to define the values of the different thresholds that
might be used to avoid computing unnecessary noise. High-level might be used to avoid computing unnecessary noise. High-level
functions will use the precision specified in the <a href="#orgc261e39"><code>context</code></a> functions will use the precision specified in the <a href="#orga1092df"><code>context</code></a>
variable. variable.
</p> </p>
</div> </div>
</div> </div>
<div id="outline-container-org5ae9eec" class="outline-3"> <div id="outline-container-org5e8d840" class="outline-3">
<h3 id="org5ae9eec"><span class="section-number-3">2.12</span> Algorithms</h3> <h3 id="org5e8d840"><span class="section-number-3">2.12</span> Algorithms</h3>
<div class="outline-text-3" id="text-2-12"> <div class="outline-text-3" id="text-2-12">
<p> <p>
Reducing the scaling of an algorithm usually implies also reducing Reducing the scaling of an algorithm usually implies also reducing
@ -698,8 +698,8 @@ implemented adapted to different problem sizes.
</div> </div>
</div> </div>
<div id="outline-container-org5f35cd7" class="outline-3"> <div id="outline-container-orgedb632a" class="outline-3">
<h3 id="org5f35cd7"><span class="section-number-3">2.13</span> Rules for the API</h3> <h3 id="orgedb632a"><span class="section-number-3">2.13</span> Rules for the API</h3>
<div class="outline-text-3" id="text-2-13"> <div class="outline-text-3" id="text-2-13">
<ul class="org-ul"> <ul class="org-ul">
<li><code>stdint</code> should be used for integers (<code>int32_t</code>, <code>int64_t</code>)</li> <li><code>stdint</code> should be used for integers (<code>int32_t</code>, <code>int64_t</code>)</li>
@ -713,7 +713,7 @@ implemented adapted to different problem sizes.
</div> </div>
<div id="postamble" class="status"> <div id="postamble" class="status">
<p class="author">Author: TREX CoE</p> <p class="author">Author: TREX CoE</p>
<p class="date">Created: 2021-03-19 Fri 17:18</p> <p class="date">Created: 2021-03-19 Fri 18:00</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p> <p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div> </div>
</body> </body>

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head> <head>
<!-- 2021-03-19 Fri 17:18 --> <!-- 2021-03-19 Fri 18:00 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Atomic Orbitals</title> <title>Atomic Orbitals</title>
@ -333,14 +333,14 @@ for the JavaScript code in this tag.
<h2>Table of Contents</h2> <h2>Table of Contents</h2>
<div id="text-table-of-contents"> <div id="text-table-of-contents">
<ul> <ul>
<li><a href="#org7d7e7be">1. Polynomial part</a> <li><a href="#org50b798d">1. Polynomial part</a>
<ul> <ul>
<li><a href="#org9d3d254">1.1. Powers of \(x-X_i\)</a></li> <li><a href="#org6bd2b87">1.1. Powers of \(x-X_i\)</a></li>
<li><a href="#orgc7c7093">1.2. Value, Gradient and Laplacian of a polynomial</a></li> <li><a href="#orge644aeb">1.2. Value, Gradient and Laplacian of a polynomial</a></li>
</ul> </ul>
</li> </li>
<li><a href="#org9f252e2">2. Gaussian basis functions</a></li> <li><a href="#org4133ceb">2. Gaussian basis functions</a></li>
<li><a href="#org7a8743d">3. <span class="todo TODO">TODO</span> Slater basis functions</a></li> <li><a href="#org720fd78">3. <span class="todo TODO">TODO</span> Slater basis functions</a></li>
</ul> </ul>
</div> </div>
</div> </div>
@ -389,12 +389,12 @@ In this section we describe the kernels used to compute the values,
gradients and Laplacian of the atomic basis functions. gradients and Laplacian of the atomic basis functions.
</p> </p>
<div id="outline-container-org7d7e7be" class="outline-2"> <div id="outline-container-org50b798d" class="outline-2">
<h2 id="org7d7e7be"><span class="section-number-2">1</span> Polynomial part</h2> <h2 id="org50b798d"><span class="section-number-2">1</span> Polynomial part</h2>
<div class="outline-text-2" id="text-1"> <div class="outline-text-2" id="text-1">
</div> </div>
<div id="outline-container-org9d3d254" class="outline-3"> <div id="outline-container-org6bd2b87" class="outline-3">
<h3 id="org9d3d254"><span class="section-number-3">1.1</span> Powers of \(x-X_i\)</h3> <h3 id="org6bd2b87"><span class="section-number-3">1.1</span> Powers of \(x-X_i\)</h3>
<div class="outline-text-3" id="text-1-1"> <div class="outline-text-3" id="text-1-1">
<p> <p>
The <code>qmckl_ao_power</code> function computes all the powers of the <code>n</code> The <code>qmckl_ao_power</code> function computes all the powers of the <code>n</code>
@ -574,8 +574,8 @@ Requirements:
</div> </div>
</div> </div>
<div id="outline-container-orgc7c7093" class="outline-3"> <div id="outline-container-orge644aeb" class="outline-3">
<h3 id="orgc7c7093"><span class="section-number-3">1.2</span> Value, Gradient and Laplacian of a polynomial</h3> <h3 id="orge644aeb"><span class="section-number-3">1.2</span> Value, Gradient and Laplacian of a polynomial</h3>
<div class="outline-text-3" id="text-1-2"> <div class="outline-text-3" id="text-1-2">
<p> <p>
A polynomial is centered on a nucleus \(\mathbf{R}_i\) A polynomial is centered on a nucleus \(\mathbf{R}_i\)
@ -960,8 +960,8 @@ munit_assert_int(0, ==, test_qmckl_ao_polynomial_vgl(context));
</div> </div>
</div> </div>
<div id="outline-container-org9f252e2" class="outline-2"> <div id="outline-container-org4133ceb" class="outline-2">
<h2 id="org9f252e2"><span class="section-number-2">2</span> Gaussian basis functions</h2> <h2 id="org4133ceb"><span class="section-number-2">2</span> Gaussian basis functions</h2>
<div class="outline-text-2" id="text-2"> <div class="outline-text-2" id="text-2">
<p> <p>
<code>qmckl_ao_gaussian_vgl</code> computes the values, gradients and <code>qmckl_ao_gaussian_vgl</code> computes the values, gradients and
@ -1193,13 +1193,13 @@ Requirements :
</div> </div>
</div> </div>
<div id="outline-container-org7a8743d" class="outline-2"> <div id="outline-container-org720fd78" class="outline-2">
<h2 id="org7a8743d"><span class="section-number-2">3</span> <span class="todo TODO">TODO</span> Slater basis functions</h2> <h2 id="org720fd78"><span class="section-number-2">3</span> <span class="todo TODO">TODO</span> Slater basis functions</h2>
</div> </div>
</div> </div>
<div id="postamble" class="status"> <div id="postamble" class="status">
<p class="author">Author: TREX CoE</p> <p class="author">Author: TREX CoE</p>
<p class="date">Created: 2021-03-19 Fri 17:18</p> <p class="date">Created: 2021-03-19 Fri 18:00</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p> <p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div> </div>
</body> </body>

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head> <head>
<!-- 2021-03-19 Fri 17:18 --> <!-- 2021-03-19 Fri 18:00 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Context</title> <title>Context</title>
@ -333,51 +333,51 @@ for the JavaScript code in this tag.
<h2>Table of Contents</h2> <h2>Table of Contents</h2>
<div id="text-table-of-contents"> <div id="text-table-of-contents">
<ul> <ul>
<li><a href="#org297625e">1. Context handling</a> <li><a href="#org3636d47">1. Context handling</a>
<ul> <ul>
<li><a href="#org627faba">1.1. Data structure</a></li> <li><a href="#orga36459f">1.1. Data structure</a></li>
<li><a href="#org319142e">1.2. Creation</a></li> <li><a href="#org091c9ee">1.2. Creation</a></li>
<li><a href="#org4e0f3d0">1.3. Access to the previous context</a></li> <li><a href="#orgc802a04">1.3. Access to the previous context</a></li>
<li><a href="#org2cffbc3">1.4. Locking</a></li> <li><a href="#orgcfee158">1.4. Locking</a></li>
<li><a href="#orge89adc0">1.5. Copy</a></li> <li><a href="#org5ee4e0f">1.5. Copy</a></li>
<li><a href="#org58a317a">1.6. Destroy</a></li> <li><a href="#orgeb320b7">1.6. Destroy</a></li>
</ul> </ul>
</li> </li>
<li><a href="#org55792e4">2. Memory allocation handling</a> <li><a href="#orgdedf9e0">2. Memory allocation handling</a>
<ul> <ul>
<li><a href="#orgdc45d77">2.1. Data structure</a></li> <li><a href="#org675d127">2.1. Data structure</a></li>
<li><a href="#orgc87365f">2.2. Append memory</a></li> <li><a href="#org2c18ce0">2.2. Append memory</a></li>
<li><a href="#orgd692309">2.3. Remove memory</a></li> <li><a href="#orga5aa506">2.3. Remove memory</a></li>
</ul> </ul>
</li> </li>
<li><a href="#org5348c2d">3. Error handling</a> <li><a href="#orged3cfc8">3. Error handling</a>
<ul> <ul>
<li><a href="#org03b5840">3.1. Data structure</a></li> <li><a href="#org0edd5da">3.1. Data structure</a></li>
<li><a href="#org4679582">3.2. Updating errors</a></li> <li><a href="#org45075a0">3.2. Updating errors</a></li>
</ul> </ul>
</li> </li>
<li><a href="#orgc9d22c2">4. Control of the numerical precision</a> <li><a href="#orgb1be843">4. Control of the numerical precision</a>
<ul> <ul>
<li><a href="#org45c241c">4.1. Precision</a></li> <li><a href="#org4a7b799">4.1. Precision</a></li>
<li><a href="#orgf19f6fa">4.2. Range</a></li> <li><a href="#orgd110711">4.2. Range</a></li>
<li><a href="#org1fed3f2">4.3. Helper functions</a></li> <li><a href="#org452383c">4.3. Helper functions</a></li>
</ul> </ul>
</li> </li>
<li><a href="#org41a7446">5. <span class="todo TODO">TODO</span> Basis set</a> <li><a href="#orgeff3669">5. <span class="todo TODO">TODO</span> Basis set</a>
<ul> <ul>
<li><a href="#orgd8bc69c">5.1. Data structure</a></li> <li><a href="#org63b5188">5.1. Data structure</a></li>
<li><a href="#org2666fce">5.2. <code>qmckl_context_update_ao_basis</code></a> <li><a href="#orgffe8446">5.2. <code>qmckl_context_update_ao_basis</code></a>
<ul> <ul>
<li><a href="#org770f855">5.2.1. Source</a></li> <li><a href="#orgacd18ae">5.2.1. Source</a></li>
<li><a href="#org54b9c48">5.2.2. Fortran interface</a></li> <li><a href="#org0287828">5.2.2. Fortran interface</a></li>
<li><a href="#org5379ff7">5.2.3. <span class="todo TODO">TODO</span> Test</a></li> <li><a href="#orgfb590d1">5.2.3. <span class="todo TODO">TODO</span> Test</a></li>
</ul> </ul>
</li> </li>
<li><a href="#org2fd51c4">5.3. <code>qmckl_context_set_ao_basis</code></a> <li><a href="#org826bc2c">5.3. <code>qmckl_context_set_ao_basis</code></a>
<ul> <ul>
<li><a href="#orgfda8157">5.3.1. Source</a></li> <li><a href="#orgab01043">5.3.1. Source</a></li>
<li><a href="#orgbad9b8c">5.3.2. Fortran interface</a></li> <li><a href="#org8bd63de">5.3.2. Fortran interface</a></li>
<li><a href="#org97164d7">5.3.3. <span class="todo TODO">TODO</span> Test</a></li> <li><a href="#org471b7e2">5.3.3. <span class="todo TODO">TODO</span> Test</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
@ -401,8 +401,8 @@ A value of <code>QMCKL_NULL_CONTEXT</code> for the context is equivalent to a
</pre> </pre>
</div> </div>
<div id="outline-container-org297625e" class="outline-2"> <div id="outline-container-org3636d47" class="outline-2">
<h2 id="org297625e"><span class="section-number-2">1</span> Context handling</h2> <h2 id="org3636d47"><span class="section-number-2">1</span> Context handling</h2>
<div class="outline-text-2" id="text-1"> <div class="outline-text-2" id="text-1">
<p> <p>
The context appears as an immutable data structure: modifying a The context appears as an immutable data structure: modifying a
@ -419,8 +419,8 @@ and <code>ctx</code> is a <code>qmckl_context_struct*</code> pointer.
</p> </p>
</div> </div>
<div id="outline-container-org627faba" class="outline-3"> <div id="outline-container-orga36459f" class="outline-3">
<h3 id="org627faba"><span class="section-number-3">1.1</span> Data structure</h3> <h3 id="orga36459f"><span class="section-number-3">1.1</span> Data structure</h3>
<div class="outline-text-3" id="text-1-1"> <div class="outline-text-3" id="text-1-1">
<p> <p>
The main data structure contains pointers to other data structures, The main data structure contains pointers to other data structures,
@ -430,7 +430,7 @@ pointers.
</p> </p>
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-c" id="orge814f2a"><span style="color: #a020f0;">typedef</span> <span style="color: #a020f0;">struct</span> <span style="color: #228b22;">qmckl_context_struct</span> { <pre class="src src-c" id="org85bbfd5"><span style="color: #a020f0;">typedef</span> <span style="color: #a020f0;">struct</span> <span style="color: #228b22;">qmckl_context_struct</span> {
/* <span style="color: #b22222;">Pointer to the previous context, before modification </span>*/ /* <span style="color: #b22222;">Pointer to the previous context, before modification </span>*/
<span style="color: #a020f0;">struct</span> <span style="color: #228b22;">qmckl_context_struct</span> * <span style="color: #a0522d;">prev</span>; <span style="color: #a020f0;">struct</span> <span style="color: #228b22;">qmckl_context_struct</span> * <span style="color: #a0522d;">prev</span>;
@ -510,8 +510,8 @@ if the context is valid, <code>QMCKL_NULL_CONTEXT</code> otherwise.
</div> </div>
</div> </div>
<div id="outline-container-org319142e" class="outline-3"> <div id="outline-container-org091c9ee" class="outline-3">
<h3 id="org319142e"><span class="section-number-3">1.2</span> Creation</h3> <h3 id="org091c9ee"><span class="section-number-3">1.2</span> Creation</h3>
<div class="outline-text-3" id="text-1-2"> <div class="outline-text-3" id="text-1-2">
<p> <p>
To create a new context, <code>qmckl_context_create()</code> should be used. To create a new context, <code>qmckl_context_create()</code> should be used.
@ -563,8 +563,8 @@ To create a new context, <code>qmckl_context_create()</code> should be used.
</div> </div>
</div> </div>
</div> </div>
<div id="outline-container-org4e0f3d0" class="outline-3"> <div id="outline-container-orgc802a04" class="outline-3">
<h3 id="org4e0f3d0"><span class="section-number-3">1.3</span> Access to the previous context</h3> <h3 id="orgc802a04"><span class="section-number-3">1.3</span> Access to the previous context</h3>
<div class="outline-text-3" id="text-1-3"> <div class="outline-text-3" id="text-1-3">
<p> <p>
<code>qmckl_context_previous</code> returns the previous context. It returns <code>qmckl_context_previous</code> returns the previous context. It returns
@ -586,8 +586,8 @@ To create a new context, <code>qmckl_context_create()</code> should be used.
</div> </div>
</div> </div>
</div> </div>
<div id="outline-container-org2cffbc3" class="outline-3"> <div id="outline-container-orgcfee158" class="outline-3">
<h3 id="org2cffbc3"><span class="section-number-3">1.4</span> Locking</h3> <h3 id="orgcfee158"><span class="section-number-3">1.4</span> Locking</h3>
<div class="outline-text-3" id="text-1-4"> <div class="outline-text-3" id="text-1-4">
<p> <p>
For thread safety, the context may be locked/unlocked. The lock is For thread safety, the context may be locked/unlocked. The lock is
@ -647,8 +647,8 @@ number of times the thread has locked it is saved in the
</div> </div>
</div> </div>
<div id="outline-container-orge89adc0" class="outline-3"> <div id="outline-container-org5ee4e0f" class="outline-3">
<h3 id="orge89adc0"><span class="section-number-3">1.5</span> Copy</h3> <h3 id="org5ee4e0f"><span class="section-number-3">1.5</span> Copy</h3>
<div class="outline-text-3" id="text-1-5"> <div class="outline-text-3" id="text-1-5">
<p> <p>
<code>qmckl_context_copy</code> makes a shallow copy of a context. It returns <code>qmckl_context_copy</code> makes a shallow copy of a context. It returns
@ -694,8 +694,8 @@ number of times the thread has locked it is saved in the
</div> </div>
</div> </div>
</div> </div>
<div id="outline-container-org58a317a" class="outline-3"> <div id="outline-container-orgeb320b7" class="outline-3">
<h3 id="org58a317a"><span class="section-number-3">1.6</span> Destroy</h3> <h3 id="orgeb320b7"><span class="section-number-3">1.6</span> Destroy</h3>
<div class="outline-text-3" id="text-1-6"> <div class="outline-text-3" id="text-1-6">
<p> <p>
The context is destroyed with <code>qmckl_context_destroy</code>, leaving the ancestors untouched. The context is destroyed with <code>qmckl_context_destroy</code>, leaving the ancestors untouched.
@ -755,12 +755,12 @@ It frees the context, and returns the previous context.
</div> </div>
</div> </div>
</div> </div>
<div id="outline-container-org55792e4" class="outline-2"> <div id="outline-container-orgdedf9e0" class="outline-2">
<h2 id="org55792e4"><span class="section-number-2">2</span> Memory allocation handling</h2> <h2 id="orgdedf9e0"><span class="section-number-2">2</span> Memory allocation handling</h2>
<div class="outline-text-2" id="text-2"> <div class="outline-text-2" id="text-2">
</div> </div>
<div id="outline-container-orgdc45d77" class="outline-3"> <div id="outline-container-org675d127" class="outline-3">
<h3 id="orgdc45d77"><span class="section-number-3">2.1</span> Data structure</h3> <h3 id="org675d127"><span class="section-number-3">2.1</span> Data structure</h3>
<div class="outline-text-3" id="text-2-1"> <div class="outline-text-3" id="text-2-1">
<p> <p>
Pointers to all allocated memory domains are stored in the context, Pointers to all allocated memory domains are stored in the context,
@ -769,7 +769,7 @@ computation of the amount of currently used memory by the library.
</p> </p>
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-c" id="orgd7f072e"><span style="color: #a020f0;">typedef</span> <span style="color: #a020f0;">struct</span> <span style="color: #228b22;">qmckl_memory_struct</span> { <pre class="src src-c" id="orgcfa443a"><span style="color: #a020f0;">typedef</span> <span style="color: #a020f0;">struct</span> <span style="color: #228b22;">qmckl_memory_struct</span> {
<span style="color: #a020f0;">struct</span> <span style="color: #228b22;">qmckl_memory_struct</span> * <span style="color: #a0522d;">next</span> ; <span style="color: #a020f0;">struct</span> <span style="color: #228b22;">qmckl_memory_struct</span> * <span style="color: #a0522d;">next</span> ;
<span style="color: #228b22;">void</span> * <span style="color: #a0522d;">pointer</span> ; <span style="color: #228b22;">void</span> * <span style="color: #a0522d;">pointer</span> ;
<span style="color: #228b22;">size_t</span> <span style="color: #a0522d;">size</span> ; <span style="color: #228b22;">size_t</span> <span style="color: #a0522d;">size</span> ;
@ -779,8 +779,8 @@ computation of the amount of currently used memory by the library.
</div> </div>
</div> </div>
<div id="outline-container-orgc87365f" class="outline-3"> <div id="outline-container-org2c18ce0" class="outline-3">
<h3 id="orgc87365f"><span class="section-number-3">2.2</span> Append memory</h3> <h3 id="org2c18ce0"><span class="section-number-3">2.2</span> Append memory</h3>
<div class="outline-text-3" id="text-2-2"> <div class="outline-text-3" id="text-2-2">
<p> <p>
The following function, called in <a href="./qmckl_memory.html"><code>qmckl_memory.c</code></a>, appends a new The following function, called in <a href="./qmckl_memory.html"><code>qmckl_memory.c</code></a>, appends a new
@ -838,8 +838,8 @@ immediately with <code>QMCKL_SUCCESS</code>.
</div> </div>
</div> </div>
<div id="outline-container-orgd692309" class="outline-3"> <div id="outline-container-orga5aa506" class="outline-3">
<h3 id="orgd692309"><span class="section-number-3">2.3</span> Remove memory</h3> <h3 id="orga5aa506"><span class="section-number-3">2.3</span> Remove memory</h3>
<div class="outline-text-3" id="text-2-3"> <div class="outline-text-3" id="text-2-3">
<p> <p>
The following function, called in <a href="./qmckl_memory.html"><code>qmckl_memory.c</code></a>, removes a The following function, called in <a href="./qmckl_memory.html"><code>qmckl_memory.c</code></a>, removes a
@ -890,15 +890,15 @@ immediately with <code>QMCKL_SUCCESS</code>.
</div> </div>
</div> </div>
<div id="outline-container-org5348c2d" class="outline-2"> <div id="outline-container-orged3cfc8" class="outline-2">
<h2 id="org5348c2d"><span class="section-number-2">3</span> Error handling</h2> <h2 id="orged3cfc8"><span class="section-number-2">3</span> Error handling</h2>
<div class="outline-text-2" id="text-3"> <div class="outline-text-2" id="text-3">
</div> </div>
<div id="outline-container-org03b5840" class="outline-3"> <div id="outline-container-org0edd5da" class="outline-3">
<h3 id="org03b5840"><span class="section-number-3">3.1</span> Data structure</h3> <h3 id="org0edd5da"><span class="section-number-3">3.1</span> Data structure</h3>
<div class="outline-text-3" id="text-3-1"> <div class="outline-text-3" id="text-3-1">
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-c" id="org3d3794e"><span style="color: #483d8b;">#define</span> <span style="color: #a0522d;">QMCKL_MAX_FUN_LEN</span> 256 <pre class="src src-c" id="orgddfa180"><span style="color: #483d8b;">#define</span> <span style="color: #a0522d;">QMCKL_MAX_FUN_LEN</span> 256
<span style="color: #483d8b;">#define</span> <span style="color: #a0522d;">QMCKL_MAX_MSG_LEN</span> 1024 <span style="color: #483d8b;">#define</span> <span style="color: #a0522d;">QMCKL_MAX_MSG_LEN</span> 1024
<span style="color: #a020f0;">typedef</span> <span style="color: #a020f0;">struct</span> <span style="color: #228b22;">qmckl_error_struct</span> { <span style="color: #a020f0;">typedef</span> <span style="color: #a020f0;">struct</span> <span style="color: #228b22;">qmckl_error_struct</span> {
@ -913,8 +913,8 @@ immediately with <code>QMCKL_SUCCESS</code>.
</div> </div>
</div> </div>
<div id="outline-container-org4679582" class="outline-3"> <div id="outline-container-org45075a0" class="outline-3">
<h3 id="org4679582"><span class="section-number-3">3.2</span> Updating errors</h3> <h3 id="org45075a0"><span class="section-number-3">3.2</span> Updating errors</h3>
<div class="outline-text-3" id="text-3-2"> <div class="outline-text-3" id="text-3-2">
<p> <p>
The error is updated in the context using The error is updated in the context using
@ -1063,8 +1063,8 @@ For example, this function can be used as
</div> </div>
</div> </div>
<div id="outline-container-orgc9d22c2" class="outline-2"> <div id="outline-container-orgb1be843" class="outline-2">
<h2 id="orgc9d22c2"><span class="section-number-2">4</span> Control of the numerical precision</h2> <h2 id="orgb1be843"><span class="section-number-2">4</span> Control of the numerical precision</h2>
<div class="outline-text-2" id="text-4"> <div class="outline-text-2" id="text-4">
<p> <p>
Controlling numerical precision enables optimizations. Here, the Controlling numerical precision enables optimizations. Here, the
@ -1072,7 +1072,7 @@ default parameters determining the target numerical precision and
range are defined. range are defined.
</p> </p>
<table id="orga97daf0" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> <table id="org5f05df7" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup> <colgroup>
@ -1118,7 +1118,7 @@ range are defined.
</div> </div>
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-c" id="org9d051f5"><span style="color: #a020f0;">typedef</span> <span style="color: #a020f0;">struct</span> <span style="color: #228b22;">qmckl_precision_struct</span> { <pre class="src src-c" id="orga274ddc"><span style="color: #a020f0;">typedef</span> <span style="color: #a020f0;">struct</span> <span style="color: #228b22;">qmckl_precision_struct</span> {
<span style="color: #228b22;">int</span> <span style="color: #a0522d;">precision</span>; <span style="color: #228b22;">int</span> <span style="color: #a0522d;">precision</span>;
<span style="color: #228b22;">int</span> <span style="color: #a0522d;">range</span>; <span style="color: #228b22;">int</span> <span style="color: #a0522d;">range</span>;
} <span style="color: #228b22;">qmckl_precision_struct</span>; } <span style="color: #228b22;">qmckl_precision_struct</span>;
@ -1139,8 +1139,8 @@ integer. The update functions return <code>QMCKL_SUCCESS</code> or
</p> </p>
</div> </div>
<div id="outline-container-org45c241c" class="outline-3"> <div id="outline-container-org4a7b799" class="outline-3">
<h3 id="org45c241c"><span class="section-number-3">4.1</span> Precision</h3> <h3 id="org4a7b799"><span class="section-number-3">4.1</span> Precision</h3>
<div class="outline-text-3" id="text-4-1"> <div class="outline-text-3" id="text-4-1">
<p> <p>
<code>qmckl_context_update_precision</code> modifies the parameter for the <code>qmckl_context_update_precision</code> modifies the parameter for the
@ -1262,8 +1262,8 @@ different precision parameter.
</div> </div>
</div> </div>
<div id="outline-container-orgf19f6fa" class="outline-3"> <div id="outline-container-orgd110711" class="outline-3">
<h3 id="orgf19f6fa"><span class="section-number-3">4.2</span> Range</h3> <h3 id="orgd110711"><span class="section-number-3">4.2</span> Range</h3>
<div class="outline-text-3" id="text-4-2"> <div class="outline-text-3" id="text-4-2">
<p> <p>
<code>qmckl_context_update_range</code> modifies the parameter for the numerical range in a given context. <code>qmckl_context_update_range</code> modifies the parameter for the numerical range in a given context.
@ -1371,8 +1371,8 @@ different precision parameter.
</div> </div>
</div> </div>
</div> </div>
<div id="outline-container-org1fed3f2" class="outline-3"> <div id="outline-container-org452383c" class="outline-3">
<h3 id="org1fed3f2"><span class="section-number-3">4.3</span> Helper functions</h3> <h3 id="org452383c"><span class="section-number-3">4.3</span> Helper functions</h3>
<div class="outline-text-3" id="text-4-3"> <div class="outline-text-3" id="text-4-3">
<p> <p>
<code>qmckl_context_get_epsilon</code> returns \(\epsilon = 2^{1-n}\) where <code>n</code> is the precision. <code>qmckl_context_get_epsilon</code> returns \(\epsilon = 2^{1-n}\) where <code>n</code> is the precision.
@ -1388,8 +1388,8 @@ different precision parameter.
</div> </div>
</div> </div>
</div> </div>
<div id="outline-container-org41a7446" class="outline-2"> <div id="outline-container-orgeff3669" class="outline-2">
<h2 id="org41a7446"><span class="section-number-2">5</span> <span class="todo TODO">TODO</span> Basis set</h2> <h2 id="orgeff3669"><span class="section-number-2">5</span> <span class="todo TODO">TODO</span> Basis set</h2>
<div class="outline-text-2" id="text-5"> <div class="outline-text-2" id="text-5">
<p> <p>
For H<sub>2</sub> with the following basis set, For H<sub>2</sub> with the following basis set,
@ -1436,11 +1436,11 @@ COEFFICIENT = [ 0.006068, 0.045308, 0.202822, 0.503903, 0.383421,
</pre> </pre>
</div> </div>
<div id="outline-container-orgd8bc69c" class="outline-3"> <div id="outline-container-org63b5188" class="outline-3">
<h3 id="orgd8bc69c"><span class="section-number-3">5.1</span> Data structure</h3> <h3 id="org63b5188"><span class="section-number-3">5.1</span> Data structure</h3>
<div class="outline-text-3" id="text-5-1"> <div class="outline-text-3" id="text-5-1">
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-c" id="org44e08ff"><span style="color: #a020f0;">typedef</span> <span style="color: #a020f0;">struct</span> <span style="color: #228b22;">qmckl_ao_basis_struct</span> { <pre class="src src-c" id="orge4f9e87"><span style="color: #a020f0;">typedef</span> <span style="color: #a020f0;">struct</span> <span style="color: #228b22;">qmckl_ao_basis_struct</span> {
<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">shell_num</span>; <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">shell_num</span>;
<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">prim_num</span>; <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">prim_num</span>;
@ -1458,8 +1458,8 @@ COEFFICIENT = [ 0.006068, 0.045308, 0.202822, 0.503903, 0.383421,
</div> </div>
</div> </div>
<div id="outline-container-org2666fce" class="outline-3"> <div id="outline-container-orgffe8446" class="outline-3">
<h3 id="org2666fce"><span class="section-number-3">5.2</span> <code>qmckl_context_update_ao_basis</code></h3> <h3 id="orgffe8446"><span class="section-number-3">5.2</span> <code>qmckl_context_update_ao_basis</code></h3>
<div class="outline-text-3" id="text-5-2"> <div class="outline-text-3" id="text-5-2">
<p> <p>
Updates the data describing the AO basis set into the context. Updates the data describing the AO basis set into the context.
@ -1543,8 +1543,8 @@ Updates the data describing the AO basis set into the context.
</div> </div>
</div> </div>
<div id="outline-container-org770f855" class="outline-4"> <div id="outline-container-orgacd18ae" class="outline-4">
<h4 id="org770f855"><span class="section-number-4">5.2.1</span> Source</h4> <h4 id="orgacd18ae"><span class="section-number-4">5.2.1</span> Source</h4>
<div class="outline-text-4" id="text-5-2-1"> <div class="outline-text-4" id="text-5-2-1">
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span> <pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span>
@ -1685,8 +1685,8 @@ Updates the data describing the AO basis set into the context.
</div> </div>
</div> </div>
<div id="outline-container-org54b9c48" class="outline-4"> <div id="outline-container-org0287828" class="outline-4">
<h4 id="org54b9c48"><span class="section-number-4">5.2.2</span> Fortran interface</h4> <h4 id="org0287828"><span class="section-number-4">5.2.2</span> Fortran interface</h4>
<div class="outline-text-4" id="text-5-2-2"> <div class="outline-text-4" id="text-5-2-2">
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-f90"><span style="color: #a020f0;">interface</span> <pre class="src src-f90"><span style="color: #a020f0;">interface</span>
@ -1712,13 +1712,13 @@ Updates the data describing the AO basis set into the context.
</div> </div>
</div> </div>
<div id="outline-container-org5379ff7" class="outline-4"> <div id="outline-container-orgfb590d1" class="outline-4">
<h4 id="org5379ff7"><span class="section-number-4">5.2.3</span> <span class="todo TODO">TODO</span> Test</h4> <h4 id="orgfb590d1"><span class="section-number-4">5.2.3</span> <span class="todo TODO">TODO</span> Test</h4>
</div> </div>
</div> </div>
<div id="outline-container-org2fd51c4" class="outline-3"> <div id="outline-container-org826bc2c" class="outline-3">
<h3 id="org2fd51c4"><span class="section-number-3">5.3</span> <code>qmckl_context_set_ao_basis</code></h3> <h3 id="org826bc2c"><span class="section-number-3">5.3</span> <code>qmckl_context_set_ao_basis</code></h3>
<div class="outline-text-3" id="text-5-3"> <div class="outline-text-3" id="text-5-3">
<p> <p>
Sets the data describing the AO basis set into the context. Sets the data describing the AO basis set into the context.
@ -1797,8 +1797,8 @@ Sets the data describing the AO basis set into the context.
</div> </div>
</div> </div>
<div id="outline-container-orgfda8157" class="outline-4"> <div id="outline-container-orgab01043" class="outline-4">
<h4 id="orgfda8157"><span class="section-number-4">5.3.1</span> Source</h4> <h4 id="orgab01043"><span class="section-number-4">5.3.1</span> Source</h4>
<div class="outline-text-4" id="text-5-3-1"> <div class="outline-text-4" id="text-5-3-1">
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-c"><span style="color: #228b22;">qmckl_context</span> <pre class="src src-c"><span style="color: #228b22;">qmckl_context</span>
@ -1827,8 +1827,8 @@ Sets the data describing the AO basis set into the context.
</div> </div>
</div> </div>
<div id="outline-container-orgbad9b8c" class="outline-4"> <div id="outline-container-org8bd63de" class="outline-4">
<h4 id="orgbad9b8c"><span class="section-number-4">5.3.2</span> Fortran interface</h4> <h4 id="org8bd63de"><span class="section-number-4">5.3.2</span> Fortran interface</h4>
<div class="outline-text-4" id="text-5-3-2"> <div class="outline-text-4" id="text-5-3-2">
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-f90"><span style="color: #a020f0;">interface</span> <pre class="src src-f90"><span style="color: #a020f0;">interface</span>
@ -1854,15 +1854,15 @@ Sets the data describing the AO basis set into the context.
</div> </div>
</div> </div>
<div id="outline-container-org97164d7" class="outline-4"> <div id="outline-container-org471b7e2" class="outline-4">
<h4 id="org97164d7"><span class="section-number-4">5.3.3</span> <span class="todo TODO">TODO</span> Test</h4> <h4 id="org471b7e2"><span class="section-number-4">5.3.3</span> <span class="todo TODO">TODO</span> Test</h4>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div id="postamble" class="status"> <div id="postamble" class="status">
<p class="author">Author: TREX CoE</p> <p class="author">Author: TREX CoE</p>
<p class="date">Created: 2021-03-19 Fri 17:18</p> <p class="date">Created: 2021-03-19 Fri 18:00</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p> <p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div> </div>
</body> </body>

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head> <head>
<!-- 2021-03-19 Fri 17:18 --> <!-- 2021-03-19 Fri 18:00 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Distances</title> <title>Distances</title>
@ -333,13 +333,13 @@ for the JavaScript code in this tag.
<h2>Table of Contents</h2> <h2>Table of Contents</h2>
<div id="text-table-of-contents"> <div id="text-table-of-contents">
<ul> <ul>
<li><a href="#orge30dc1a">1. Squared distance</a> <li><a href="#org4dfc3d0">1. Squared distance</a>
<ul> <ul>
<li> <li>
<ul> <ul>
<li><a href="#org665326b">1.0.1. Requirements</a></li> <li><a href="#org472833b">1.0.1. Requirements</a></li>
<li><a href="#org715d237">1.0.2. Performance</a></li> <li><a href="#org73843c9">1.0.2. Performance</a></li>
<li><a href="#org3abc2f3">1.0.3. Source</a></li> <li><a href="#org2e20cd7">1.0.3. Source</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
@ -351,8 +351,8 @@ for the JavaScript code in this tag.
Functions for the computation of distances between particles. Functions for the computation of distances between particles.
</p> </p>
<div id="outline-container-orge30dc1a" class="outline-2"> <div id="outline-container-org4dfc3d0" class="outline-2">
<h2 id="orge30dc1a"><span class="section-number-2">1</span> Squared distance</h2> <h2 id="org4dfc3d0"><span class="section-number-2">1</span> Squared distance</h2>
<div class="outline-text-2" id="text-1"> <div class="outline-text-2" id="text-1">
<p> <p>
<code>qmckl_distance_sq</code> computes the matrix of the squared distances <code>qmckl_distance_sq</code> computes the matrix of the squared distances
@ -445,8 +445,8 @@ Functions for the computation of distances between particles.
</table> </table>
</div> </div>
<div id="outline-container-org665326b" class="outline-4"> <div id="outline-container-org472833b" class="outline-4">
<h4 id="org665326b"><span class="section-number-4">1.0.1</span> Requirements</h4> <h4 id="org472833b"><span class="section-number-4">1.0.1</span> Requirements</h4>
<div class="outline-text-4" id="text-1-0-1"> <div class="outline-text-4" id="text-1-0-1">
<ul class="org-ul"> <ul class="org-ul">
<li><code>context</code> is not 0</li> <li><code>context</code> is not 0</li>
@ -464,8 +464,8 @@ Functions for the computation of distances between particles.
</div> </div>
</div> </div>
<div id="outline-container-org715d237" class="outline-4"> <div id="outline-container-org73843c9" class="outline-4">
<h4 id="org715d237"><span class="section-number-4">1.0.2</span> Performance</h4> <h4 id="org73843c9"><span class="section-number-4">1.0.2</span> Performance</h4>
<div class="outline-text-4" id="text-1-0-2"> <div class="outline-text-4" id="text-1-0-2">
<p> <p>
This function might be more efficient when <code>A</code> and <code>B</code> are This function might be more efficient when <code>A</code> and <code>B</code> are
@ -484,8 +484,8 @@ transposed.
</div> </div>
</div> </div>
<div id="outline-container-org3abc2f3" class="outline-4"> <div id="outline-container-org2e20cd7" class="outline-4">
<h4 id="org3abc2f3"><span class="section-number-4">1.0.3</span> Source</h4> <h4 id="org2e20cd7"><span class="section-number-4">1.0.3</span> Source</h4>
<div class="outline-text-4" id="text-1-0-3"> <div class="outline-text-4" id="text-1-0-3">
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-f90"><span style="color: #228b22;">integer </span><span style="color: #a020f0;">function</span><span style="color: #a0522d;"> </span><span style="color: #0000ff;">qmckl_distance_sq_f</span><span style="color: #000000; background-color: #ffffff;">(context, transa, transb, m, n, A, LDA, B, LDB, C, LDC) result(info)</span> <pre class="src src-f90"><span style="color: #228b22;">integer </span><span style="color: #a020f0;">function</span><span style="color: #a0522d;"> </span><span style="color: #0000ff;">qmckl_distance_sq_f</span><span style="color: #000000; background-color: #ffffff;">(context, transa, transb, m, n, A, LDA, B, LDB, C, LDC) result(info)</span>
@ -621,7 +621,7 @@ transposed.
</div> </div>
<div id="postamble" class="status"> <div id="postamble" class="status">
<p class="author">Author: TREX CoE</p> <p class="author">Author: TREX CoE</p>
<p class="date">Created: 2021-03-19 Fri 17:18</p> <p class="date">Created: 2021-03-19 Fri 18:00</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p> <p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div> </div>
</body> </body>

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head> <head>
<!-- 2021-03-19 Fri 17:18 --> <!-- 2021-03-19 Fri 18:00 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Error handling</title> <title>Error handling</title>
@ -311,14 +311,14 @@ for the JavaScript code in this tag.
<h2>Table of Contents</h2> <h2>Table of Contents</h2>
<div id="text-table-of-contents"> <div id="text-table-of-contents">
<ul> <ul>
<li><a href="#org4e5c923"></a></li> <li><a href="#orge38eeac"></a></li>
</ul> </ul>
</div> </div>
</div> </div>
<div id="outline-container-org4e5c923" class="outline-2"> <div id="outline-container-orge38eeac" class="outline-2">
<h2 id="org4e5c923"></h2> <h2 id="orge38eeac"></h2>
<div class="outline-text-2" id="text-org4e5c923"> <div class="outline-text-2" id="text-orge38eeac">
<p> <p>
The library should never make the calling programs abort, nor The library should never make the calling programs abort, nor
perform any input/output operations. This decision has to be taken perform any input/output operations. This decision has to be taken
@ -326,15 +326,15 @@ by the developer of the code calling the library.
</p> </p>
<p> <p>
All the functions return with an <a id="orgc5090cd">exit code</a>, defined as All the functions return with an exit code, defined as
</p> </p>
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-c" id="org56f2db6"><span style="color: #a020f0;">typedef</span> <span style="color: #228b22;">int32_t</span> <span style="color: #228b22;">qmckl_exit_code</span>; <pre class="src src-c" id="orgb0950a8"><span style="color: #a020f0;">typedef</span> <span style="color: #228b22;">int32_t</span> <span style="color: #228b22;">qmckl_exit_code</span>;
</pre> </pre>
</div> </div>
<p> <p>
The <a href="#orgc5090cd">exit code</a> returns the completion status of the function to the The exit code returns the completion status of the function to the
calling program. When a function call completed successfully, calling program. When a function call completed successfully,
<code>QMCKL_SUCCESS</code> is returned. If one of the functions of <code>QMCKL_SUCCESS</code> is returned. If one of the functions of
the library fails to complete the requested task, an appropriate the library fails to complete the requested task, an appropriate
@ -345,7 +345,7 @@ error code is returned to the program.
Here is the complete list of exit codes. Here is the complete list of exit codes.
</p> </p>
<table id="org0cf0193" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> <table id="org9a62dd6" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup> <colgroup>
@ -462,23 +462,28 @@ Here is the complete list of exit codes.
<tr> <tr>
<td class="org-left"><code>QMCKL_INVALID_EXIT_CODE</code></td> <td class="org-left"><code>QMCKL_INVALID_EXIT_CODE</code></td>
<td class="org-right">106</td> <td class="org-right">106</td>
<td class="org-left">'Invalid <a href="#orgc5090cd">exit code</a>'</td> <td class="org-left">'Invalid exit code'</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<p> <p>
The <code>qmckl_strerror</code> converts an <a href="#orgc5090cd">exit code</a> into a string. The The <code>qmckl_strerror</code> converts an exit code into a string. The
string is assumed to be large enough to contain the error message string is assumed to be large enough to contain the error message
(typically 128 characters). (typically 128 characters).
</p> </p>
<pre class="example">
128
</pre>
<p> <p>
The text strings are extracted from the previous table. The text strings are extracted from the previous table.
</p> </p>
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-c"><span style="color: #228b22;">void</span> <span style="color: #0000ff;">qmckl_string_of_error</span>(<span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #a0522d;">error</span>, <span style="color: #228b22;">char</span> <span style="color: #a0522d;">string</span>[QMCKL_ERROR_MAX_STRING_LENGTH]) { <pre class="src src-c"><span style="color: #228b22;">void</span> <span style="color: #0000ff;">qmckl_string_of_error</span>(<span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #a0522d;">error</span>, <span style="color: #228b22;">char</span> <span style="color: #a0522d;">string</span>[128]) {
<span style="color: #228b22;">char</span>* <span style="color: #a0522d;">message</span>; <span style="color: #228b22;">char</span>* <span style="color: #a0522d;">message</span>;
<span style="color: #a020f0;">switch</span> (error) { <span style="color: #a020f0;">switch</span> (error) {
<span style="color: #a020f0;">case</span> QMCKL_SUCCESS: <span style="color: #a020f0;">case</span> QMCKL_SUCCESS:
@ -533,16 +538,27 @@ The text strings are extracted from the previous table.
message = <span style="color: #8b2252;">"Invalid exit code"</span>; message = <span style="color: #8b2252;">"Invalid exit code"</span>;
<span style="color: #a020f0;">break</span>; <span style="color: #a020f0;">break</span>;
} }
strncpy(string,message,QMCKL_ERROR_MAX_STRING_LENGTH); strncpy(string,message,128);
} }
</pre> </pre>
</div> </div>
<div class="org-src-container">
<pre class="src src-f90"><span style="color: #a020f0;">interface</span>
<span style="color: #228b22;">type (c_ptr) </span><span style="color: #a020f0;">function</span> <span style="color: #0000ff;">qmckl_string_of_error</span> <span style="color: #000000; background-color: #ffffff;">(error, string) bind(C)</span>
<span style="color: #a020f0;">use</span>, <span style="color: #a020f0;">intrinsic</span> :: <span style="color: #0000ff;">iso_c_binding</span>
<span style="color: #228b22;">integer</span> (<span style="color: #008b8b;">c_int32_t</span>), <span style="color: #a020f0;">intent</span>(in), <span style="color: #a020f0;">value</span> ::<span style="color: #a0522d;"> error</span>
<span style="color: #228b22;">character</span>*(), <span style="color: #a020f0;">intent</span>(out) ::<span style="color: #a0522d;"> string</span>
<span style="color: #a020f0;">end function</span> <span style="color: #0000ff;">qmckl_string_of_error</span>
<span style="color: #a020f0;">end interface</span>
</pre>
</div>
</div> </div>
</div> </div>
</div> </div>
<div id="postamble" class="status"> <div id="postamble" class="status">
<p class="author">Author: TREX CoE</p> <p class="author">Author: TREX CoE</p>
<p class="date">Created: 2021-03-19 Fri 17:18</p> <p class="date">Created: 2021-03-19 Fri 18:00</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p> <p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div> </div>
</body> </body>

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head> <head>
<!-- 2021-03-19 Fri 17:18 --> <!-- 2021-03-19 Fri 18:00 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Memory management</title> <title>Memory management</title>
@ -311,7 +311,7 @@ for the JavaScript code in this tag.
<h2>Table of Contents</h2> <h2>Table of Contents</h2>
<div id="text-table-of-contents"> <div id="text-table-of-contents">
<ul> <ul>
<li><a href="#orgbfeb1b1"></a></li> <li><a href="#org3729bc5"></a></li>
</ul> </ul>
</div> </div>
</div> </div>
@ -321,9 +321,9 @@ optimized libraries to fine-tune the memory allocation.
</p> </p>
<div id="outline-container-orgbfeb1b1" class="outline-2"> <div id="outline-container-org3729bc5" class="outline-2">
<h2 id="orgbfeb1b1"></h2> <h2 id="org3729bc5"></h2>
<div class="outline-text-2" id="text-orgbfeb1b1"> <div class="outline-text-2" id="text-org3729bc5">
<p> <p>
Memory allocation inside the library should be done with Memory allocation inside the library should be done with
<code>qmckl_malloc</code>. It lets the library choose how the memory will be <code>qmckl_malloc</code>. It lets the library choose how the memory will be
@ -429,7 +429,7 @@ allocation and needs to be updated.
</div> </div>
<div id="postamble" class="status"> <div id="postamble" class="status">
<p class="author">Author: TREX CoE</p> <p class="author">Author: TREX CoE</p>
<p class="date">Created: 2021-03-19 Fri 17:18</p> <p class="date">Created: 2021-03-19 Fri 18:00</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p> <p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div> </div>
</body> </body>

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head> <head>
<!-- 2021-03-19 Fri 17:18 --> <!-- 2021-03-19 Fri 18:00 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Testing</title> <title>Testing</title>
@ -311,7 +311,7 @@ for the JavaScript code in this tag.
</div> </div>
<div id="postamble" class="status"> <div id="postamble" class="status">
<p class="author">Author: TREX CoE</p> <p class="author">Author: TREX CoE</p>
<p class="date">Created: 2021-03-19 Fri 17:18</p> <p class="date">Created: 2021-03-19 Fri 18:00</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p> <p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div> </div>
</body> </body>