mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-11-03 20:54:09 +01:00
Deploying to gh-pages from @ TREX-CoE/qmckl@1504330500 🚀
This commit is contained in:
parent
6601907b7a
commit
df88ceaaf5
@ -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-05-18 Tue 10:33 -->
|
||||
<!-- 2021-05-18 Tue 23:32 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>QMCkl source code documentation</title>
|
||||
@ -320,6 +320,8 @@ for the JavaScript code in this tag.
|
||||
<li><a href="./qmckl_electron.html">Electrons</a></li>
|
||||
<li><a href="./qmckl_ao.html">Atomic Orbitals</a></li>
|
||||
<li><a href="./qmckl_distance.html">Inter-particle distances</a></li>
|
||||
<li><a href="./qmckl_utils.html">Utility functions</a></li>
|
||||
<li><a href="./qmckl_tests.html">Data for Tests</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
@ -350,7 +352,7 @@ and bug reports should be submitted at
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2021-05-18 Tue 10:33</p>
|
||||
<p class="date">Created: 2021-05-18 Tue 23:32</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
102
qmckl.html
102
qmckl.html
@ -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-05-18 Tue 10:33 -->
|
||||
<!-- 2021-05-18 Tue 23:32 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Introduction</title>
|
||||
@ -333,30 +333,30 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org8732f54">1. Using QMCkl</a></li>
|
||||
<li><a href="#org72375bf">2. Developing in QMCkl</a>
|
||||
<li><a href="#orgd1006c4">1. Using QMCkl</a></li>
|
||||
<li><a href="#orga0b07a9">2. Developing in QMCkl</a>
|
||||
<ul>
|
||||
<li><a href="#org2fd5baf">2.1. Literate programming</a></li>
|
||||
<li><a href="#orgeca8f61">2.2. Source code editing</a></li>
|
||||
<li><a href="#org6344806">2.3. Choice of the programming language</a></li>
|
||||
<li><a href="#org18c6ca4">2.4. Coding rules</a></li>
|
||||
<li><a href="#org7c2077d">2.5. Design of the library</a></li>
|
||||
<li><a href="#org05b95f0">2.6. Naming conventions</a></li>
|
||||
<li><a href="#org8da24c9">2.7. Application programming interface</a></li>
|
||||
<li><a href="#org0b94751">2.8. Global state</a></li>
|
||||
<li><a href="#org3e8524f">2.9. Headers</a></li>
|
||||
<li><a href="#org6a0c67f">2.10. Low-level functions</a></li>
|
||||
<li><a href="#org5ef4513">2.11. High-level functions</a></li>
|
||||
<li><a href="#orgaca373f">2.12. Numerical precision</a></li>
|
||||
<li><a href="#orgd9442d3">2.13. Algorithms</a></li>
|
||||
<li><a href="#orgf235310">2.1. Literate programming</a></li>
|
||||
<li><a href="#org2efd276">2.2. Source code editing</a></li>
|
||||
<li><a href="#org91a43fd">2.3. Choice of the programming language</a></li>
|
||||
<li><a href="#org0bb366f">2.4. Coding rules</a></li>
|
||||
<li><a href="#orgd5dd075">2.5. Design of the library</a></li>
|
||||
<li><a href="#org7092a15">2.6. Naming conventions</a></li>
|
||||
<li><a href="#org0811a18">2.7. Application programming interface</a></li>
|
||||
<li><a href="#orgd4e885b">2.8. Global state</a></li>
|
||||
<li><a href="#orgd9d3690">2.9. Headers</a></li>
|
||||
<li><a href="#org19e4e9e">2.10. Low-level functions</a></li>
|
||||
<li><a href="#org64e0a70">2.11. High-level functions</a></li>
|
||||
<li><a href="#org96f36d7">2.12. Numerical precision</a></li>
|
||||
<li><a href="#org9785916">2.13. Algorithms</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org8732f54" class="outline-2">
|
||||
<h2 id="org8732f54"><span class="section-number-2">1</span> Using QMCkl</h2>
|
||||
<div id="outline-container-orgd1006c4" class="outline-2">
|
||||
<h2 id="orgd1006c4"><span class="section-number-2">1</span> Using QMCkl</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
<p>
|
||||
The <code>qmckl.h</code> header file installed in the <code>${prefix}/include</code> directory
|
||||
@ -385,12 +385,12 @@ Both files are located in the <code>include/</code> directory.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org72375bf" class="outline-2">
|
||||
<h2 id="org72375bf"><span class="section-number-2">2</span> Developing in QMCkl</h2>
|
||||
<div id="outline-container-orga0b07a9" class="outline-2">
|
||||
<h2 id="orga0b07a9"><span class="section-number-2">2</span> Developing in QMCkl</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
</div>
|
||||
<div id="outline-container-org2fd5baf" class="outline-3">
|
||||
<h3 id="org2fd5baf"><span class="section-number-3">2.1</span> Literate programming</h3>
|
||||
<div id="outline-container-orgf235310" class="outline-3">
|
||||
<h3 id="orgf235310"><span class="section-number-3">2.1</span> Literate programming</h3>
|
||||
<div class="outline-text-3" id="text-2-1">
|
||||
<p>
|
||||
In a traditional source code, most of the lines of source files of a program
|
||||
@ -435,8 +435,8 @@ interactively, in the same spirit as Jupyter notebooks.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgeca8f61" class="outline-3">
|
||||
<h3 id="orgeca8f61"><span class="section-number-3">2.2</span> Source code editing</h3>
|
||||
<div id="outline-container-org2efd276" class="outline-3">
|
||||
<h3 id="org2efd276"><span class="section-number-3">2.2</span> Source code editing</h3>
|
||||
<div class="outline-text-3" id="text-2-2">
|
||||
<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>.
|
||||
@ -467,8 +467,8 @@ org-mode.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6344806" class="outline-3">
|
||||
<h3 id="org6344806"><span class="section-number-3">2.3</span> Choice of the programming language</h3>
|
||||
<div id="outline-container-org91a43fd" class="outline-3">
|
||||
<h3 id="org91a43fd"><span class="section-number-3">2.3</span> Choice of the programming language</h3>
|
||||
<div class="outline-text-3" id="text-2-3">
|
||||
<p>
|
||||
Most of the codes of the <a href="https://trex-coe.eu">TREX CoE</a> are written in Fortran with some scripts in
|
||||
@ -516,8 +516,8 @@ For more guidelines on using Fortran to generate a C interface, see
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org18c6ca4" class="outline-3">
|
||||
<h3 id="org18c6ca4"><span class="section-number-3">2.4</span> Coding rules</h3>
|
||||
<div id="outline-container-org0bb366f" class="outline-3">
|
||||
<h3 id="org0bb366f"><span class="section-number-3">2.4</span> Coding rules</h3>
|
||||
<div class="outline-text-3" id="text-2-4">
|
||||
<p>
|
||||
The authors should follow the recommendations of the C99
|
||||
@ -535,8 +535,8 @@ Compliance can be checked with <code>cppcheck</code> as:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org7c2077d" class="outline-3">
|
||||
<h3 id="org7c2077d"><span class="section-number-3">2.5</span> Design of the library</h3>
|
||||
<div id="outline-container-orgd5dd075" class="outline-3">
|
||||
<h3 id="orgd5dd075"><span class="section-number-3">2.5</span> Design of the library</h3>
|
||||
<div class="outline-text-3" id="text-2-5">
|
||||
<p>
|
||||
The proposed API should allow the library to: deal with memory transfers
|
||||
@ -547,8 +547,8 @@ functions (see below).
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org05b95f0" class="outline-3">
|
||||
<h3 id="org05b95f0"><span class="section-number-3">2.6</span> Naming conventions</h3>
|
||||
<div id="outline-container-org7092a15" class="outline-3">
|
||||
<h3 id="org7092a15"><span class="section-number-3">2.6</span> Naming conventions</h3>
|
||||
<div class="outline-text-3" id="text-2-6">
|
||||
<p>
|
||||
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 id="outline-container-org8da24c9" class="outline-3">
|
||||
<h3 id="org8da24c9"><span class="section-number-3">2.7</span> Application programming interface</h3>
|
||||
<div id="outline-container-org0811a18" class="outline-3">
|
||||
<h3 id="org0811a18"><span class="section-number-3">2.7</span> Application programming interface</h3>
|
||||
<div class="outline-text-3" id="text-2-7">
|
||||
<p>
|
||||
In the C language, the number of bits used by the integer types can change
|
||||
@ -606,15 +606,15 @@ bindings in other languages in other repositories.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org0b94751" class="outline-3">
|
||||
<h3 id="org0b94751"><span class="section-number-3">2.8</span> Global state</h3>
|
||||
<div id="outline-container-orgd4e885b" class="outline-3">
|
||||
<h3 id="orgd4e885b"><span class="section-number-3">2.8</span> Global state</h3>
|
||||
<div class="outline-text-3" id="text-2-8">
|
||||
<p>
|
||||
Global variables should be avoided in the library, because it is
|
||||
possible that one single program needs to use multiple instances
|
||||
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
|
||||
<code>qmckl_context_create</code> function. The <a id="orge351a7b">=context=</a> contains the global
|
||||
<code>qmckl_context_create</code> function. The <a id="org6c95d82">=context=</a> contains the global
|
||||
state of the library, and is used as the first argument of many
|
||||
QMCkl functions.
|
||||
</p>
|
||||
@ -628,8 +628,8 @@ the state is done by setters and getters, prefixed by
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org3e8524f" class="outline-3">
|
||||
<h3 id="org3e8524f"><span class="section-number-3">2.9</span> Headers</h3>
|
||||
<div id="outline-container-orgd9d3690" class="outline-3">
|
||||
<h3 id="orgd9d3690"><span class="section-number-3">2.9</span> Headers</h3>
|
||||
<div class="outline-text-3" id="text-2-9">
|
||||
<p>
|
||||
A single <code>qmckl.h</code> header to be distributed by the library
|
||||
@ -717,8 +717,8 @@ and the types definitions should be written in the <code>*_f_type.f90</code> fil
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6a0c67f" class="outline-3">
|
||||
<h3 id="org6a0c67f"><span class="section-number-3">2.10</span> Low-level functions</h3>
|
||||
<div id="outline-container-org19e4e9e" class="outline-3">
|
||||
<h3 id="org19e4e9e"><span class="section-number-3">2.10</span> Low-level functions</h3>
|
||||
<div class="outline-text-3" id="text-2-10">
|
||||
<p>
|
||||
Low-level functions are very simple functions which are leaves of
|
||||
@ -727,14 +727,14 @@ the function call tree (they don't call any other QMCkl function).
|
||||
|
||||
<p>
|
||||
These functions are <i>pure</i>, and unaware of the QMCkl
|
||||
<a href="#orge351a7b"><code>context</code></a>. They are not allowed to allocate/deallocate memory, and
|
||||
<a href="#org6c95d82"><code>context</code></a>. They are not allowed to allocate/deallocate memory, and
|
||||
if they need temporary memory it should be provided in input.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org5ef4513" class="outline-3">
|
||||
<h3 id="org5ef4513"><span class="section-number-3">2.11</span> High-level functions</h3>
|
||||
<div id="outline-container-org64e0a70" class="outline-3">
|
||||
<h3 id="org64e0a70"><span class="section-number-3">2.11</span> High-level functions</h3>
|
||||
<div class="outline-text-3" id="text-2-11">
|
||||
<p>
|
||||
High-level functions are at the top of the function call tree.
|
||||
@ -747,27 +747,27 @@ temporary storage, to simplify the use of accelerators.
|
||||
<p>
|
||||
The high-level functions should be pure, unless the introduction
|
||||
of non-purity is justified. All the side effects should be made in
|
||||
the <a href="#orge351a7b"><code>context</code></a> variable.
|
||||
the <a href="#org6c95d82"><code>context</code></a> variable.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgaca373f" class="outline-3">
|
||||
<h3 id="orgaca373f"><span class="section-number-3">2.12</span> Numerical precision</h3>
|
||||
<div id="outline-container-org96f36d7" class="outline-3">
|
||||
<h3 id="org96f36d7"><span class="section-number-3">2.12</span> Numerical precision</h3>
|
||||
<div class="outline-text-3" id="text-2-12">
|
||||
<p>
|
||||
The number of bits of precision required for a function should be
|
||||
given as an input of low-level computational functions. This input
|
||||
will be used to define the values of the different thresholds that
|
||||
might be used to avoid computing unnecessary noise. High-level
|
||||
functions will use the precision specified in the <a href="#orge351a7b"><code>context</code></a>
|
||||
functions will use the precision specified in the <a href="#org6c95d82"><code>context</code></a>
|
||||
variable.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd9442d3" class="outline-3">
|
||||
<h3 id="orgd9442d3"><span class="section-number-3">2.13</span> Algorithms</h3>
|
||||
<div id="outline-container-org9785916" class="outline-3">
|
||||
<h3 id="org9785916"><span class="section-number-3">2.13</span> Algorithms</h3>
|
||||
<div class="outline-text-3" id="text-2-13">
|
||||
<p>
|
||||
Reducing the scaling of an algorithm usually implies also reducing
|
||||
@ -783,7 +783,7 @@ implemented adapted to different problem sizes.
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2021-05-18 Tue 10:33</p>
|
||||
<p class="date">Created: 2021-05-18 Tue 23:32</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
158
qmckl_ao.html
158
qmckl_ao.html
@ -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-05-18 Tue 10:33 -->
|
||||
<!-- 2021-05-18 Tue 23:32 -->
|
||||
<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>
|
||||
@ -333,52 +333,52 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org863b0d4">1. Context</a>
|
||||
<li><a href="#orge566884">1. Context</a>
|
||||
<ul>
|
||||
<li><a href="#org3dd1c32">1.1. Data structure</a></li>
|
||||
<li><a href="#org9d91b4a">1.2. Access functions</a></li>
|
||||
<li><a href="#org4607a3d">1.3. Initialization functions</a></li>
|
||||
<li><a href="#org70b0e20">1.4. <span class="todo TODO">TODO</span> Fortran interfaces</a></li>
|
||||
<li><a href="#org2c49619">1.1. Data structure</a></li>
|
||||
<li><a href="#org97c8b5c">1.2. Access functions</a></li>
|
||||
<li><a href="#org28fd348">1.3. Initialization functions</a></li>
|
||||
<li><a href="#orga0917a7">1.4. <span class="todo TODO">TODO</span> Fortran interfaces</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgf5f4b46">2. Polynomial part</a>
|
||||
<li><a href="#orga732f29">2. Polynomial part</a>
|
||||
<ul>
|
||||
<li><a href="#orge5c06eb">2.1. Powers of \(x-X_i\)</a>
|
||||
<li><a href="#org0689079">2.1. Powers of \(x-X_i\)</a>
|
||||
<ul>
|
||||
<li><a href="#org9087143">2.1.1. Requirements</a></li>
|
||||
<li><a href="#orge43dd13">2.1.2. C Header</a></li>
|
||||
<li><a href="#orgf7c150c">2.1.3. Source</a></li>
|
||||
<li><a href="#org69a0758">2.1.4. C interface</a></li>
|
||||
<li><a href="#org7b89bd3">2.1.5. Fortran interface</a></li>
|
||||
<li><a href="#org6bc139e">2.1.6. Test</a></li>
|
||||
<li><a href="#org5f8e212">2.1.1. Requirements</a></li>
|
||||
<li><a href="#orgdd6b0af">2.1.2. C Header</a></li>
|
||||
<li><a href="#org3a10081">2.1.3. Source</a></li>
|
||||
<li><a href="#orgf57b5e6">2.1.4. C interface</a></li>
|
||||
<li><a href="#org898f254">2.1.5. Fortran interface</a></li>
|
||||
<li><a href="#orgb4ff218">2.1.6. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org0caea4a">2.2. Value, Gradient and Laplacian of a polynomial</a>
|
||||
<li><a href="#org9aa3e7c">2.2. Value, Gradient and Laplacian of a polynomial</a>
|
||||
<ul>
|
||||
<li><a href="#org73fe6fb">2.2.1. Requirements</a></li>
|
||||
<li><a href="#org4ec074f">2.2.2. C Header</a></li>
|
||||
<li><a href="#orgd7ade7f">2.2.3. Source</a></li>
|
||||
<li><a href="#org3a56acc">2.2.4. C interface</a></li>
|
||||
<li><a href="#org6227e9d">2.2.5. Fortran interface</a></li>
|
||||
<li><a href="#org8c26478">2.2.6. Test</a></li>
|
||||
<li><a href="#org05f71d2">2.2.1. Requirements</a></li>
|
||||
<li><a href="#org1527e1b">2.2.2. C Header</a></li>
|
||||
<li><a href="#orgc927910">2.2.3. Source</a></li>
|
||||
<li><a href="#org172b6f2">2.2.4. C interface</a></li>
|
||||
<li><a href="#org2d4b852">2.2.5. Fortran interface</a></li>
|
||||
<li><a href="#org6fd7e9b">2.2.6. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgc8ad16a">3. Radial part</a>
|
||||
<li><a href="#org42e061e">3. Radial part</a>
|
||||
<ul>
|
||||
<li><a href="#org8a338ee">3.1. Gaussian basis functions</a></li>
|
||||
<li><a href="#org320ff80">3.2. <span class="todo TODO">TODO</span> Slater basis functions</a></li>
|
||||
<li><a href="#org2309ef2">3.3. <span class="todo TODO">TODO</span> Radial functions on a grid</a></li>
|
||||
<li><a href="#org9c9f595">3.1. Gaussian basis functions</a></li>
|
||||
<li><a href="#org1a9549b">3.2. <span class="todo TODO">TODO</span> Slater basis functions</a></li>
|
||||
<li><a href="#org70b226c">3.3. <span class="todo TODO">TODO</span> Radial functions on a grid</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgdbf8f98">4. Combining radial and polynomial parts</a></li>
|
||||
<li><a href="#orgaca3955">4. Combining radial and polynomial parts</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org863b0d4" class="outline-2">
|
||||
<h2 id="org863b0d4"><span class="section-number-2">1</span> Context</h2>
|
||||
<div id="outline-container-orge566884" class="outline-2">
|
||||
<h2 id="orge566884"><span class="section-number-2">1</span> Context</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
<p>
|
||||
The following arrays are stored in the context:
|
||||
@ -503,8 +503,8 @@ coefficient = [ 0.006068, 0.045308, 0.202822, 0.503903, 0.383421,
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org3dd1c32" class="outline-3">
|
||||
<h3 id="org3dd1c32"><span class="section-number-3">1.1</span> Data structure</h3>
|
||||
<div id="outline-container-org2c49619" class="outline-3">
|
||||
<h3 id="org2c49619"><span class="section-number-3">1.1</span> Data structure</h3>
|
||||
<div class="outline-text-3" id="text-1-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #a020f0;">typedef</span> <span style="color: #a020f0;">struct</span> <span style="color: #228b22;">qmckl_ao_basis_struct</span> {
|
||||
@ -533,8 +533,8 @@ struct is then initialized and <code>provided == true</code>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org9d91b4a" class="outline-3">
|
||||
<h3 id="org9d91b4a"><span class="section-number-3">1.2</span> Access functions</h3>
|
||||
<div id="outline-container-org97c8b5c" class="outline-3">
|
||||
<h3 id="org97c8b5c"><span class="section-number-3">1.2</span> Access functions</h3>
|
||||
<div class="outline-text-3" id="text-1-2">
|
||||
<p>
|
||||
When all the data for the AOs have been provided, the following
|
||||
@ -548,8 +548,8 @@ function returns <code>true</code>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org4607a3d" class="outline-3">
|
||||
<h3 id="org4607a3d"><span class="section-number-3">1.3</span> Initialization functions</h3>
|
||||
<div id="outline-container-org28fd348" class="outline-3">
|
||||
<h3 id="org28fd348"><span class="section-number-3">1.3</span> Initialization functions</h3>
|
||||
<div class="outline-text-3" id="text-1-3">
|
||||
<p>
|
||||
To set the basis set, all the following functions need to be
|
||||
@ -572,17 +572,17 @@ called. When
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org70b0e20" class="outline-3">
|
||||
<h3 id="org70b0e20"><span class="section-number-3">1.4</span> <span class="todo TODO">TODO</span> Fortran interfaces</h3>
|
||||
<div id="outline-container-orga0917a7" class="outline-3">
|
||||
<h3 id="orga0917a7"><span class="section-number-3">1.4</span> <span class="todo TODO">TODO</span> Fortran interfaces</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf5f4b46" class="outline-2">
|
||||
<h2 id="orgf5f4b46"><span class="section-number-2">2</span> Polynomial part</h2>
|
||||
<div id="outline-container-orga732f29" class="outline-2">
|
||||
<h2 id="orga732f29"><span class="section-number-2">2</span> Polynomial part</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
</div>
|
||||
<div id="outline-container-orge5c06eb" class="outline-3">
|
||||
<h3 id="orge5c06eb"><span class="section-number-3">2.1</span> Powers of \(x-X_i\)</h3>
|
||||
<div id="outline-container-org0689079" class="outline-3">
|
||||
<h3 id="org0689079"><span class="section-number-3">2.1</span> Powers of \(x-X_i\)</h3>
|
||||
<div class="outline-text-3" id="text-2-1">
|
||||
<p>
|
||||
The <code>qmckl_ao_power</code> function computes all the powers of the <code>n</code>
|
||||
@ -594,7 +594,7 @@ the \(n\) points:
|
||||
\[ P_{ik} = X_i^k \]
|
||||
</p>
|
||||
|
||||
<table id="orga189a72" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org6373930" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -652,8 +652,8 @@ the \(n\) points:
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org9087143" class="outline-4">
|
||||
<h4 id="org9087143"><span class="section-number-4">2.1.1</span> Requirements</h4>
|
||||
<div id="outline-container-org5f8e212" class="outline-4">
|
||||
<h4 id="org5f8e212"><span class="section-number-4">2.1.1</span> Requirements</h4>
|
||||
<div class="outline-text-4" id="text-2-1-1">
|
||||
<ul class="org-ul">
|
||||
<li><code>context</code> is not <code>QMCKL_NULL_CONTEXT</code></li>
|
||||
@ -666,8 +666,8 @@ the \(n\) points:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge43dd13" class="outline-4">
|
||||
<h4 id="orge43dd13"><span class="section-number-4">2.1.2</span> C Header</h4>
|
||||
<div id="outline-container-orgdd6b0af" class="outline-4">
|
||||
<h4 id="orgdd6b0af"><span class="section-number-4">2.1.2</span> C Header</h4>
|
||||
<div class="outline-text-4" id="text-2-1-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #0000ff;">qmckl_ao_power</span> (
|
||||
@ -682,8 +682,8 @@ the \(n\) points:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf7c150c" class="outline-4">
|
||||
<h4 id="orgf7c150c"><span class="section-number-4">2.1.3</span> Source</h4>
|
||||
<div id="outline-container-org3a10081" class="outline-4">
|
||||
<h4 id="org3a10081"><span class="section-number-4">2.1.3</span> Source</h4>
|
||||
<div class="outline-text-4" id="text-2-1-3">
|
||||
<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_ao_power_f</span><span style="color: #000000; background-color: #ffffff;">(context, n, X, LMAX, P, ldp) result(info)</span>
|
||||
@ -734,15 +734,15 @@ the \(n\) points:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org69a0758" class="outline-4">
|
||||
<h4 id="org69a0758"><span class="section-number-4">2.1.4</span> C interface</h4>
|
||||
<div id="outline-container-orgf57b5e6" class="outline-4">
|
||||
<h4 id="orgf57b5e6"><span class="section-number-4">2.1.4</span> C interface</h4>
|
||||
</div>
|
||||
<div id="outline-container-org7b89bd3" class="outline-4">
|
||||
<h4 id="org7b89bd3"><span class="section-number-4">2.1.5</span> Fortran interface</h4>
|
||||
<div id="outline-container-org898f254" class="outline-4">
|
||||
<h4 id="org898f254"><span class="section-number-4">2.1.5</span> Fortran interface</h4>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6bc139e" class="outline-4">
|
||||
<h4 id="org6bc139e"><span class="section-number-4">2.1.6</span> Test</h4>
|
||||
<div id="outline-container-orgb4ff218" class="outline-4">
|
||||
<h4 id="orgb4ff218"><span class="section-number-4">2.1.6</span> Test</h4>
|
||||
<div class="outline-text-4" id="text-2-1-6">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90"><span style="color: #228b22;">integer</span>(<span style="color: #008b8b;">c_int32_t</span>) <span style="color: #a020f0;">function</span> <span style="color: #0000ff;">test_qmckl_ao_power</span>(context) <span style="color: #a020f0;">bind</span>(C)
|
||||
@ -793,8 +793,8 @@ the \(n\) points:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org0caea4a" class="outline-3">
|
||||
<h3 id="org0caea4a"><span class="section-number-3">2.2</span> Value, Gradient and Laplacian of a polynomial</h3>
|
||||
<div id="outline-container-org9aa3e7c" class="outline-3">
|
||||
<h3 id="org9aa3e7c"><span class="section-number-3">2.2</span> Value, Gradient and Laplacian of a polynomial</h3>
|
||||
<div class="outline-text-3" id="text-2-2">
|
||||
<p>
|
||||
A polynomial is centered on a nucleus \(\mathbf{R}_i\)
|
||||
@ -839,7 +839,7 @@ Laplacians at a given point in space, of all polynomials with an
|
||||
angular momentum up to <code>lmax</code>.
|
||||
</p>
|
||||
|
||||
<table id="org79789d9" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orge94f30d" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -918,8 +918,8 @@ angular momentum up to <code>lmax</code>.
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org73fe6fb" class="outline-4">
|
||||
<h4 id="org73fe6fb"><span class="section-number-4">2.2.1</span> Requirements</h4>
|
||||
<div id="outline-container-org05f71d2" class="outline-4">
|
||||
<h4 id="org05f71d2"><span class="section-number-4">2.2.1</span> Requirements</h4>
|
||||
<div class="outline-text-4" id="text-2-2-1">
|
||||
<ul class="org-ul">
|
||||
<li><code>context</code> is not <code>QMCKL_NULL_CONTEXT</code></li>
|
||||
@ -944,8 +944,8 @@ For example, with a=0, b=2 and c=1 the string is "yyz"</li>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org4ec074f" class="outline-4">
|
||||
<h4 id="org4ec074f"><span class="section-number-4">2.2.2</span> C Header</h4>
|
||||
<div id="outline-container-org1527e1b" class="outline-4">
|
||||
<h4 id="org1527e1b"><span class="section-number-4">2.2.2</span> C Header</h4>
|
||||
<div class="outline-text-4" id="text-2-2-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #0000ff;">qmckl_ao_polynomial_vgl</span> (
|
||||
@ -963,8 +963,8 @@ For example, with a=0, b=2 and c=1 the string is "yyz"</li>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd7ade7f" class="outline-4">
|
||||
<h4 id="orgd7ade7f"><span class="section-number-4">2.2.3</span> Source</h4>
|
||||
<div id="outline-container-orgc927910" class="outline-4">
|
||||
<h4 id="orgc927910"><span class="section-number-4">2.2.3</span> Source</h4>
|
||||
<div class="outline-text-4" id="text-2-2-3">
|
||||
<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_ao_polynomial_vgl_f</span><span style="color: #000000; background-color: #ffffff;">(context, X, R, lmax, n, L, ldl, VGL, ldv) result(info)</span>
|
||||
@ -1099,16 +1099,16 @@ For example, with a=0, b=2 and c=1 the string is "yyz"</li>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org3a56acc" class="outline-4">
|
||||
<h4 id="org3a56acc"><span class="section-number-4">2.2.4</span> C interface</h4>
|
||||
<div id="outline-container-org172b6f2" class="outline-4">
|
||||
<h4 id="org172b6f2"><span class="section-number-4">2.2.4</span> C interface</h4>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6227e9d" class="outline-4">
|
||||
<h4 id="org6227e9d"><span class="section-number-4">2.2.5</span> Fortran interface</h4>
|
||||
<div id="outline-container-org2d4b852" class="outline-4">
|
||||
<h4 id="org2d4b852"><span class="section-number-4">2.2.5</span> Fortran interface</h4>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org8c26478" class="outline-4">
|
||||
<h4 id="org8c26478"><span class="section-number-4">2.2.6</span> Test</h4>
|
||||
<div id="outline-container-org6fd7e9b" class="outline-4">
|
||||
<h4 id="org6fd7e9b"><span class="section-number-4">2.2.6</span> Test</h4>
|
||||
<div class="outline-text-4" id="text-2-2-6">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90"><span style="color: #228b22;">integer</span>(<span style="color: #008b8b;">c_int32_t</span>) <span style="color: #a020f0;">function</span> <span style="color: #0000ff;">test_qmckl_ao_polynomial_vgl</span>(context) <span style="color: #a020f0;">bind</span>(C)
|
||||
@ -1213,12 +1213,12 @@ assert(0 == test_qmckl_ao_polynomial_vgl(context));
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgc8ad16a" class="outline-2">
|
||||
<h2 id="orgc8ad16a"><span class="section-number-2">3</span> Radial part</h2>
|
||||
<div id="outline-container-org42e061e" class="outline-2">
|
||||
<h2 id="org42e061e"><span class="section-number-2">3</span> Radial part</h2>
|
||||
<div class="outline-text-2" id="text-3">
|
||||
</div>
|
||||
<div id="outline-container-org8a338ee" class="outline-3">
|
||||
<h3 id="org8a338ee"><span class="section-number-3">3.1</span> Gaussian basis functions</h3>
|
||||
<div id="outline-container-org9c9f595" class="outline-3">
|
||||
<h3 id="org9c9f595"><span class="section-number-3">3.1</span> Gaussian basis functions</h3>
|
||||
<div class="outline-text-3" id="text-3-1">
|
||||
<p>
|
||||
<code>qmckl_ao_gaussian_vgl</code> computes the values, gradients and
|
||||
@ -1450,21 +1450,21 @@ Requirements
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org320ff80" class="outline-3">
|
||||
<h3 id="org320ff80"><span class="section-number-3">3.2</span> <span class="todo TODO">TODO</span> Slater basis functions</h3>
|
||||
<div id="outline-container-org1a9549b" class="outline-3">
|
||||
<h3 id="org1a9549b"><span class="section-number-3">3.2</span> <span class="todo TODO">TODO</span> Slater basis functions</h3>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org2309ef2" class="outline-3">
|
||||
<h3 id="org2309ef2"><span class="section-number-3">3.3</span> <span class="todo TODO">TODO</span> Radial functions on a grid</h3>
|
||||
<div id="outline-container-org70b226c" class="outline-3">
|
||||
<h3 id="org70b226c"><span class="section-number-3">3.3</span> <span class="todo TODO">TODO</span> Radial functions on a grid</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-orgdbf8f98" class="outline-2">
|
||||
<h2 id="orgdbf8f98"><span class="section-number-2">4</span> Combining radial and polynomial parts</h2>
|
||||
<div id="outline-container-orgaca3955" class="outline-2">
|
||||
<h2 id="orgaca3955"><span class="section-number-2">4</span> Combining radial and polynomial parts</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2021-05-18 Tue 10:33</p>
|
||||
<p class="date">Created: 2021-05-18 Tue 23:32</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -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-05-18 Tue 10:33 -->
|
||||
<!-- 2021-05-18 Tue 23:32 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Context</title>
|
||||
@ -311,21 +311,21 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#orge0b125a">1. Context handling</a>
|
||||
<li><a href="#org6298d6e">1. Context handling</a>
|
||||
<ul>
|
||||
<li><a href="#orgb7b6401">1.1. Data structure</a></li>
|
||||
<li><a href="#orgb3f6bbf">1.2. Creation</a></li>
|
||||
<li><a href="#orgd4a2ce0">1.3. Locking</a></li>
|
||||
<li><a href="#orgae5a1bf">1.4. <span class="todo TODO">TODO</span> Copy</a></li>
|
||||
<li><a href="#orgce1aa9b">1.5. Destroy</a></li>
|
||||
<li><a href="#org5b6c069">1.1. Data structure</a></li>
|
||||
<li><a href="#orgcd54caa">1.2. Creation</a></li>
|
||||
<li><a href="#org68f7f9f">1.3. Locking</a></li>
|
||||
<li><a href="#orgb6b1ac9">1.4. <span class="todo TODO">TODO</span> Copy</a></li>
|
||||
<li><a href="#orge80cdd5">1.5. Destroy</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge0b125a" class="outline-2">
|
||||
<h2 id="orge0b125a"><span class="section-number-2">1</span> Context handling</h2>
|
||||
<div id="outline-container-org6298d6e" class="outline-2">
|
||||
<h2 id="org6298d6e"><span class="section-number-2">1</span> Context handling</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
<p>
|
||||
The context variable is a handle for the state of the library,
|
||||
@ -338,7 +338,7 @@ A value of <code>QMCKL_NULL_CONTEXT</code> for the context is equivalent to a
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c" id="orgb60c4d2"><span style="color: #a020f0;">typedef</span> <span style="color: #228b22;">int64_t</span> <span style="color: #228b22;">qmckl_context</span> ;
|
||||
<pre class="src src-c" id="org51ef2cd"><span style="color: #a020f0;">typedef</span> <span style="color: #228b22;">int64_t</span> <span style="color: #228b22;">qmckl_context</span> ;
|
||||
<span style="color: #483d8b;">#define</span> <span style="color: #a0522d;">QMCKL_NULL_CONTEXT</span> (qmckl_context) 0
|
||||
</pre>
|
||||
</div>
|
||||
@ -356,8 +356,8 @@ and <code>ctx</code> is a <code>qmckl_context_struct*</code> pointer.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgb7b6401" class="outline-3">
|
||||
<h3 id="orgb7b6401"><span class="section-number-3">1.1</span> Data structure</h3>
|
||||
<div id="outline-container-org5b6c069" class="outline-3">
|
||||
<h3 id="org5b6c069"><span class="section-number-3">1.1</span> Data structure</h3>
|
||||
<div class="outline-text-3" id="text-1-1">
|
||||
<p>
|
||||
The context keeps a ``date'' that allows to check which data needs
|
||||
@ -367,7 +367,7 @@ coordinates are updated.
|
||||
|
||||
<p>
|
||||
When a new element is added to the context, the functions
|
||||
<a href="#orgb3f6bbf">qmckl<sub>context</sub><sub>create</sub></a>, <a href="#orgce1aa9b">qmckl<sub>context</sub><sub>destroy</sub></a> and <a href="#orgae5a1bf">qmckl<sub>context</sub><sub>copy</sub></a>
|
||||
<a href="#orgcd54caa">qmckl<sub>context</sub><sub>create</sub></a>, <a href="#orge80cdd5">qmckl<sub>context</sub><sub>destroy</sub></a> and <a href="#orgb6b1ac9">qmckl<sub>context</sub><sub>copy</sub></a>
|
||||
should be updated inorder to make deep copies.
|
||||
</p>
|
||||
|
||||
@ -416,8 +416,8 @@ if the context is valid, <code>QMCKL_NULL_CONTEXT</code> otherwise.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgb3f6bbf" class="outline-3">
|
||||
<h3 id="orgb3f6bbf"><span class="section-number-3">1.2</span> Creation</h3>
|
||||
<div id="outline-container-orgcd54caa" class="outline-3">
|
||||
<h3 id="orgcd54caa"><span class="section-number-3">1.2</span> Creation</h3>
|
||||
<div class="outline-text-3" id="text-1-2">
|
||||
<p>
|
||||
To create a new context, <code>qmckl_context_create()</code> should be used.
|
||||
@ -492,8 +492,8 @@ To create a new context, <code>qmckl_context_create()</code> should be used.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-orgd4a2ce0" class="outline-3">
|
||||
<h3 id="orgd4a2ce0"><span class="section-number-3">1.3</span> Locking</h3>
|
||||
<div id="outline-container-org68f7f9f" class="outline-3">
|
||||
<h3 id="org68f7f9f"><span class="section-number-3">1.3</span> Locking</h3>
|
||||
<div class="outline-text-3" id="text-1-3">
|
||||
<p>
|
||||
For thread safety, the context may be locked/unlocked. The lock is
|
||||
@ -538,8 +538,8 @@ number of times the thread has locked it is saved in the
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgae5a1bf" class="outline-3">
|
||||
<h3 id="orgae5a1bf"><span class="section-number-3">1.4</span> <span class="todo TODO">TODO</span> Copy</h3>
|
||||
<div id="outline-container-orgb6b1ac9" class="outline-3">
|
||||
<h3 id="orgb6b1ac9"><span class="section-number-3">1.4</span> <span class="todo TODO">TODO</span> Copy</h3>
|
||||
<div class="outline-text-3" id="text-1-4">
|
||||
<p>
|
||||
<code>qmckl_context_copy</code> makes a deep copy of a context. It returns
|
||||
@ -587,8 +587,8 @@ number of times the thread has locked it is saved in the
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-orgce1aa9b" class="outline-3">
|
||||
<h3 id="orgce1aa9b"><span class="section-number-3">1.5</span> Destroy</h3>
|
||||
<div id="outline-container-orge80cdd5" class="outline-3">
|
||||
<h3 id="orge80cdd5"><span class="section-number-3">1.5</span> Destroy</h3>
|
||||
<div class="outline-text-3" id="text-1-5">
|
||||
<p>
|
||||
The context is destroyed with <code>qmckl_context_destroy</code>, leaving the ancestors untouched.
|
||||
@ -642,7 +642,7 @@ It frees the context, and returns the previous context.
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2021-05-18 Tue 10:33</p>
|
||||
<p class="date">Created: 2021-05-18 Tue 23:32</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -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-05-18 Tue 10:33 -->
|
||||
<!-- 2021-05-18 Tue 23:33 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Inter-particle distances</title>
|
||||
@ -333,26 +333,26 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org86817a7">1. Squared distance</a>
|
||||
<li><a href="#orgfd597cc">1. Squared distance</a>
|
||||
<ul>
|
||||
<li><a href="#org5e174ce">1.1. <code>qmckl_distance_sq</code></a>
|
||||
<li><a href="#orgf842b40">1.1. <code>qmckl_distance_sq</code></a>
|
||||
<ul>
|
||||
<li><a href="#orga7edc85">1.1.1. Requirements</a></li>
|
||||
<li><a href="#orgf21fa6c">1.1.2. C header</a></li>
|
||||
<li><a href="#org73e82f5">1.1.3. Source</a></li>
|
||||
<li><a href="#orgee238a2">1.1.4. Performance</a></li>
|
||||
<li><a href="#orgca18732">1.1.1. Requirements</a></li>
|
||||
<li><a href="#org6b79fc4">1.1.2. C header</a></li>
|
||||
<li><a href="#orgd7230eb">1.1.3. Source</a></li>
|
||||
<li><a href="#orgbe9540c">1.1.4. Performance</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgeffa0f3">2. Distance</a>
|
||||
<li><a href="#org7b49a08">2. Distance</a>
|
||||
<ul>
|
||||
<li><a href="#org810dd4b">2.1. <code>qmckl_distance</code></a>
|
||||
<li><a href="#orgc93a75f">2.1. <code>qmckl_distance</code></a>
|
||||
<ul>
|
||||
<li><a href="#orgd606c7b">2.1.1. Requirements</a></li>
|
||||
<li><a href="#orgd0757bc">2.1.2. C header</a></li>
|
||||
<li><a href="#org9a6fd22">2.1.3. Source</a></li>
|
||||
<li><a href="#orgb5a07d0">2.1.4. Performance</a></li>
|
||||
<li><a href="#org8a65fdd">2.1.1. Requirements</a></li>
|
||||
<li><a href="#org3a6aa2c">2.1.2. C header</a></li>
|
||||
<li><a href="#orgfc61a7b">2.1.3. Source</a></li>
|
||||
<li><a href="#orgf5df4ab">2.1.4. Performance</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@ -361,12 +361,12 @@ for the JavaScript code in this tag.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org86817a7" class="outline-2">
|
||||
<h2 id="org86817a7"><span class="section-number-2">1</span> Squared distance</h2>
|
||||
<div id="outline-container-orgfd597cc" class="outline-2">
|
||||
<h2 id="orgfd597cc"><span class="section-number-2">1</span> Squared distance</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
</div>
|
||||
<div id="outline-container-org5e174ce" class="outline-3">
|
||||
<h3 id="org5e174ce"><span class="section-number-3">1.1</span> <code>qmckl_distance_sq</code></h3>
|
||||
<div id="outline-container-orgf842b40" class="outline-3">
|
||||
<h3 id="orgf842b40"><span class="section-number-3">1.1</span> <code>qmckl_distance_sq</code></h3>
|
||||
<div class="outline-text-3" id="text-1-1">
|
||||
<p>
|
||||
<code>qmckl_distance_sq</code> computes the matrix of the squared distances
|
||||
@ -379,7 +379,7 @@ between all pairs of points in two sets, one point within each set:
|
||||
\]
|
||||
</p>
|
||||
|
||||
<table id="orgfc17b71" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orgdbc0c13" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -472,8 +472,8 @@ between all pairs of points in two sets, one point within each set:
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orga7edc85" class="outline-4">
|
||||
<h4 id="orga7edc85"><span class="section-number-4">1.1.1</span> Requirements</h4>
|
||||
<div id="outline-container-orgca18732" class="outline-4">
|
||||
<h4 id="orgca18732"><span class="section-number-4">1.1.1</span> Requirements</h4>
|
||||
<div class="outline-text-4" id="text-1-1-1">
|
||||
<ul class="org-ul">
|
||||
<li><code>context</code> is not <code>QMCKL_NULL_CONTEXT</code></li>
|
||||
@ -491,8 +491,8 @@ between all pairs of points in two sets, one point within each set:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf21fa6c" class="outline-4">
|
||||
<h4 id="orgf21fa6c"><span class="section-number-4">1.1.2</span> C header</h4>
|
||||
<div id="outline-container-org6b79fc4" class="outline-4">
|
||||
<h4 id="org6b79fc4"><span class="section-number-4">1.1.2</span> C header</h4>
|
||||
<div class="outline-text-4" id="text-1-1-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #0000ff;">qmckl_distance</span> (
|
||||
@ -512,8 +512,8 @@ between all pairs of points in two sets, one point within each set:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org73e82f5" class="outline-4">
|
||||
<h4 id="org73e82f5"><span class="section-number-4">1.1.3</span> Source</h4>
|
||||
<div id="outline-container-orgd7230eb" class="outline-4">
|
||||
<h4 id="orgd7230eb"><span class="section-number-4">1.1.3</span> Source</h4>
|
||||
<div class="outline-text-4" id="text-1-1-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90"><span style="color: #228b22;">integer</span><span style="color: #a0522d;"> function qmckl_distance_sq_f(context, transa, transb, m, n, </span><span style="color: #a020f0;">&</span>
|
||||
@ -648,23 +648,23 @@ between all pairs of points in two sets, one point within each set:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgee238a2" class="outline-4">
|
||||
<h4 id="orgee238a2"><span class="section-number-4">1.1.4</span> Performance</h4>
|
||||
<div id="outline-container-orgbe9540c" class="outline-4">
|
||||
<h4 id="orgbe9540c"><span class="section-number-4">1.1.4</span> Performance</h4>
|
||||
<div class="outline-text-4" id="text-1-1-4">
|
||||
<p>
|
||||
This function might be more efficient when <code>A</code> and <code>B</code> are
|
||||
This function is more efficient when <code>A</code> and <code>B</code> are
|
||||
transposed.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-orgeffa0f3" class="outline-2">
|
||||
<h2 id="orgeffa0f3"><span class="section-number-2">2</span> Distance</h2>
|
||||
<div id="outline-container-org7b49a08" class="outline-2">
|
||||
<h2 id="org7b49a08"><span class="section-number-2">2</span> Distance</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
</div>
|
||||
<div id="outline-container-org810dd4b" class="outline-3">
|
||||
<h3 id="org810dd4b"><span class="section-number-3">2.1</span> <code>qmckl_distance</code></h3>
|
||||
<div id="outline-container-orgc93a75f" class="outline-3">
|
||||
<h3 id="orgc93a75f"><span class="section-number-3">2.1</span> <code>qmckl_distance</code></h3>
|
||||
<div class="outline-text-3" id="text-2-1">
|
||||
<p>
|
||||
<code>qmckl_distance</code> computes the matrix of the distances between all
|
||||
@ -677,7 +677,12 @@ pairs of points in two sets, one point within each set:
|
||||
\]
|
||||
</p>
|
||||
|
||||
<table id="orgbd71683" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<p>
|
||||
If the input array is normal (<code>'N'</code>), the xyz coordinates are in
|
||||
the leading dimension: <code>[n][3]</code> in C and <code>(3,n)</code> in Fortran.
|
||||
</p>
|
||||
|
||||
<table id="orge4c6738" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -770,8 +775,8 @@ pairs of points in two sets, one point within each set:
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd606c7b" class="outline-4">
|
||||
<h4 id="orgd606c7b"><span class="section-number-4">2.1.1</span> Requirements</h4>
|
||||
<div id="outline-container-org8a65fdd" class="outline-4">
|
||||
<h4 id="org8a65fdd"><span class="section-number-4">2.1.1</span> Requirements</h4>
|
||||
<div class="outline-text-4" id="text-2-1-1">
|
||||
<ul class="org-ul">
|
||||
<li><code>context</code> is not <code>QMCKL_NULL_CONTEXT</code></li>
|
||||
@ -789,8 +794,8 @@ pairs of points in two sets, one point within each set:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd0757bc" class="outline-4">
|
||||
<h4 id="orgd0757bc"><span class="section-number-4">2.1.2</span> C header</h4>
|
||||
<div id="outline-container-org3a6aa2c" class="outline-4">
|
||||
<h4 id="org3a6aa2c"><span class="section-number-4">2.1.2</span> C header</h4>
|
||||
<div class="outline-text-4" id="text-2-1-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #0000ff;">qmckl_distance</span> (
|
||||
@ -810,8 +815,8 @@ pairs of points in two sets, one point within each set:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org9a6fd22" class="outline-4">
|
||||
<h4 id="org9a6fd22"><span class="section-number-4">2.1.3</span> Source</h4>
|
||||
<div id="outline-container-orgfc61a7b" class="outline-4">
|
||||
<h4 id="orgfc61a7b"><span class="section-number-4">2.1.3</span> Source</h4>
|
||||
<div class="outline-text-4" id="text-2-1-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90"><span style="color: #228b22;">integer</span><span style="color: #a0522d;"> function qmckl_distance_f(context, transa, transb, m, n, </span><span style="color: #a020f0;">&</span>
|
||||
@ -950,12 +955,11 @@ pairs of points in two sets, one point within each set:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgb5a07d0" class="outline-4">
|
||||
<h4 id="orgb5a07d0"><span class="section-number-4">2.1.4</span> Performance</h4>
|
||||
<div id="outline-container-orgf5df4ab" class="outline-4">
|
||||
<h4 id="orgf5df4ab"><span class="section-number-4">2.1.4</span> Performance</h4>
|
||||
<div class="outline-text-4" id="text-2-1-4">
|
||||
<p>
|
||||
This function might be more efficient when <code>A</code> and <code>B</code> are
|
||||
transposed.
|
||||
This function is more efficient when <code>A</code> and <code>B</code> are transposed.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -964,7 +968,7 @@ transposed.
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2021-05-18 Tue 10:33</p>
|
||||
<p class="date">Created: 2021-05-18 Tue 23:33</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -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-05-18 Tue 10:33 -->
|
||||
<!-- 2021-05-18 Tue 23:32 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Electrons</title>
|
||||
@ -311,34 +311,34 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org4ae82b8">1. Context</a>
|
||||
<li><a href="#orgc550db7">1. Context</a>
|
||||
<ul>
|
||||
<li><a href="#org44d0cf1">1.1. Data structure</a></li>
|
||||
<li><a href="#org32db4b3">1.2. Access functions</a>
|
||||
<li><a href="#org21908af">1.1. Data structure</a></li>
|
||||
<li><a href="#orgc205ade">1.2. Access functions</a>
|
||||
<ul>
|
||||
<li><a href="#orgb0e5c5d">1.2.1. Number of electrons</a></li>
|
||||
<li><a href="#org802b79e">1.2.2. Number of walkers</a></li>
|
||||
<li><a href="#orgce8cd5d">1.2.3. Electron coordinates</a></li>
|
||||
<li><a href="#orgc4b796a">1.2.1. Number of electrons</a></li>
|
||||
<li><a href="#org09c0ebc">1.2.2. Number of walkers</a></li>
|
||||
<li><a href="#org926985c">1.2.3. Electron coordinates</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgb9b087f">1.3. Initialization functions</a></li>
|
||||
<li><a href="#org1642b98">1.4. Test</a></li>
|
||||
<li><a href="#org0af01cc">1.3. Initialization functions</a></li>
|
||||
<li><a href="#orge550a96">1.4. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org3ed5156">2. Computation</a>
|
||||
<li><a href="#orgd481931">2. Computation</a>
|
||||
<ul>
|
||||
<li><a href="#org538bfe6">2.1. Electron-electron distances</a>
|
||||
<li><a href="#org3b53198">2.1. Electron-electron distances</a>
|
||||
<ul>
|
||||
<li><a href="#orge753cbc">2.1.1. Get</a></li>
|
||||
<li><a href="#org89cae6c">2.1.2. Compute</a></li>
|
||||
<li><a href="#orga2b618b">2.1.3. Test</a></li>
|
||||
<li><a href="#org59b0f4a">2.1.1. Get</a></li>
|
||||
<li><a href="#org0352ed3">2.1.2. Compute</a></li>
|
||||
<li><a href="#org9ec7f5a">2.1.3. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org9d0036f">2.2. Electron-nucleus distances</a>
|
||||
<li><a href="#org15a922e">2.2. Electron-nucleus distances</a>
|
||||
<ul>
|
||||
<li><a href="#org5e73d24">2.2.1. Get</a></li>
|
||||
<li><a href="#org8bd0535">2.2.2. Compute</a></li>
|
||||
<li><a href="#org95d9b34">2.2.3. Test</a></li>
|
||||
<li><a href="#org6d804db">2.2.1. Get</a></li>
|
||||
<li><a href="#org7e27cb4">2.2.2. Compute</a></li>
|
||||
<li><a href="#orgd04408e">2.2.3. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@ -347,8 +347,8 @@ for the JavaScript code in this tag.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org4ae82b8" class="outline-2">
|
||||
<h2 id="org4ae82b8"><span class="section-number-2">1</span> Context</h2>
|
||||
<div id="outline-container-orgc550db7" class="outline-2">
|
||||
<h2 id="orgc550db7"><span class="section-number-2">1</span> Context</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
<p>
|
||||
The following data stored in the context:
|
||||
@ -446,8 +446,8 @@ The following data stored in the context:
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org44d0cf1" class="outline-3">
|
||||
<h3 id="org44d0cf1"><span class="section-number-3">1.1</span> Data structure</h3>
|
||||
<div id="outline-container-org21908af" class="outline-3">
|
||||
<h3 id="org21908af"><span class="section-number-3">1.1</span> Data structure</h3>
|
||||
<div class="outline-text-3" id="text-1-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #a020f0;">typedef</span> <span style="color: #a020f0;">struct</span> <span style="color: #228b22;">qmckl_electron_struct</span> {
|
||||
@ -487,8 +487,8 @@ following function returns <code>true</code>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org32db4b3" class="outline-3">
|
||||
<h3 id="org32db4b3"><span class="section-number-3">1.2</span> Access functions</h3>
|
||||
<div id="outline-container-orgc205ade" class="outline-3">
|
||||
<h3 id="orgc205ade"><span class="section-number-3">1.2</span> Access functions</h3>
|
||||
<div class="outline-text-3" id="text-1-2">
|
||||
<p>
|
||||
Access functions return <code>QMCKL_SUCCESS</code> when the data has been
|
||||
@ -500,12 +500,12 @@ contains the requested data. Otherwise, this variable is untouched.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgb0e5c5d" class="outline-4">
|
||||
<h4 id="orgb0e5c5d"><span class="section-number-4">1.2.1</span> Number of electrons</h4>
|
||||
<div id="outline-container-orgc4b796a" class="outline-4">
|
||||
<h4 id="orgc4b796a"><span class="section-number-4">1.2.1</span> Number of electrons</h4>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org802b79e" class="outline-4">
|
||||
<h4 id="org802b79e"><span class="section-number-4">1.2.2</span> Number of walkers</h4>
|
||||
<div id="outline-container-org09c0ebc" class="outline-4">
|
||||
<h4 id="org09c0ebc"><span class="section-number-4">1.2.2</span> Number of walkers</h4>
|
||||
<div class="outline-text-4" id="text-1-2-2">
|
||||
<p>
|
||||
A walker is a set of electron coordinates that are arguments of
|
||||
@ -514,8 +514,8 @@ the wave function. <code>walk_num</code> is the number of walkers.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgce8cd5d" class="outline-4">
|
||||
<h4 id="orgce8cd5d"><span class="section-number-4">1.2.3</span> Electron coordinates</h4>
|
||||
<div id="outline-container-org926985c" class="outline-4">
|
||||
<h4 id="org926985c"><span class="section-number-4">1.2.3</span> Electron coordinates</h4>
|
||||
<div class="outline-text-4" id="text-1-2-3">
|
||||
<p>
|
||||
Returns the current electron coordinates. The pointer is assumed
|
||||
@ -527,8 +527,8 @@ Fortran it is <code>(elec_num,3,walk_num)</code>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgb9b087f" class="outline-3">
|
||||
<h3 id="orgb9b087f"><span class="section-number-3">1.3</span> Initialization functions</h3>
|
||||
<div id="outline-container-org0af01cc" class="outline-3">
|
||||
<h3 id="org0af01cc"><span class="section-number-3">1.3</span> Initialization functions</h3>
|
||||
<div class="outline-text-3" id="text-1-3">
|
||||
<p>
|
||||
To set the data relative to the electrons in the context, the
|
||||
@ -559,28 +559,32 @@ electrons have been set.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org1642b98" class="outline-3">
|
||||
<h3 id="org1642b98"><span class="section-number-3">1.4</span> Test</h3>
|
||||
<div id="outline-container-orge550a96" class="outline-3">
|
||||
<h3 id="orge550a96"><span class="section-number-3">1.4</span> Test</h3>
|
||||
<div class="outline-text-3" id="text-1-4">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">/* <span style="color: #b22222;">Reference input data </span>*/
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">walk_num</span> = chbrclf_walk_num;
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">elec_num</span> = chbrclf_elec_num;
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">elec_up_num</span> = chbrclf_elec_up_num;
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">elec_dn_num</span> = chbrclf_elec_dn_num;
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">double</span>*** <span style="color: #a0522d;">elec_coord</span> = chbrclf_elec_coord;
|
||||
|
||||
<span style="color: #483d8b;">#define</span> <span style="color: #a0522d;">up_num</span> ((<span style="color: #228b22;">int64_t</span>) 3)
|
||||
<span style="color: #483d8b;">#define</span> <span style="color: #a0522d;">down_num</span> ((<span style="color: #228b22;">int64_t</span>) 2)
|
||||
<span style="color: #483d8b;">#define</span> <span style="color: #a0522d;">walk_num</span> ((<span style="color: #228b22;">int64_t</span>) 2)
|
||||
<span style="color: #483d8b;">#define</span> <span style="color: #a0522d;">num</span> (up_num+down_num)
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">nucl_num</span> = chbrclf_nucl_num;
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">double</span>* <span style="color: #a0522d;">charge</span> = chbrclf_charge;
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">double</span>** <span style="color: #a0522d;">nucl_coord</span> = chbrclf_nucl_coord;
|
||||
|
||||
<span style="color: #228b22;">double</span> <span style="color: #a0522d;">coord</span>[walk_num*3*num] =
|
||||
{ 7.303633091022677881e+00, 1.375868694453235719e+01, 1.167371490471771217e-01,
|
||||
4.547755371567960836e+00, 3.245907105524011182e+00, 2.410764357550297110e-01,
|
||||
5.932816068137344523e+00, 1.491671465549257469e+01, 3.825374039119375236e-01,
|
||||
7.347336142660052083e+00, 1.341946976062362129e+00, 1.648917914228352322e+00,
|
||||
5.735221530102248444e+00, 1.064667491680036271e+01, 4.227201772236627297e-01,
|
||||
8.099550978782254163e+00, 6.861498941099086757e+00, 4.015884841159429036e-02,
|
||||
1.014757367558326173e+01, 5.219335322173662917e+00, 5.037004126899931322e-02,
|
||||
1.484094322159507051e+01, 9.777903829455864226e+00, 5.243007994024882767e-02,
|
||||
9.081723054990456845e+00, 5.499568496038920173e+00, 2.910446438899221347e-02,
|
||||
2.583154239492383653e+00, 1.442282811294904432e+00, 6.387191629878670451e-02 };
|
||||
<span style="color: #228b22;">double</span>* <span style="color: #a0522d;">coord</span> = (<span style="color: #228b22;">double</span>*) <span style="color: #0000ff;">malloc</span>(<span style="color: #228b22;">walk_num</span>*<span style="color: #0000ff;">num</span>*3*<span style="color: #a020f0;">sizeof</span>(<span style="color: #228b22;">double</span>));
|
||||
|
||||
<span style="color: #228b22;">double</span>* <span style="color: #a0522d;">x</span> = coord;
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">int</span> <span style="color: #a0522d;">i</span>=0 ; i<walk_num ; ++i) {
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">int</span> <span style="color: #a0522d;">k</span>=0 ; k<3 ; ++k) {
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">int</span> <span style="color: #a0522d;">j</span>=0 ; j<num ; ++j) {
|
||||
*x = coord_in[i][j][k];
|
||||
x += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* <span style="color: #b22222;">--- </span>*/
|
||||
|
||||
@ -647,8 +651,8 @@ rc = qmckl_get_electron_coord (context, coord2);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org3ed5156" class="outline-2">
|
||||
<h2 id="org3ed5156"><span class="section-number-2">2</span> Computation</h2>
|
||||
<div id="outline-container-orgd481931" class="outline-2">
|
||||
<h2 id="orgd481931"><span class="section-number-2">2</span> Computation</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
<p>
|
||||
The computed data is stored in the context so that it can be reused
|
||||
@ -661,12 +665,12 @@ current date is stored.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org538bfe6" class="outline-3">
|
||||
<h3 id="org538bfe6"><span class="section-number-3">2.1</span> Electron-electron distances</h3>
|
||||
<div id="outline-container-org3b53198" class="outline-3">
|
||||
<h3 id="org3b53198"><span class="section-number-3">2.1</span> Electron-electron distances</h3>
|
||||
<div class="outline-text-3" id="text-2-1">
|
||||
</div>
|
||||
<div id="outline-container-orge753cbc" class="outline-4">
|
||||
<h4 id="orge753cbc"><span class="section-number-4">2.1.1</span> Get</h4>
|
||||
<div id="outline-container-org59b0f4a" class="outline-4">
|
||||
<h4 id="org59b0f4a"><span class="section-number-4">2.1.1</span> Get</h4>
|
||||
<div class="outline-text-4" id="text-2-1-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #0000ff;">qmckl_get_electron_ee_distance</span>(<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #228b22;">double</span>* <span style="color: #a0522d;">distance</span>);
|
||||
@ -675,10 +679,10 @@ current date is stored.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org89cae6c" class="outline-4">
|
||||
<h4 id="org89cae6c"><span class="section-number-4">2.1.2</span> Compute</h4>
|
||||
<div id="outline-container-org0352ed3" class="outline-4">
|
||||
<h4 id="org0352ed3"><span class="section-number-4">2.1.2</span> Compute</h4>
|
||||
<div class="outline-text-4" id="text-2-1-2">
|
||||
<table id="orgb590c45" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org310b126" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -758,16 +762,15 @@ current date is stored.
|
||||
<span style="color: #a020f0;">return</span>
|
||||
<span style="color: #a020f0;">endif</span>
|
||||
|
||||
!<span style="color: #b22222;">$OMP PARALLEL DO DEFAULT(NONE) &</span>
|
||||
!<span style="color: #b22222;">$OMP SHARED(elec_num, walk_num, coord, ee_distance)</span>
|
||||
!<span style="color: #b22222;">$OMP PRIVATE(k)</span>
|
||||
<span style="color: #a020f0;">do</span> k=1,walk_num
|
||||
info = qmckl_distance(context, <span style="color: #8b2252;">'T'</span>, <span style="color: #8b2252;">'T'</span>, elec_num, elec_num, <span style="color: #a020f0;">&</span>
|
||||
coord(1,1,k), elec_num, <span style="color: #a020f0;">&</span>
|
||||
coord(1,1,k), elec_num, <span style="color: #a020f0;">&</span>
|
||||
ee_distance(1,1,k), elec_num)
|
||||
<span style="color: #a020f0;">if</span> (info /= QMCKL_SUCCESS) <span style="color: #a020f0;">then</span>
|
||||
<span style="color: #a020f0;">exit</span>
|
||||
<span style="color: #a020f0;">endif</span>
|
||||
<span style="color: #a020f0;">end do</span>
|
||||
!<span style="color: #b22222;">$OMP END PARALLEL DO</span>
|
||||
|
||||
<span style="color: #a020f0;">end function</span> <span style="color: #0000ff;">qmckl_compute_ee_distance_f</span>
|
||||
</pre>
|
||||
@ -775,19 +778,33 @@ current date is stored.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orga2b618b" class="outline-4">
|
||||
<h4 id="orga2b618b"><span class="section-number-4">2.1.3</span> Test</h4>
|
||||
<div id="outline-container-org9ec7f5a" class="outline-4">
|
||||
<h4 id="org9ec7f5a"><span class="section-number-4">2.1.3</span> Test</h4>
|
||||
<div class="outline-text-4" id="text-2-1-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">/* <span style="color: #b22222;">Reference input data </span>*/
|
||||
|
||||
<span style="color: #0000ff;">assert</span>(<span style="color: #228b22;">qmckl_electron_provided</span>(<span style="color: #a0522d;">context</span>));
|
||||
<pre class="src src-c"><span style="color: #0000ff;">assert</span>(<span style="color: #228b22;">qmckl_electron_provided</span>(<span style="color: #a0522d;">context</span>));
|
||||
|
||||
<span style="color: #228b22;">double</span> <span style="color: #a0522d;">ee_distance</span>[walk_num*num*num];
|
||||
rc = qmckl_get_electron_ee_distance(context, ee_distance);
|
||||
|
||||
// <span style="color: #b22222;">(e1,e2,w)</span>
|
||||
// <span style="color: #b22222;">(0,0,0) == 0.</span>
|
||||
<span style="color: #0000ff;">assert</span>(<span style="color: #228b22;">ee_distance</span>[0] == 0.);
|
||||
|
||||
// <span style="color: #b22222;">(1,0,0) == (0,1,0)</span>
|
||||
<span style="color: #0000ff;">assert</span>(<span style="color: #228b22;">ee_distance</span>[1] == ee_distance[num]);
|
||||
<span style="color: #0000ff;">assert</span>(fabs(<span style="color: #228b22;">ee_distance</span>[1]-8.6114953086801) < 1.e-12);
|
||||
|
||||
// <span style="color: #b22222;">value of (1,0,0)</span>
|
||||
<span style="color: #0000ff;">assert</span>(fabs(<span style="color: #228b22;">ee_distance</span>[1]-7.152322512964209) < 1.e-12);
|
||||
|
||||
// <span style="color: #b22222;">(0,0,1) == 0.</span>
|
||||
<span style="color: #0000ff;">assert</span>(<span style="color: #228b22;">ee_distance</span>[num*num] == 0.);
|
||||
|
||||
// <span style="color: #b22222;">(1,0,1) == (0,1,1)</span>
|
||||
<span style="color: #0000ff;">assert</span>(<span style="color: #228b22;">ee_distance</span>[num*num+1] == ee_distance[num*num+num]);
|
||||
|
||||
// <span style="color: #b22222;">value of (1,0,1)</span>
|
||||
<span style="color: #0000ff;">assert</span>(fabs(<span style="color: #228b22;">ee_distance</span>[num*num+1]-6.5517646321055665) < 1.e-12);
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
@ -795,12 +812,12 @@ rc = qmckl_get_electron_ee_distance(context, ee_distance);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org9d0036f" class="outline-3">
|
||||
<h3 id="org9d0036f"><span class="section-number-3">2.2</span> Electron-nucleus distances</h3>
|
||||
<div id="outline-container-org15a922e" class="outline-3">
|
||||
<h3 id="org15a922e"><span class="section-number-3">2.2</span> Electron-nucleus distances</h3>
|
||||
<div class="outline-text-3" id="text-2-2">
|
||||
</div>
|
||||
<div id="outline-container-org5e73d24" class="outline-4">
|
||||
<h4 id="org5e73d24"><span class="section-number-4">2.2.1</span> Get</h4>
|
||||
<div id="outline-container-org6d804db" class="outline-4">
|
||||
<h4 id="org6d804db"><span class="section-number-4">2.2.1</span> Get</h4>
|
||||
<div class="outline-text-4" id="text-2-2-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #0000ff;">qmckl_get_electron_en_distance</span>(<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #228b22;">double</span>* <span style="color: #a0522d;">distance</span>);
|
||||
@ -809,10 +826,10 @@ rc = qmckl_get_electron_ee_distance(context, ee_distance);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org8bd0535" class="outline-4">
|
||||
<h4 id="org8bd0535"><span class="section-number-4">2.2.2</span> Compute</h4>
|
||||
<div id="outline-container-org7e27cb4" class="outline-4">
|
||||
<h4 id="org7e27cb4"><span class="section-number-4">2.2.2</span> Compute</h4>
|
||||
<div class="outline-text-4" id="text-2-2-2">
|
||||
<table id="org9abca0e" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orge984116" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -862,7 +879,7 @@ rc = qmckl_get_electron_ee_distance(context, ee_distance);
|
||||
|
||||
<tr>
|
||||
<td class="org-left">double</td>
|
||||
<td class="org-left">nucl<sub>coord</sub>[walk<sub>num</sub>][3][elec<sub>num</sub>]</td>
|
||||
<td class="org-left">nucl<sub>coord</sub>[3][elec<sub>num</sub>]</td>
|
||||
<td class="org-left">in</td>
|
||||
<td class="org-left">Nuclear coordinates</td>
|
||||
</tr>
|
||||
@ -886,7 +903,7 @@ rc = qmckl_get_electron_ee_distance(context, ee_distance);
|
||||
<span style="color: #228b22;">integer</span>*8 , <span style="color: #a020f0;">intent</span>(in) ::<span style="color: #a0522d;"> nucl_num</span>
|
||||
<span style="color: #228b22;">integer</span>*8 , <span style="color: #a020f0;">intent</span>(in) ::<span style="color: #a0522d;"> walk_num</span>
|
||||
<span style="color: #228b22;">double precision</span> , <span style="color: #a020f0;">intent</span>(in) ::<span style="color: #a0522d;"> elec_coord(elec_num,3,walk_num)</span>
|
||||
<span style="color: #228b22;">double precision</span> , <span style="color: #a020f0;">intent</span>(in) ::<span style="color: #a0522d;"> nucl_coord(nucl_num,3,walk_num)</span>
|
||||
<span style="color: #228b22;">double precision</span> , <span style="color: #a020f0;">intent</span>(in) ::<span style="color: #a0522d;"> nucl_coord(nucl_num,3)</span>
|
||||
<span style="color: #228b22;">double precision</span> , <span style="color: #a020f0;">intent</span>(out) ::<span style="color: #a0522d;"> en_distance(elec_num,nucl_num,walk_num)</span>
|
||||
|
||||
<span style="color: #228b22;">integer</span>*8 ::<span style="color: #a0522d;"> k</span>
|
||||
@ -913,16 +930,15 @@ rc = qmckl_get_electron_ee_distance(context, ee_distance);
|
||||
<span style="color: #a020f0;">return</span>
|
||||
<span style="color: #a020f0;">endif</span>
|
||||
|
||||
!<span style="color: #b22222;">$OMP PARALLEL DO DEFAULT(NONE) &</span>
|
||||
!<span style="color: #b22222;">$OMP SHARED(elec_num, nucl_num, walk_num, elec_coord, nucl_coord, en_distance)</span>
|
||||
!<span style="color: #b22222;">$OMP PRIVATE(k)</span>
|
||||
<span style="color: #a020f0;">do</span> k=1,walk_num
|
||||
info = qmckl_distance(context, <span style="color: #8b2252;">'T'</span>, <span style="color: #8b2252;">'T'</span>, elec_num, nucl_num, <span style="color: #a020f0;">&</span>
|
||||
elec_coord(1,1,k), elec_num, <span style="color: #a020f0;">&</span>
|
||||
nucl_coord, nucl_num, <span style="color: #a020f0;">&</span>
|
||||
en_distance(1,1,k), elec_num)
|
||||
<span style="color: #a020f0;">if</span> (info /= QMCKL_SUCCESS) <span style="color: #a020f0;">then</span>
|
||||
<span style="color: #a020f0;">exit</span>
|
||||
<span style="color: #a020f0;">endif</span>
|
||||
<span style="color: #a020f0;">end do</span>
|
||||
!<span style="color: #b22222;">$OMP END PARALLEL DO</span>
|
||||
|
||||
<span style="color: #a020f0;">end function</span> <span style="color: #0000ff;">qmckl_compute_en_distance_f</span>
|
||||
</pre>
|
||||
@ -930,17 +946,44 @@ rc = qmckl_get_electron_ee_distance(context, ee_distance);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org95d9b34" class="outline-4">
|
||||
<h4 id="org95d9b34"><span class="section-number-4">2.2.3</span> Test</h4>
|
||||
<div id="outline-container-orgd04408e" class="outline-4">
|
||||
<h4 id="orgd04408e"><span class="section-number-4">2.2.3</span> Test</h4>
|
||||
<div class="outline-text-4" id="text-2-2-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">/* <span style="color: #b22222;">Reference input data </span>*/
|
||||
|
||||
<pre class="src src-c">assert(!qmckl_nucleus_provided(context));
|
||||
<span style="color: #0000ff;">assert</span>(<span style="color: #228b22;">qmckl_electron_provided</span>(<span style="color: #a0522d;">context</span>));
|
||||
|
||||
<span style="color: #228b22;">double</span> <span style="color: #a0522d;">en_distance</span>[walk_num*num*num];
|
||||
rc = qmckl_get_electron_en_distance(context, en_distance);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_NOT_PROVIDED);
|
||||
rc = qmckl_set_nucleus_num (context, nucl_num);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_SUCCESS);
|
||||
|
||||
rc = qmckl_set_nucleus_charge (context, charge);
|
||||
<span style="color: #0000ff;">assert</span> (rc == QMCKL_SUCCESS);
|
||||
|
||||
rc = qmckl_set_nucleus_coord (context, &(nucl_coord[0]));
|
||||
<span style="color: #0000ff;">assert</span> (rc == QMCKL_SUCCESS);
|
||||
|
||||
<span style="color: #0000ff;">assert</span>(<span style="color: #228b22;">qmckl_nucleus_provided</span>(<span style="color: #a0522d;">context</span>));
|
||||
|
||||
<span style="color: #228b22;">double</span> <span style="color: #a0522d;">en_distance</span>[walk_num][nucl_num][num];
|
||||
|
||||
rc = qmckl_get_electron_en_distance(context, &(en_distance[0][0][0]));
|
||||
<span style="color: #0000ff;">assert</span> (rc == QMCKL_SUCCESS);
|
||||
|
||||
// <span style="color: #b22222;">(e,n,w) in Fortran notation</span>
|
||||
// <span style="color: #b22222;">(1,1,1)</span>
|
||||
<span style="color: #0000ff;">assert</span>(fabs(<span style="color: #228b22;">en_distance</span>[0][0][0] - 6.855624268793153) < 1.e-12);
|
||||
|
||||
// <span style="color: #b22222;">(2,1,1)</span>
|
||||
<span style="color: #0000ff;">assert</span>(fabs(<span style="color: #228b22;">en_distance</span>[0][0][1] - 3.698922010513608) < 1.e-12);
|
||||
|
||||
// <span style="color: #b22222;">(1,2,1)</span>
|
||||
<span style="color: #0000ff;">assert</span>(fabs(<span style="color: #228b22;">en_distance</span>[0][1][0] - 8.143800105434433) < 1.e-12);
|
||||
|
||||
// <span style="color: #b22222;">(2,2,1)</span>
|
||||
<span style="color: #0000ff;">assert</span>(fabs(<span style="color: #228b22;">en_distance</span>[0][1][1] - 5.16360835635664) < 1.e-12);
|
||||
|
||||
// <span style="color: #b22222;">(4,3,2)</span>
|
||||
<span style="color: #0000ff;">assert</span>(fabs(<span style="color: #228b22;">en_distance</span>[1][2][3] - 12.599138999960012) < 1.e-12);
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
@ -951,7 +994,7 @@ rc = qmckl_get_electron_en_distance(context, en_distance);
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2021-05-18 Tue 10:33</p>
|
||||
<p class="date">Created: 2021-05-18 Tue 23:32</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -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-05-18 Tue 10:33 -->
|
||||
<!-- 2021-05-18 Tue 23:32 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Error handling</title>
|
||||
@ -311,16 +311,16 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org8d2fb10">1. Decoding errors</a></li>
|
||||
<li><a href="#org1d1e45a">2. Data structure in context</a></li>
|
||||
<li><a href="#orgfc4aca2">3. Updating errors in the context</a></li>
|
||||
<li><a href="#org6d69812">4. Failing</a></li>
|
||||
<li><a href="#org20768f0">1. Decoding errors</a></li>
|
||||
<li><a href="#org3674e93">2. Data structure in context</a></li>
|
||||
<li><a href="#org8db481f">3. Updating errors in the context</a></li>
|
||||
<li><a href="#orga79f7e7">4. Failing</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org8d2fb10" class="outline-2">
|
||||
<h2 id="org8d2fb10"><span class="section-number-2">1</span> Decoding errors</h2>
|
||||
<div id="outline-container-org20768f0" class="outline-2">
|
||||
<h2 id="org20768f0"><span class="section-number-2">1</span> Decoding errors</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
<p>
|
||||
To decode the error messages, <code>qmckl_string_of_error</code> converts an
|
||||
@ -417,8 +417,8 @@ The text strings are extracted from the previous table.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org1d1e45a" class="outline-2">
|
||||
<h2 id="org1d1e45a"><span class="section-number-2">2</span> Data structure in context</h2>
|
||||
<div id="outline-container-org3674e93" class="outline-2">
|
||||
<h2 id="org3674e93"><span class="section-number-2">2</span> Data structure in context</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
<p>
|
||||
The strings are declared with a maximum fixed size to avoid
|
||||
@ -441,8 +441,8 @@ dynamic memory allocation.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgfc4aca2" class="outline-2">
|
||||
<h2 id="orgfc4aca2"><span class="section-number-2">3</span> Updating errors in the context</h2>
|
||||
<div id="outline-container-org8db481f" class="outline-2">
|
||||
<h2 id="org8db481f"><span class="section-number-2">3</span> Updating errors in the context</h2>
|
||||
<div class="outline-text-2" id="text-3">
|
||||
<p>
|
||||
The error is updated in the context using <code>qmckl_set_error</code>.
|
||||
@ -488,8 +488,8 @@ explaining the error. The exit code can't be <code>QMCKL_SUCCESS</code>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6d69812" class="outline-2">
|
||||
<h2 id="org6d69812"><span class="section-number-2">4</span> Failing</h2>
|
||||
<div id="outline-container-orga79f7e7" class="outline-2">
|
||||
<h2 id="orga79f7e7"><span class="section-number-2">4</span> Failing</h2>
|
||||
<div class="outline-text-2" id="text-4">
|
||||
<p>
|
||||
To make a function fail, the <code>qmckl_failwith</code> function should be
|
||||
@ -552,7 +552,7 @@ For example, this function can be used as
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2021-05-18 Tue 10:33</p>
|
||||
<p class="date">Created: 2021-05-18 Tue 23:32</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -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-05-18 Tue 10:33 -->
|
||||
<!-- 2021-05-18 Tue 23:32 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Memory management</title>
|
||||
@ -311,15 +311,15 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org956e18f">1. Memory data structure for the context</a></li>
|
||||
<li><a href="#org1434687">2. Passing info to allocation routines</a></li>
|
||||
<li><a href="#orga14a108">3. Allocation/deallocation functions</a></li>
|
||||
<li><a href="#org939aa30">1. Memory data structure for the context</a></li>
|
||||
<li><a href="#org532191c">2. Passing info to allocation routines</a></li>
|
||||
<li><a href="#org40c01f6">3. Allocation/deallocation functions</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org956e18f" class="outline-2">
|
||||
<h2 id="org956e18f"><span class="section-number-2">1</span> Memory data structure for the context</h2>
|
||||
<div id="outline-container-org939aa30" class="outline-2">
|
||||
<h2 id="org939aa30"><span class="section-number-2">1</span> Memory data structure for the context</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
<p>
|
||||
Every time a new block of memory is allocated, the information
|
||||
@ -361,8 +361,8 @@ array, and the number of allocated blocks.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org1434687" class="outline-2">
|
||||
<h2 id="org1434687"><span class="section-number-2">2</span> Passing info to allocation routines</h2>
|
||||
<div id="outline-container-org532191c" class="outline-2">
|
||||
<h2 id="org532191c"><span class="section-number-2">2</span> Passing info to allocation routines</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
<p>
|
||||
Passing information to the allocation routine should be done by
|
||||
@ -371,8 +371,8 @@ passing an instance of a <code>qmckl_memory_info_struct</code>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orga14a108" class="outline-2">
|
||||
<h2 id="orga14a108"><span class="section-number-2">3</span> Allocation/deallocation functions</h2>
|
||||
<div id="outline-container-org40c01f6" class="outline-2">
|
||||
<h2 id="org40c01f6"><span class="section-number-2">3</span> Allocation/deallocation functions</h2>
|
||||
<div class="outline-text-2" id="text-3">
|
||||
<p>
|
||||
Memory allocation inside the library should be done with
|
||||
@ -535,7 +535,7 @@ allocation and needs to be updated.
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2021-05-18 Tue 10:33</p>
|
||||
<p class="date">Created: 2021-05-18 Tue 23:32</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -3,11 +3,12 @@
|
||||
"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-05-18 Tue 10:33 -->
|
||||
<!-- 2021-05-18 Tue 23:33 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>‎</title>
|
||||
<title>Nucleus</title>
|
||||
<meta name="generator" content="Org mode" />
|
||||
<meta name="author" content="TREX CoE" />
|
||||
<style type="text/css">
|
||||
<!--/*--><![CDATA[/*><!--*/
|
||||
.title { text-align: center;
|
||||
@ -179,6 +180,79 @@
|
||||
.org-svg { width: 90%; }
|
||||
/*]]>*/-->
|
||||
</style>
|
||||
<link rel="stylesheet" title="Standard" href="qmckl.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript" src="org-info.js">
|
||||
/**
|
||||
*
|
||||
* @source: org-info.js
|
||||
*
|
||||
* @licstart The following is the entire license notice for the
|
||||
* JavaScript code in org-info.js.
|
||||
*
|
||||
* Copyright (C) 2012-2019 Free Software Foundation, Inc.
|
||||
*
|
||||
*
|
||||
* The JavaScript code in this tag is free software: you can
|
||||
* redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License (GNU GPL) as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version. The code is distributed WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
|
||||
*
|
||||
* As additional permission under GNU GPL version 3 section 7, you
|
||||
* may distribute non-source (e.g., minimized or compacted) forms of
|
||||
* that code without the copy of the GNU GPL normally required by
|
||||
* section 4, provided you include this license notice and a URL
|
||||
* through which recipients can access the Corresponding Source.
|
||||
*
|
||||
* @licend The above is the entire license notice
|
||||
* for the JavaScript code in org-info.js.
|
||||
*
|
||||
*/
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
/*
|
||||
@licstart The following is the entire license notice for the
|
||||
JavaScript code in this tag.
|
||||
|
||||
Copyright (C) 2012-2019 Free Software Foundation, Inc.
|
||||
|
||||
The JavaScript code in this tag is free software: you can
|
||||
redistribute it and/or modify it under the terms of the GNU
|
||||
General Public License (GNU GPL) as published by the Free Software
|
||||
Foundation, either version 3 of the License, or (at your option)
|
||||
any later version. The code is distributed WITHOUT ANY WARRANTY;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
|
||||
|
||||
As additional permission under GNU GPL version 3 section 7, you
|
||||
may distribute non-source (e.g., minimized or compacted) forms of
|
||||
that code without the copy of the GNU GPL normally required by
|
||||
section 4, provided you include this license notice and a URL
|
||||
through which recipients can access the Corresponding Source.
|
||||
|
||||
|
||||
@licend The above is the entire license notice
|
||||
for the JavaScript code in this tag.
|
||||
*/
|
||||
|
||||
<!--/*--><![CDATA[/*><!--*/
|
||||
org_html_manager.set("TOC_DEPTH", "4");
|
||||
org_html_manager.set("LINK_HOME", "index.html");
|
||||
org_html_manager.set("LINK_UP", "");
|
||||
org_html_manager.set("LOCAL_TOC", "1");
|
||||
org_html_manager.set("VIEW_BUTTONS", "0");
|
||||
org_html_manager.set("MOUSE_HINT", "underline");
|
||||
org_html_manager.set("FIXED_TOC", "0");
|
||||
org_html_manager.set("TOC", "1");
|
||||
org_html_manager.set("VIEW", "info");
|
||||
org_html_manager.setup(); // activate after the parameters are set
|
||||
/*]]>*///-->
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
/*
|
||||
@licstart The following is the entire license notice for the
|
||||
@ -249,33 +323,38 @@ for the JavaScript code in this tag.
|
||||
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="content">
|
||||
<div id="org-div-home-and-up">
|
||||
<a accesskey="h" href=""> UP </a>
|
||||
|
|
||||
<a accesskey="H" href="index.html"> HOME </a>
|
||||
</div><div id="content">
|
||||
<h1 class="title">Nucleus</h1>
|
||||
<div id="table-of-contents">
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org2379e3e">1. Context</a>
|
||||
<li><a href="#org9f37522">1. Context</a>
|
||||
<ul>
|
||||
<li><a href="#org8b955ad">1.1. Data structure</a></li>
|
||||
<li><a href="#org0fbaa5e">1.2. Access functions</a></li>
|
||||
<li><a href="#org3f2250b">1.3. Initialization functions</a></li>
|
||||
<li><a href="#org4bb7623">1.4. Test</a></li>
|
||||
<li><a href="#orgab0aa73">1.1. Data structure</a></li>
|
||||
<li><a href="#org0153f10">1.2. Access functions</a></li>
|
||||
<li><a href="#org24b49e6">1.3. Initialization functions</a></li>
|
||||
<li><a href="#org14a850d">1.4. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgead9976">2. Computation</a>
|
||||
<li><a href="#org009476a">2. Computation</a>
|
||||
<ul>
|
||||
<li><a href="#orgd58caca">2.1. Nucleus-nucleus distances</a>
|
||||
<li><a href="#org501b136">2.1. Nucleus-nucleus distances</a>
|
||||
<ul>
|
||||
<li><a href="#org4abfc83">2.1.1. Get</a></li>
|
||||
<li><a href="#orga1f1505">2.1.2. Compute</a></li>
|
||||
<li><a href="#orgb3e4a24">2.1.3. Test</a></li>
|
||||
<li><a href="#org67c0e6f">2.1.1. Get</a></li>
|
||||
<li><a href="#orgd6729f5">2.1.2. Compute</a></li>
|
||||
<li><a href="#orgcf4c735">2.1.3. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgda6dc52">2.2. Nuclear repulsion energy</a>
|
||||
<li><a href="#org4bd7b85">2.2. Nuclear repulsion energy</a>
|
||||
<ul>
|
||||
<li><a href="#org7483570">2.2.1. Get</a></li>
|
||||
<li><a href="#orgecb367a">2.2.2. Compute</a></li>
|
||||
<li><a href="#orgcf592cd">2.2.3. Test</a></li>
|
||||
<li><a href="#org254299a">2.2.1. Get</a></li>
|
||||
<li><a href="#org8a90dc0">2.2.2. Compute</a></li>
|
||||
<li><a href="#org1c127a4">2.2.3. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@ -283,16 +362,9 @@ for the JavaScript code in this tag.
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
#i+TITLE: Nucleus
|
||||
</p>
|
||||
|
||||
<p>
|
||||
A ll the data relative to the molecular geometry is described here.
|
||||
</p>
|
||||
|
||||
<div id="outline-container-org2379e3e" class="outline-2">
|
||||
<h2 id="org2379e3e"><span class="section-number-2">1</span> Context</h2>
|
||||
<div id="outline-container-org9f37522" class="outline-2">
|
||||
<h2 id="org9f37522"><span class="section-number-2">1</span> Context</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
<p>
|
||||
The following data stored in the context:
|
||||
@ -336,7 +408,7 @@ The following data stored in the context:
|
||||
<tr>
|
||||
<td class="org-left"><code>coord</code></td>
|
||||
<td class="org-left">double[3][num]</td>
|
||||
<td class="org-left">Nuclear coordinates</td>
|
||||
<td class="org-left">Nuclear coordinates, in transposed format</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
@ -366,8 +438,8 @@ The following data stored in the context:
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org8b955ad" class="outline-3">
|
||||
<h3 id="org8b955ad"><span class="section-number-3">1.1</span> Data structure</h3>
|
||||
<div id="outline-container-orgab0aa73" class="outline-3">
|
||||
<h3 id="orgab0aa73"><span class="section-number-3">1.1</span> Data structure</h3>
|
||||
<div class="outline-text-3" id="text-1-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #a020f0;">typedef</span> <span style="color: #a020f0;">struct</span> <span style="color: #228b22;">qmckl_nucleus_struct</span> {
|
||||
@ -393,8 +465,8 @@ struct is then initialized and <code>provided == true</code>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org0fbaa5e" class="outline-3">
|
||||
<h3 id="org0fbaa5e"><span class="section-number-3">1.2</span> Access functions</h3>
|
||||
<div id="outline-container-org0153f10" class="outline-3">
|
||||
<h3 id="org0153f10"><span class="section-number-3">1.2</span> Access functions</h3>
|
||||
<div class="outline-text-3" id="text-1-2">
|
||||
<p>
|
||||
When all the data relative to nuclei have been set, the following
|
||||
@ -408,8 +480,8 @@ function returns <code>true</code>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org3f2250b" class="outline-3">
|
||||
<h3 id="org3f2250b"><span class="section-number-3">1.3</span> Initialization functions</h3>
|
||||
<div id="outline-container-org24b49e6" class="outline-3">
|
||||
<h3 id="org24b49e6"><span class="section-number-3">1.3</span> Initialization functions</h3>
|
||||
<div class="outline-text-3" id="text-1-3">
|
||||
<p>
|
||||
To set the data relative to the nuclei in the context, the
|
||||
@ -419,7 +491,7 @@ following functions need to be called.
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #0000ff;">qmckl_set_nucleus_num</span> (<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">num</span>);
|
||||
<span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #0000ff;">qmckl_set_nucleus_charge</span> (<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #a020f0;">const</span> <span style="color: #228b22;">double</span>* <span style="color: #a0522d;">charge</span>);
|
||||
<span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #0000ff;">qmckl_set_nucleus_coord</span> (<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #a020f0;">const</span> <span style="color: #228b22;">double</span>* <span style="color: #a0522d;">coord</span>);
|
||||
<span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #0000ff;">qmckl_set_nucleus_coord</span> (<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #a020f0;">const</span> <span style="color: #228b22;">char</span> <span style="color: #a0522d;">transp</span>, <span style="color: #a020f0;">const</span> <span style="color: #228b22;">double</span>* <span style="color: #a0522d;">coord</span>);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
@ -438,26 +510,13 @@ atoms. The coordinates should be given in atomic units.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org4bb7623" class="outline-3">
|
||||
<h3 id="org4bb7623"><span class="section-number-3">1.4</span> Test</h3>
|
||||
<div id="outline-container-org14a850d" class="outline-3">
|
||||
<h3 id="org14a850d"><span class="section-number-3">1.4</span> Test</h3>
|
||||
<div class="outline-text-3" id="text-1-4">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">/* <span style="color: #b22222;">Reference input data </span>*/
|
||||
|
||||
<span style="color: #483d8b;">#define</span> <span style="color: #a0522d;">num</span> ((<span style="color: #228b22;">int64_t</span>) 9)
|
||||
|
||||
<span style="color: #228b22;">double</span> <span style="color: #a0522d;">charge</span>[num] = { 6., 6., 6., 7., 7., 1., 1., 1., 1. };
|
||||
|
||||
<span style="color: #228b22;">double</span> <span style="color: #a0522d;">coord</span>[3*num] =
|
||||
{ 4.166279566732572e-01, -1.526183863767697e+00, 1.041604719335635e+00,
|
||||
-1.903457631371503e+00, 2.242154435363994e+00, 6.550163404813796e-01,
|
||||
-3.575005445908036e+00, -3.063638942318878e+00, 2.086739409279095e+00,
|
||||
2.060062599100338e+00, -1.623431626827498e+00, -1.930074272670425e+00,
|
||||
9.491495662916423e-01, 3.808343139803397e-01, 4.077482772289367e+00,
|
||||
1.841031662652821e+00, -2.945591662994877e+00, -3.670011011125464e+00,
|
||||
0.000000000000000e+00, 0.000000000000000e+00, 0.000000000000000e+00,
|
||||
0.000000000000000e+00, 0.000000000000000e+00, 0.000000000000000e+00,
|
||||
0.000000000000000e+00, 0.000000000000000e+00, 0.000000000000000e+00};
|
||||
<pre class="src src-c"><span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">nucl_num</span> = chbrclf_nucl_num;
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">double</span>* <span style="color: #a0522d;">nucl_charge</span> = chbrclf_charge;
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">double</span>* <span style="color: #a0522d;">nucl_coord</span> = &(chbrclf_nucl_coord[0][0]);
|
||||
|
||||
/* <span style="color: #b22222;">--- </span>*/
|
||||
|
||||
@ -470,42 +529,50 @@ rc = qmckl_get_nucleus_num (context, &n);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_NOT_PROVIDED);
|
||||
|
||||
|
||||
rc = qmckl_set_nucleus_num (context, num);
|
||||
rc = qmckl_set_nucleus_num (context, nucl_num);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_SUCCESS);
|
||||
assert(!qmckl_nucleus_provided(context));
|
||||
|
||||
rc = qmckl_get_nucleus_num (context, &n);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_SUCCESS);
|
||||
<span style="color: #0000ff;">assert</span>(n == num);
|
||||
<span style="color: #0000ff;">assert</span>(n == nucl_num);
|
||||
|
||||
<span style="color: #228b22;">double</span> <span style="color: #a0522d;">coord2</span>[3*num];
|
||||
<span style="color: #228b22;">double</span> <span style="color: #a0522d;">nucl_coord2</span>[3*nucl_num];
|
||||
|
||||
rc = qmckl_get_nucleus_coord (context, coord2);
|
||||
rc = qmckl_get_nucleus_coord (context, <span style="color: #8b2252;">'T'</span>, nucl_coord2);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_NOT_PROVIDED);
|
||||
|
||||
rc = qmckl_set_nucleus_coord (context, coord);
|
||||
rc = qmckl_set_nucleus_coord (context, <span style="color: #8b2252;">'T'</span>, &(nucl_coord[0]));
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_SUCCESS);
|
||||
|
||||
rc = qmckl_get_nucleus_coord (context, coord2);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_SUCCESS);
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">size_t</span> <span style="color: #a0522d;">i</span>=0 ; i<3*num ; ++i) {
|
||||
assert( coord[i] == coord2[i] );
|
||||
}
|
||||
|
||||
assert(!qmckl_nucleus_provided(context));
|
||||
|
||||
<span style="color: #228b22;">double</span> <span style="color: #a0522d;">charge2</span>[num];
|
||||
rc = qmckl_get_nucleus_coord (context, <span style="color: #8b2252;">'N'</span>, nucl_coord2);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_SUCCESS);
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">size_t</span> <span style="color: #a0522d;">k</span>=0 ; k<3 ; ++k) {
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">size_t</span> <span style="color: #a0522d;">i</span>=0 ; i<nucl_num ; ++i) {
|
||||
assert( nucl_coord[nucl_num*k+i] == nucl_coord2[3*i+k] );
|
||||
}
|
||||
}
|
||||
|
||||
rc = qmckl_get_nucleus_charge(context, charge2);
|
||||
rc = qmckl_get_nucleus_coord (context, <span style="color: #8b2252;">'T'</span>, nucl_coord2);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_SUCCESS);
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">size_t</span> <span style="color: #a0522d;">i</span>=0 ; i<3*nucl_num ; ++i) {
|
||||
assert( nucl_coord[i] == nucl_coord2[i] );
|
||||
}
|
||||
|
||||
<span style="color: #228b22;">double</span> <span style="color: #a0522d;">nucl_charge2</span>[nucl_num];
|
||||
|
||||
rc = qmckl_get_nucleus_charge(context, nucl_charge2);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_NOT_PROVIDED);
|
||||
|
||||
rc = qmckl_set_nucleus_charge(context, charge);
|
||||
rc = qmckl_set_nucleus_charge(context, nucl_charge);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_SUCCESS);
|
||||
|
||||
rc = qmckl_get_nucleus_charge(context, charge2);
|
||||
rc = qmckl_get_nucleus_charge(context, nucl_charge2);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_SUCCESS);
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">size_t</span> <span style="color: #a0522d;">i</span>=0 ; i<num ; ++i) {
|
||||
assert( charge[i] == charge2[i] );
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">size_t</span> <span style="color: #a0522d;">i</span>=0 ; i<nucl_num ; ++i) {
|
||||
assert( nucl_charge[i] == nucl_charge2[i] );
|
||||
}
|
||||
<span style="color: #0000ff;">assert</span>(<span style="color: #228b22;">qmckl_nucleus_provided</span>(<span style="color: #a0522d;">context</span>));
|
||||
</pre>
|
||||
@ -514,8 +581,8 @@ rc = qmckl_get_nucleus_charge(context, charge2);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgead9976" class="outline-2">
|
||||
<h2 id="orgead9976"><span class="section-number-2">2</span> Computation</h2>
|
||||
<div id="outline-container-org009476a" class="outline-2">
|
||||
<h2 id="org009476a"><span class="section-number-2">2</span> Computation</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
<p>
|
||||
The computed data is stored in the context so that it can be reused
|
||||
@ -528,12 +595,12 @@ current date is stored.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd58caca" class="outline-3">
|
||||
<h3 id="orgd58caca"><span class="section-number-3">2.1</span> Nucleus-nucleus distances</h3>
|
||||
<div id="outline-container-org501b136" class="outline-3">
|
||||
<h3 id="org501b136"><span class="section-number-3">2.1</span> Nucleus-nucleus distances</h3>
|
||||
<div class="outline-text-3" id="text-2-1">
|
||||
</div>
|
||||
<div id="outline-container-org4abfc83" class="outline-4">
|
||||
<h4 id="org4abfc83"><span class="section-number-4">2.1.1</span> Get</h4>
|
||||
<div id="outline-container-org67c0e6f" class="outline-4">
|
||||
<h4 id="org67c0e6f"><span class="section-number-4">2.1.1</span> Get</h4>
|
||||
<div class="outline-text-4" id="text-2-1-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #0000ff;">qmckl_get_nucleus_nn_distance</span>(<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #228b22;">double</span>* <span style="color: #a0522d;">distance</span>);
|
||||
@ -542,10 +609,10 @@ current date is stored.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orga1f1505" class="outline-4">
|
||||
<h4 id="orga1f1505"><span class="section-number-4">2.1.2</span> Compute</h4>
|
||||
<div id="outline-container-orgd6729f5" class="outline-4">
|
||||
<h4 id="orgd6729f5"><span class="section-number-4">2.1.2</span> Compute</h4>
|
||||
<div class="outline-text-4" id="text-2-1-2">
|
||||
<table id="orgc1b87f5" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orgfa4dfe4" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -623,20 +690,19 @@ current date is stored.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgb3e4a24" class="outline-4">
|
||||
<h4 id="orgb3e4a24"><span class="section-number-4">2.1.3</span> Test</h4>
|
||||
<div id="outline-container-orgcf4c735" class="outline-4">
|
||||
<h4 id="orgcf4c735"><span class="section-number-4">2.1.3</span> Test</h4>
|
||||
<div class="outline-text-4" id="text-2-1-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">/* <span style="color: #b22222;">Reference input data </span>*/
|
||||
|
||||
<span style="color: #0000ff;">assert</span>(<span style="color: #228b22;">qmckl_nucleus_provided</span>(<span style="color: #a0522d;">context</span>));
|
||||
|
||||
<span style="color: #228b22;">double</span> <span style="color: #a0522d;">distance</span>[num*num];
|
||||
rc = qmckl_get_nucleus_nn_distance(context, distance);
|
||||
<span style="color: #228b22;">double</span> <span style="color: #a0522d;">distance</span>[nucl_num*nucl_num];
|
||||
rc = qmckl_get_nucleus_nn_distance(context, distance);
|
||||
<span style="color: #0000ff;">assert</span>(<span style="color: #228b22;">distance</span>[0] == 0.);
|
||||
<span style="color: #0000ff;">assert</span>(<span style="color: #228b22;">distance</span>[1] == distance[num]);
|
||||
<span style="color: #0000ff;">assert</span>(fabs(<span style="color: #228b22;">distance</span>[1]-4.164450441785663) < 1.e-12);
|
||||
<span style="color: #0000ff;">assert</span>(<span style="color: #228b22;">distance</span>[1] == distance[nucl_num]);
|
||||
<span style="color: #0000ff;">assert</span>(fabs(<span style="color: #228b22;">distance</span>[1]-2.070304721365169) < 1.e-12);
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
@ -644,8 +710,8 @@ rc = qmckl_get_nucleus_nn_distance(context, distance);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgda6dc52" class="outline-3">
|
||||
<h3 id="orgda6dc52"><span class="section-number-3">2.2</span> Nuclear repulsion energy</h3>
|
||||
<div id="outline-container-org4bd7b85" class="outline-3">
|
||||
<h3 id="org4bd7b85"><span class="section-number-3">2.2</span> Nuclear repulsion energy</h3>
|
||||
<div class="outline-text-3" id="text-2-2">
|
||||
<p>
|
||||
\[
|
||||
@ -654,8 +720,8 @@ rc = qmckl_get_nucleus_nn_distance(context, distance);
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org7483570" class="outline-4">
|
||||
<h4 id="org7483570"><span class="section-number-4">2.2.1</span> Get</h4>
|
||||
<div id="outline-container-org254299a" class="outline-4">
|
||||
<h4 id="org254299a"><span class="section-number-4">2.2.1</span> Get</h4>
|
||||
<div class="outline-text-4" id="text-2-2-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #0000ff;">qmckl_get_nucleus_repulsion</span>(<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #228b22;">double</span>* <span style="color: #a0522d;">energy</span>);
|
||||
@ -664,10 +730,10 @@ rc = qmckl_get_nucleus_nn_distance(context, distance);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgecb367a" class="outline-4">
|
||||
<h4 id="orgecb367a"><span class="section-number-4">2.2.2</span> Compute</h4>
|
||||
<div id="outline-container-org8a90dc0" class="outline-4">
|
||||
<h4 id="org8a90dc0"><span class="section-number-4">2.2.2</span> Compute</h4>
|
||||
<div class="outline-text-4" id="text-2-2-2">
|
||||
<table id="org8040774" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orgde71515" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -748,7 +814,6 @@ rc = qmckl_get_nucleus_nn_distance(context, distance);
|
||||
energy = energy + charge(i) * charge(j) / nn_distance(i,j)
|
||||
<span style="color: #a020f0;">end do</span>
|
||||
<span style="color: #a020f0;">end do</span>
|
||||
<span style="color: #a020f0;">print</span> *, energy
|
||||
|
||||
<span style="color: #a020f0;">end function</span> <span style="color: #0000ff;">qmckl_compute_nucleus_repulsion_f</span>
|
||||
</pre>
|
||||
@ -756,8 +821,8 @@ rc = qmckl_get_nucleus_nn_distance(context, distance);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgcf592cd" class="outline-4">
|
||||
<h4 id="orgcf592cd"><span class="section-number-4">2.2.3</span> Test</h4>
|
||||
<div id="outline-container-org1c127a4" class="outline-4">
|
||||
<h4 id="org1c127a4"><span class="section-number-4">2.2.3</span> Test</h4>
|
||||
<div class="outline-text-4" id="text-2-2-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">/* <span style="color: #b22222;">Reference input data </span>*/
|
||||
@ -766,7 +831,7 @@ rc = qmckl_get_nucleus_nn_distance(context, distance);
|
||||
|
||||
<span style="color: #228b22;">double</span> <span style="color: #a0522d;">rep</span>;
|
||||
rc = qmckl_get_nucleus_repulsion(context, &rep);
|
||||
<span style="color: #0000ff;">assert</span>(rep - 163.50434957121263 < 1.e-10);
|
||||
<span style="color: #0000ff;">assert</span>(rep - 318.2309879436158 < 1.e-10);
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
@ -776,7 +841,8 @@ rc = qmckl_get_nucleus_repulsion(context, &rep);
|
||||
</div>
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="date">Created: 2021-05-18 Tue 10:33</p>
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2021-05-18 Tue 23:33</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -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-05-18 Tue 10:33 -->
|
||||
<!-- 2021-05-18 Tue 23:32 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Numerical precision</title>
|
||||
@ -333,16 +333,16 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org9a58ae1">1. Control of the numerical precision</a></li>
|
||||
<li><a href="#org83e0e2f">2. Precision</a></li>
|
||||
<li><a href="#org4543f2a">3. Range</a></li>
|
||||
<li><a href="#org8bdcd43">4. Helper functions</a></li>
|
||||
<li><a href="#org7e3cfa0">1. Control of the numerical precision</a></li>
|
||||
<li><a href="#org8a69568">2. Precision</a></li>
|
||||
<li><a href="#org9dfff30">3. Range</a></li>
|
||||
<li><a href="#org6f82e86">4. Helper functions</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org9a58ae1" class="outline-2">
|
||||
<h2 id="org9a58ae1"><span class="section-number-2">1</span> Control of the numerical precision</h2>
|
||||
<div id="outline-container-org7e3cfa0" class="outline-2">
|
||||
<h2 id="org7e3cfa0"><span class="section-number-2">1</span> Control of the numerical precision</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
<p>
|
||||
Controlling numerical precision enables optimizations. Here, the
|
||||
@ -353,7 +353,7 @@ Arithmetic (IEEE 754),
|
||||
refers to the number of exponent bits.
|
||||
</p>
|
||||
|
||||
<table id="org86a282c" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orgdf94399" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -397,8 +397,8 @@ integer. The update functions return <code>QMCKL_SUCCESS</code> or
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org83e0e2f" class="outline-2">
|
||||
<h2 id="org83e0e2f"><span class="section-number-2">2</span> Precision</h2>
|
||||
<div id="outline-container-org8a69568" class="outline-2">
|
||||
<h2 id="org8a69568"><span class="section-number-2">2</span> Precision</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
<p>
|
||||
<code>qmckl_context_set_numprec_precision</code> modifies the parameter for the
|
||||
@ -485,8 +485,8 @@ numerical precision in the context.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org4543f2a" class="outline-2">
|
||||
<h2 id="org4543f2a"><span class="section-number-2">3</span> Range</h2>
|
||||
<div id="outline-container-org9dfff30" class="outline-2">
|
||||
<h2 id="org9dfff30"><span class="section-number-2">3</span> Range</h2>
|
||||
<div class="outline-text-2" id="text-3">
|
||||
<p>
|
||||
<code>qmckl_set_numprec_range</code> modifies the parameter for the numerical
|
||||
@ -561,8 +561,8 @@ range in a given context.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-org8bdcd43" class="outline-2">
|
||||
<h2 id="org8bdcd43"><span class="section-number-2">4</span> Helper functions</h2>
|
||||
<div id="outline-container-org6f82e86" class="outline-2">
|
||||
<h2 id="org6f82e86"><span class="section-number-2">4</span> Helper functions</h2>
|
||||
<div class="outline-text-2" id="text-4">
|
||||
<p>
|
||||
<code>qmckl_get_numprec_epsilon</code> returns \(\epsilon = 2^{1-n}\) where <code>n</code> is the precision.
|
||||
@ -581,7 +581,7 @@ We need to remove the sign bit from the precision.
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2021-05-18 Tue 10:33</p>
|
||||
<p class="date">Created: 2021-05-18 Tue 23:32</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
1004
qmckl_tests.html
Normal file
1004
qmckl_tests.html
Normal file
File diff suppressed because it is too large
Load Diff
523
qmckl_utils.html
Normal file
523
qmckl_utils.html
Normal file
@ -0,0 +1,523 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"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-05-18 Tue 23:32 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Utility functions</title>
|
||||
<meta name="generator" content="Org mode" />
|
||||
<meta name="author" content="TREX CoE" />
|
||||
<style type="text/css">
|
||||
<!--/*--><![CDATA[/*><!--*/
|
||||
.title { text-align: center;
|
||||
margin-bottom: .2em; }
|
||||
.subtitle { text-align: center;
|
||||
font-size: medium;
|
||||
font-weight: bold;
|
||||
margin-top:0; }
|
||||
.todo { font-family: monospace; color: red; }
|
||||
.done { font-family: monospace; color: green; }
|
||||
.priority { font-family: monospace; color: orange; }
|
||||
.tag { background-color: #eee; font-family: monospace;
|
||||
padding: 2px; font-size: 80%; font-weight: normal; }
|
||||
.timestamp { color: #bebebe; }
|
||||
.timestamp-kwd { color: #5f9ea0; }
|
||||
.org-right { margin-left: auto; margin-right: 0px; text-align: right; }
|
||||
.org-left { margin-left: 0px; margin-right: auto; text-align: left; }
|
||||
.org-center { margin-left: auto; margin-right: auto; text-align: center; }
|
||||
.underline { text-decoration: underline; }
|
||||
#postamble p, #preamble p { font-size: 90%; margin: .2em; }
|
||||
p.verse { margin-left: 3%; }
|
||||
pre {
|
||||
border: 1px solid #ccc;
|
||||
box-shadow: 3px 3px 3px #eee;
|
||||
padding: 8pt;
|
||||
font-family: monospace;
|
||||
overflow: auto;
|
||||
margin: 1.2em;
|
||||
}
|
||||
pre.src {
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
padding-top: 1.2em;
|
||||
}
|
||||
pre.src:before {
|
||||
display: none;
|
||||
position: absolute;
|
||||
background-color: white;
|
||||
top: -10px;
|
||||
right: 10px;
|
||||
padding: 3px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
pre.src:hover:before { display: inline;}
|
||||
/* Languages per Org manual */
|
||||
pre.src-asymptote:before { content: 'Asymptote'; }
|
||||
pre.src-awk:before { content: 'Awk'; }
|
||||
pre.src-C:before { content: 'C'; }
|
||||
/* pre.src-C++ doesn't work in CSS */
|
||||
pre.src-clojure:before { content: 'Clojure'; }
|
||||
pre.src-css:before { content: 'CSS'; }
|
||||
pre.src-D:before { content: 'D'; }
|
||||
pre.src-ditaa:before { content: 'ditaa'; }
|
||||
pre.src-dot:before { content: 'Graphviz'; }
|
||||
pre.src-calc:before { content: 'Emacs Calc'; }
|
||||
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
|
||||
pre.src-fortran:before { content: 'Fortran'; }
|
||||
pre.src-gnuplot:before { content: 'gnuplot'; }
|
||||
pre.src-haskell:before { content: 'Haskell'; }
|
||||
pre.src-hledger:before { content: 'hledger'; }
|
||||
pre.src-java:before { content: 'Java'; }
|
||||
pre.src-js:before { content: 'Javascript'; }
|
||||
pre.src-latex:before { content: 'LaTeX'; }
|
||||
pre.src-ledger:before { content: 'Ledger'; }
|
||||
pre.src-lisp:before { content: 'Lisp'; }
|
||||
pre.src-lilypond:before { content: 'Lilypond'; }
|
||||
pre.src-lua:before { content: 'Lua'; }
|
||||
pre.src-matlab:before { content: 'MATLAB'; }
|
||||
pre.src-mscgen:before { content: 'Mscgen'; }
|
||||
pre.src-ocaml:before { content: 'Objective Caml'; }
|
||||
pre.src-octave:before { content: 'Octave'; }
|
||||
pre.src-org:before { content: 'Org mode'; }
|
||||
pre.src-oz:before { content: 'OZ'; }
|
||||
pre.src-plantuml:before { content: 'Plantuml'; }
|
||||
pre.src-processing:before { content: 'Processing.js'; }
|
||||
pre.src-python:before { content: 'Python'; }
|
||||
pre.src-R:before { content: 'R'; }
|
||||
pre.src-ruby:before { content: 'Ruby'; }
|
||||
pre.src-sass:before { content: 'Sass'; }
|
||||
pre.src-scheme:before { content: 'Scheme'; }
|
||||
pre.src-screen:before { content: 'Gnu Screen'; }
|
||||
pre.src-sed:before { content: 'Sed'; }
|
||||
pre.src-sh:before { content: 'shell'; }
|
||||
pre.src-sql:before { content: 'SQL'; }
|
||||
pre.src-sqlite:before { content: 'SQLite'; }
|
||||
/* additional languages in org.el's org-babel-load-languages alist */
|
||||
pre.src-forth:before { content: 'Forth'; }
|
||||
pre.src-io:before { content: 'IO'; }
|
||||
pre.src-J:before { content: 'J'; }
|
||||
pre.src-makefile:before { content: 'Makefile'; }
|
||||
pre.src-maxima:before { content: 'Maxima'; }
|
||||
pre.src-perl:before { content: 'Perl'; }
|
||||
pre.src-picolisp:before { content: 'Pico Lisp'; }
|
||||
pre.src-scala:before { content: 'Scala'; }
|
||||
pre.src-shell:before { content: 'Shell Script'; }
|
||||
pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
|
||||
/* additional language identifiers per "defun org-babel-execute"
|
||||
in ob-*.el */
|
||||
pre.src-cpp:before { content: 'C++'; }
|
||||
pre.src-abc:before { content: 'ABC'; }
|
||||
pre.src-coq:before { content: 'Coq'; }
|
||||
pre.src-groovy:before { content: 'Groovy'; }
|
||||
/* additional language identifiers from org-babel-shell-names in
|
||||
ob-shell.el: ob-shell is the only babel language using a lambda to put
|
||||
the execution function name together. */
|
||||
pre.src-bash:before { content: 'bash'; }
|
||||
pre.src-csh:before { content: 'csh'; }
|
||||
pre.src-ash:before { content: 'ash'; }
|
||||
pre.src-dash:before { content: 'dash'; }
|
||||
pre.src-ksh:before { content: 'ksh'; }
|
||||
pre.src-mksh:before { content: 'mksh'; }
|
||||
pre.src-posh:before { content: 'posh'; }
|
||||
/* Additional Emacs modes also supported by the LaTeX listings package */
|
||||
pre.src-ada:before { content: 'Ada'; }
|
||||
pre.src-asm:before { content: 'Assembler'; }
|
||||
pre.src-caml:before { content: 'Caml'; }
|
||||
pre.src-delphi:before { content: 'Delphi'; }
|
||||
pre.src-html:before { content: 'HTML'; }
|
||||
pre.src-idl:before { content: 'IDL'; }
|
||||
pre.src-mercury:before { content: 'Mercury'; }
|
||||
pre.src-metapost:before { content: 'MetaPost'; }
|
||||
pre.src-modula-2:before { content: 'Modula-2'; }
|
||||
pre.src-pascal:before { content: 'Pascal'; }
|
||||
pre.src-ps:before { content: 'PostScript'; }
|
||||
pre.src-prolog:before { content: 'Prolog'; }
|
||||
pre.src-simula:before { content: 'Simula'; }
|
||||
pre.src-tcl:before { content: 'tcl'; }
|
||||
pre.src-tex:before { content: 'TeX'; }
|
||||
pre.src-plain-tex:before { content: 'Plain TeX'; }
|
||||
pre.src-verilog:before { content: 'Verilog'; }
|
||||
pre.src-vhdl:before { content: 'VHDL'; }
|
||||
pre.src-xml:before { content: 'XML'; }
|
||||
pre.src-nxml:before { content: 'XML'; }
|
||||
/* add a generic configuration mode; LaTeX export needs an additional
|
||||
(add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
|
||||
pre.src-conf:before { content: 'Configuration File'; }
|
||||
|
||||
table { border-collapse:collapse; }
|
||||
caption.t-above { caption-side: top; }
|
||||
caption.t-bottom { caption-side: bottom; }
|
||||
td, th { vertical-align:top; }
|
||||
th.org-right { text-align: center; }
|
||||
th.org-left { text-align: center; }
|
||||
th.org-center { text-align: center; }
|
||||
td.org-right { text-align: right; }
|
||||
td.org-left { text-align: left; }
|
||||
td.org-center { text-align: center; }
|
||||
dt { font-weight: bold; }
|
||||
.footpara { display: inline; }
|
||||
.footdef { margin-bottom: 1em; }
|
||||
.figure { padding: 1em; }
|
||||
.figure p { text-align: center; }
|
||||
.inlinetask {
|
||||
padding: 10px;
|
||||
border: 2px solid gray;
|
||||
margin: 10px;
|
||||
background: #ffffcc;
|
||||
}
|
||||
#org-div-home-and-up
|
||||
{ text-align: right; font-size: 70%; white-space: nowrap; }
|
||||
textarea { overflow-x: auto; }
|
||||
.linenr { font-size: smaller }
|
||||
.code-highlighted { background-color: #ffff00; }
|
||||
.org-info-js_info-navigation { border-style: none; }
|
||||
#org-info-js_console-label
|
||||
{ font-size: 10px; font-weight: bold; white-space: nowrap; }
|
||||
.org-info-js_search-highlight
|
||||
{ background-color: #ffff00; color: #000000; font-weight: bold; }
|
||||
.org-svg { width: 90%; }
|
||||
/*]]>*/-->
|
||||
</style>
|
||||
<link rel="stylesheet" title="Standard" href="qmckl.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript" src="org-info.js">
|
||||
/**
|
||||
*
|
||||
* @source: org-info.js
|
||||
*
|
||||
* @licstart The following is the entire license notice for the
|
||||
* JavaScript code in org-info.js.
|
||||
*
|
||||
* Copyright (C) 2012-2019 Free Software Foundation, Inc.
|
||||
*
|
||||
*
|
||||
* The JavaScript code in this tag is free software: you can
|
||||
* redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License (GNU GPL) as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version. The code is distributed WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
|
||||
*
|
||||
* As additional permission under GNU GPL version 3 section 7, you
|
||||
* may distribute non-source (e.g., minimized or compacted) forms of
|
||||
* that code without the copy of the GNU GPL normally required by
|
||||
* section 4, provided you include this license notice and a URL
|
||||
* through which recipients can access the Corresponding Source.
|
||||
*
|
||||
* @licend The above is the entire license notice
|
||||
* for the JavaScript code in org-info.js.
|
||||
*
|
||||
*/
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
/*
|
||||
@licstart The following is the entire license notice for the
|
||||
JavaScript code in this tag.
|
||||
|
||||
Copyright (C) 2012-2019 Free Software Foundation, Inc.
|
||||
|
||||
The JavaScript code in this tag is free software: you can
|
||||
redistribute it and/or modify it under the terms of the GNU
|
||||
General Public License (GNU GPL) as published by the Free Software
|
||||
Foundation, either version 3 of the License, or (at your option)
|
||||
any later version. The code is distributed WITHOUT ANY WARRANTY;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
|
||||
|
||||
As additional permission under GNU GPL version 3 section 7, you
|
||||
may distribute non-source (e.g., minimized or compacted) forms of
|
||||
that code without the copy of the GNU GPL normally required by
|
||||
section 4, provided you include this license notice and a URL
|
||||
through which recipients can access the Corresponding Source.
|
||||
|
||||
|
||||
@licend The above is the entire license notice
|
||||
for the JavaScript code in this tag.
|
||||
*/
|
||||
|
||||
<!--/*--><![CDATA[/*><!--*/
|
||||
org_html_manager.set("TOC_DEPTH", "4");
|
||||
org_html_manager.set("LINK_HOME", "index.html");
|
||||
org_html_manager.set("LINK_UP", "");
|
||||
org_html_manager.set("LOCAL_TOC", "1");
|
||||
org_html_manager.set("VIEW_BUTTONS", "0");
|
||||
org_html_manager.set("MOUSE_HINT", "underline");
|
||||
org_html_manager.set("FIXED_TOC", "0");
|
||||
org_html_manager.set("TOC", "1");
|
||||
org_html_manager.set("VIEW", "info");
|
||||
org_html_manager.setup(); // activate after the parameters are set
|
||||
/*]]>*///-->
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
/*
|
||||
@licstart The following is the entire license notice for the
|
||||
JavaScript code in this tag.
|
||||
|
||||
Copyright (C) 2012-2019 Free Software Foundation, Inc.
|
||||
|
||||
The JavaScript code in this tag is free software: you can
|
||||
redistribute it and/or modify it under the terms of the GNU
|
||||
General Public License (GNU GPL) as published by the Free Software
|
||||
Foundation, either version 3 of the License, or (at your option)
|
||||
any later version. The code is distributed WITHOUT ANY WARRANTY;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
|
||||
|
||||
As additional permission under GNU GPL version 3 section 7, you
|
||||
may distribute non-source (e.g., minimized or compacted) forms of
|
||||
that code without the copy of the GNU GPL normally required by
|
||||
section 4, provided you include this license notice and a URL
|
||||
through which recipients can access the Corresponding Source.
|
||||
|
||||
|
||||
@licend The above is the entire license notice
|
||||
for the JavaScript code in this tag.
|
||||
*/
|
||||
<!--/*--><![CDATA[/*><!--*/
|
||||
function CodeHighlightOn(elem, id)
|
||||
{
|
||||
var target = document.getElementById(id);
|
||||
if(null != target) {
|
||||
elem.cacheClassElem = elem.className;
|
||||
elem.cacheClassTarget = target.className;
|
||||
target.className = "code-highlighted";
|
||||
elem.className = "code-highlighted";
|
||||
}
|
||||
}
|
||||
function CodeHighlightOff(elem, id)
|
||||
{
|
||||
var target = document.getElementById(id);
|
||||
if(elem.cacheClassElem)
|
||||
elem.className = elem.cacheClassElem;
|
||||
if(elem.cacheClassTarget)
|
||||
target.className = elem.cacheClassTarget;
|
||||
}
|
||||
/*]]>*///-->
|
||||
</script>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
displayAlign: "center",
|
||||
displayIndent: "0em",
|
||||
|
||||
"HTML-CSS": { scale: 100,
|
||||
linebreaks: { automatic: "false" },
|
||||
webFont: "TeX"
|
||||
},
|
||||
SVG: {scale: 100,
|
||||
linebreaks: { automatic: "false" },
|
||||
font: "TeX"},
|
||||
NativeMML: {scale: 100},
|
||||
TeX: { equationNumbers: {autoNumber: "AMS"},
|
||||
MultLineWidth: "85%",
|
||||
TagSide: "right",
|
||||
TagIndent: ".8em"
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript"
|
||||
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="org-div-home-and-up">
|
||||
<a accesskey="h" href=""> UP </a>
|
||||
|
|
||||
<a accesskey="H" href="index.html"> HOME </a>
|
||||
</div><div id="content">
|
||||
<h1 class="title">Utility functions</h1>
|
||||
<div id="table-of-contents">
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org09f8af3">1. Matrix operations</a>
|
||||
<ul>
|
||||
<li><a href="#orgd2b51a9">1.1. <code>qmckl_transpose</code></a>
|
||||
<ul>
|
||||
<li><a href="#org8ccd87e">1.1.1. Requirements</a></li>
|
||||
<li><a href="#org4f2e36a">1.1.2. C header</a></li>
|
||||
<li><a href="#orgf5f7428">1.1.3. Source</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org09f8af3" class="outline-2">
|
||||
<h2 id="org09f8af3"><span class="section-number-2">1</span> Matrix operations</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
</div>
|
||||
<div id="outline-container-orgd2b51a9" class="outline-3">
|
||||
<h3 id="orgd2b51a9"><span class="section-number-3">1.1</span> <code>qmckl_transpose</code></h3>
|
||||
<div class="outline-text-3" id="text-1-1">
|
||||
<p>
|
||||
Transposes a matrix: \(B_{ji} = A_{ij}\)
|
||||
</p>
|
||||
|
||||
<table id="org55a674c" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
<col class="org-left" />
|
||||
|
||||
<col class="org-left" />
|
||||
|
||||
<col class="org-left" />
|
||||
|
||||
<col class="org-left" />
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="org-left">qmckl<sub>context</sub></td>
|
||||
<td class="org-left">context</td>
|
||||
<td class="org-left">in</td>
|
||||
<td class="org-left">Global state</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left">int64<sub>t</sub></td>
|
||||
<td class="org-left">m</td>
|
||||
<td class="org-left">in</td>
|
||||
<td class="org-left">Number of rows of the input matrix</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left">int64<sub>t</sub></td>
|
||||
<td class="org-left">n</td>
|
||||
<td class="org-left">in</td>
|
||||
<td class="org-left">Number of columns of the input matrix</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left">double</td>
|
||||
<td class="org-left">A[][lda]</td>
|
||||
<td class="org-left">in</td>
|
||||
<td class="org-left">Array containing the \(m \times n\) matrix \(A\)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left">int64<sub>t</sub></td>
|
||||
<td class="org-left">lda</td>
|
||||
<td class="org-left">in</td>
|
||||
<td class="org-left">Leading dimension of array <code>A</code></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left">double</td>
|
||||
<td class="org-left">B[][ldb]</td>
|
||||
<td class="org-left">out</td>
|
||||
<td class="org-left">Array containing the \(n \times m\) matrix \(B\)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left">int64<sub>t</sub></td>
|
||||
<td class="org-left">ldb</td>
|
||||
<td class="org-left">in</td>
|
||||
<td class="org-left">Leading dimension of array <code>B</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org8ccd87e" class="outline-4">
|
||||
<h4 id="org8ccd87e"><span class="section-number-4">1.1.1</span> Requirements</h4>
|
||||
<div class="outline-text-4" id="text-1-1-1">
|
||||
<ul class="org-ul">
|
||||
<li><code>context</code> is not <code>QMCKL_NULL_CONTEXT</code></li>
|
||||
<li><code>m > 0</code></li>
|
||||
<li><code>n > 0</code></li>
|
||||
<li><code>lda >= m</code></li>
|
||||
<li><code>ldb >= n</code></li>
|
||||
<li><code>A</code> is allocated with at least \(m \times n \times 8\) bytes</li>
|
||||
<li><code>B</code> is allocated with at least \(n \times m \times 8\) bytes</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org4f2e36a" class="outline-4">
|
||||
<h4 id="org4f2e36a"><span class="section-number-4">1.1.2</span> C header</h4>
|
||||
<div class="outline-text-4" id="text-1-1-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #0000ff;">qmckl_transpose</span> (
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">m</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">n</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">double</span>* <span style="color: #a0522d;">A</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">lda</span>,
|
||||
<span style="color: #228b22;">double</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">B</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">ldb</span> );
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf5f7428" class="outline-4">
|
||||
<h4 id="orgf5f7428"><span class="section-number-4">1.1.3</span> Source</h4>
|
||||
<div class="outline-text-4" id="text-1-1-3">
|
||||
<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_transpose_f</span><span style="color: #000000; background-color: #ffffff;">(context, m, n, A, LDA, B, LDB)</span><span style="color: #a0522d;"> </span><span style="color: #a020f0;">&</span>
|
||||
<span style="color: #a020f0;">result</span>(info)
|
||||
<span style="color: #a020f0;">use</span> <span style="color: #0000ff;">qmckl</span>
|
||||
<span style="color: #a020f0;">implicit</span> <span style="color: #228b22;">none</span>
|
||||
<span style="color: #228b22;">integer</span>(qmckl_context) , <span style="color: #a020f0;">intent</span>(in) ::<span style="color: #a0522d;"> context</span>
|
||||
<span style="color: #228b22;">integer</span>*8 , <span style="color: #a020f0;">intent</span>(in) ::<span style="color: #a0522d;"> m, n</span>
|
||||
<span style="color: #228b22;">integer</span>*8 , <span style="color: #a020f0;">intent</span>(in) ::<span style="color: #a0522d;"> lda</span>
|
||||
<span style="color: #228b22;">real</span>*8 , <span style="color: #a020f0;">intent</span>(in) ::<span style="color: #a0522d;"> A(lda,*)</span>
|
||||
<span style="color: #228b22;">integer</span>*8 , <span style="color: #a020f0;">intent</span>(in) ::<span style="color: #a0522d;"> ldb</span>
|
||||
<span style="color: #228b22;">real</span>*8 , <span style="color: #a020f0;">intent</span>(out) ::<span style="color: #a0522d;"> B(ldb,*)</span>
|
||||
|
||||
<span style="color: #228b22;">integer</span>*8 ::<span style="color: #a0522d;"> i,j</span>
|
||||
|
||||
info = QMCKL_SUCCESS
|
||||
|
||||
<span style="color: #a020f0;">if</span> (context == QMCKL_NULL_CONTEXT) <span style="color: #a020f0;">then</span>
|
||||
info = QMCKL_INVALID_CONTEXT
|
||||
<span style="color: #a020f0;">return</span>
|
||||
<span style="color: #a020f0;">endif</span>
|
||||
|
||||
<span style="color: #a020f0;">if</span> (m <= 0_8) <span style="color: #a020f0;">then</span>
|
||||
info = QMCKL_INVALID_ARG_2
|
||||
<span style="color: #a020f0;">return</span>
|
||||
<span style="color: #a020f0;">endif</span>
|
||||
|
||||
<span style="color: #a020f0;">if</span> (n <= 0_8) <span style="color: #a020f0;">then</span>
|
||||
info = QMCKL_INVALID_ARG_3
|
||||
<span style="color: #a020f0;">return</span>
|
||||
<span style="color: #a020f0;">endif</span>
|
||||
|
||||
<span style="color: #a020f0;">if</span> (LDA < m) <span style="color: #a020f0;">then</span>
|
||||
info = QMCKL_INVALID_ARG_5
|
||||
<span style="color: #a020f0;">return</span>
|
||||
<span style="color: #a020f0;">endif</span>
|
||||
|
||||
<span style="color: #a020f0;">if</span> (LDB < n) <span style="color: #a020f0;">then</span>
|
||||
info = QMCKL_INVALID_ARG_7
|
||||
<span style="color: #a020f0;">return</span>
|
||||
<span style="color: #a020f0;">endif</span>
|
||||
|
||||
<span style="color: #a020f0;">do</span> j=1,m
|
||||
<span style="color: #a020f0;">do</span> i=1,n
|
||||
B(i,j) = A(j,i)
|
||||
<span style="color: #a020f0;">end do</span>
|
||||
<span style="color: #a020f0;">end do</span>
|
||||
|
||||
<span style="color: #a020f0;">end function</span> <span style="color: #0000ff;">qmckl_transpose_f</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2021-05-18 Tue 23:32</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user