mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-11-03 12:43:57 +01:00
Deploying to gh-pages from @ TREX-CoE/qmckl@4b36005ca0 🚀
This commit is contained in:
parent
d6746cd84c
commit
6ff9e644ec
@ -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>
|
||||
<!-- 2022-01-21 Fri 07:53 -->
|
||||
<!-- 2022-01-23 Sun 18:08 -->
|
||||
<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>
|
||||
@ -327,7 +327,6 @@ for the JavaScript code in this tag.
|
||||
<li><a href="./qmckl_sherman_morrison_woodbury.html">Sherman-Morrison-Woodbury</a></li>
|
||||
<li><a href="./qmckl_jastrow.html">Jastrow Factor</a></li>
|
||||
<li><a href="./qmckl_local_energy.html">Local Energy</a></li>
|
||||
<li><a href="./qmckl_utils.html">Utility functions</a></li>
|
||||
<li><a href="./qmckl_trexio.html">TREXIO I/O library</a></li>
|
||||
<li><a href="./qmckl_tests.html">Data for Tests</a></li>
|
||||
<li><a href="./qmckl_verificarlo.html">Verificarlo CI</a></li>
|
||||
@ -362,7 +361,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: 2022-01-21 Fri 07:53</p>
|
||||
<p class="date">Created: 2022-01-23 Sun 18:08</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
118
qmckl.html
118
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>
|
||||
<!-- 2022-01-21 Fri 07:53 -->
|
||||
<!-- 2022-01-23 Sun 18:08 -->
|
||||
<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,36 +333,36 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#orgb47db35">1. Installing QMCkl</a>
|
||||
<li><a href="#org2508f40">1. Installing QMCkl</a>
|
||||
<ul>
|
||||
<li><a href="#org94d769f">1.1. Installing from the released tarball (for end users)</a></li>
|
||||
<li><a href="#org859343f">1.2. Installing from the source repository (for developers)</a></li>
|
||||
<li><a href="#org051c913">1.1. Installing from the released tarball (for end users)</a></li>
|
||||
<li><a href="#org47188c9">1.2. Installing from the source repository (for developers)</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org559bf9f">2. Using QMCkl</a></li>
|
||||
<li><a href="#orgf89a98e">3. Developing in QMCkl</a>
|
||||
<li><a href="#org084014e">2. Using QMCkl</a></li>
|
||||
<li><a href="#orgc19885d">3. Developing in QMCkl</a>
|
||||
<ul>
|
||||
<li><a href="#org4272a02">3.1. Literate programming</a></li>
|
||||
<li><a href="#orgaaf4658">3.2. Source code editing</a></li>
|
||||
<li><a href="#org5659c33">3.3. Choice of the programming language</a></li>
|
||||
<li><a href="#orgf59edb9">3.4. Coding rules</a></li>
|
||||
<li><a href="#org9451c3b">3.5. Design of the library</a></li>
|
||||
<li><a href="#org7346589">3.6. Naming conventions</a></li>
|
||||
<li><a href="#orgcd2a636">3.7. Application programming interface</a></li>
|
||||
<li><a href="#orgc75b86c">3.8. Global state</a></li>
|
||||
<li><a href="#orgee4719c">3.9. Headers</a></li>
|
||||
<li><a href="#org74ccc5c">3.10. Low-level functions</a></li>
|
||||
<li><a href="#org5e8b3ac">3.11. High-level functions</a></li>
|
||||
<li><a href="#org371f513">3.12. Numerical precision</a></li>
|
||||
<li><a href="#org7fddecd">3.13. Algorithms</a></li>
|
||||
<li><a href="#org8b02912">3.1. Literate programming</a></li>
|
||||
<li><a href="#orge9f9a24">3.2. Source code editing</a></li>
|
||||
<li><a href="#org0be94e5">3.3. Choice of the programming language</a></li>
|
||||
<li><a href="#org9384a08">3.4. Coding rules</a></li>
|
||||
<li><a href="#orgcb3ceeb">3.5. Design of the library</a></li>
|
||||
<li><a href="#org692c4af">3.6. Naming conventions</a></li>
|
||||
<li><a href="#org82b8b22">3.7. Application programming interface</a></li>
|
||||
<li><a href="#orgefb72c3">3.8. Global state</a></li>
|
||||
<li><a href="#org3211360">3.9. Headers</a></li>
|
||||
<li><a href="#orge674d5f">3.10. Low-level functions</a></li>
|
||||
<li><a href="#org614d0af">3.11. High-level functions</a></li>
|
||||
<li><a href="#orgfbb428d">3.12. Numerical precision</a></li>
|
||||
<li><a href="#org67ad661">3.13. Algorithms</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgb47db35" class="outline-2">
|
||||
<h2 id="orgb47db35"><span class="section-number-2">1</span> Installing QMCkl</h2>
|
||||
<div id="outline-container-org2508f40" class="outline-2">
|
||||
<h2 id="org2508f40"><span class="section-number-2">1</span> Installing QMCkl</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
<p>
|
||||
The latest version fo QMCkl can be downloaded
|
||||
@ -371,8 +371,8 @@ The latest version fo QMCkl can be downloaded
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org94d769f" class="outline-3">
|
||||
<h3 id="org94d769f"><span class="section-number-3">1.1</span> Installing from the released tarball (for end users)</h3>
|
||||
<div id="outline-container-org051c913" class="outline-3">
|
||||
<h3 id="org051c913"><span class="section-number-3">1.1</span> Installing from the released tarball (for end users)</h3>
|
||||
<div class="outline-text-3" id="text-1-1">
|
||||
<p>
|
||||
QMCkl is built with GNU Autotools, so the usual
|
||||
@ -387,8 +387,8 @@ options are defined using <code>CFLAGS</code> and <code>FCFLAGS</code>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org859343f" class="outline-3">
|
||||
<h3 id="org859343f"><span class="section-number-3">1.2</span> Installing from the source repository (for developers)</h3>
|
||||
<div id="outline-container-org47188c9" class="outline-3">
|
||||
<h3 id="org47188c9"><span class="section-number-3">1.2</span> Installing from the source repository (for developers)</h3>
|
||||
<div class="outline-text-3" id="text-1-2">
|
||||
<p>
|
||||
To compile from the source repository, additional dependencies are
|
||||
@ -409,8 +409,8 @@ to be executed first.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org559bf9f" class="outline-2">
|
||||
<h2 id="org559bf9f"><span class="section-number-2">2</span> Using QMCkl</h2>
|
||||
<div id="outline-container-org084014e" class="outline-2">
|
||||
<h2 id="org084014e"><span class="section-number-2">2</span> Using QMCkl</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
<p>
|
||||
The <code>qmckl.h</code> header file installed in the <code>${prefix}/include</code> directory
|
||||
@ -439,12 +439,12 @@ Both files are located in the <code>include/</code> directory.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf89a98e" class="outline-2">
|
||||
<h2 id="orgf89a98e"><span class="section-number-2">3</span> Developing in QMCkl</h2>
|
||||
<div id="outline-container-orgc19885d" class="outline-2">
|
||||
<h2 id="orgc19885d"><span class="section-number-2">3</span> Developing in QMCkl</h2>
|
||||
<div class="outline-text-2" id="text-3">
|
||||
</div>
|
||||
<div id="outline-container-org4272a02" class="outline-3">
|
||||
<h3 id="org4272a02"><span class="section-number-3">3.1</span> Literate programming</h3>
|
||||
<div id="outline-container-org8b02912" class="outline-3">
|
||||
<h3 id="org8b02912"><span class="section-number-3">3.1</span> Literate programming</h3>
|
||||
<div class="outline-text-3" id="text-3-1">
|
||||
<p>
|
||||
In a traditional source code, most of the lines of source files of a program
|
||||
@ -494,8 +494,8 @@ tarball contains the generated source code.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgaaf4658" class="outline-3">
|
||||
<h3 id="orgaaf4658"><span class="section-number-3">3.2</span> Source code editing</h3>
|
||||
<div id="outline-container-orge9f9a24" class="outline-3">
|
||||
<h3 id="orge9f9a24"><span class="section-number-3">3.2</span> Source code editing</h3>
|
||||
<div class="outline-text-3" id="text-3-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>.
|
||||
@ -526,8 +526,8 @@ org-mode.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org5659c33" class="outline-3">
|
||||
<h3 id="org5659c33"><span class="section-number-3">3.3</span> Choice of the programming language</h3>
|
||||
<div id="outline-container-org0be94e5" class="outline-3">
|
||||
<h3 id="org0be94e5"><span class="section-number-3">3.3</span> Choice of the programming language</h3>
|
||||
<div class="outline-text-3" id="text-3-3">
|
||||
<p>
|
||||
Most of the codes of the <a href="https://trex-coe.eu">TREX CoE</a> are written in Fortran with some
|
||||
@ -591,8 +591,8 @@ For more guidelines on using Fortran to generate a C interface, see
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf59edb9" class="outline-3">
|
||||
<h3 id="orgf59edb9"><span class="section-number-3">3.4</span> Coding rules</h3>
|
||||
<div id="outline-container-org9384a08" class="outline-3">
|
||||
<h3 id="org9384a08"><span class="section-number-3">3.4</span> Coding rules</h3>
|
||||
<div class="outline-text-3" id="text-3-4">
|
||||
<p>
|
||||
The authors should follow the recommendations of the C99
|
||||
@ -612,8 +612,8 @@ make cppcheck ; cat cppcheck.out
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org9451c3b" class="outline-3">
|
||||
<h3 id="org9451c3b"><span class="section-number-3">3.5</span> Design of the library</h3>
|
||||
<div id="outline-container-orgcb3ceeb" class="outline-3">
|
||||
<h3 id="orgcb3ceeb"><span class="section-number-3">3.5</span> Design of the library</h3>
|
||||
<div class="outline-text-3" id="text-3-5">
|
||||
<p>
|
||||
The proposed API should allow the library to: deal with memory transfers
|
||||
@ -624,8 +624,8 @@ functions (see below).
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org7346589" class="outline-3">
|
||||
<h3 id="org7346589"><span class="section-number-3">3.6</span> Naming conventions</h3>
|
||||
<div id="outline-container-org692c4af" class="outline-3">
|
||||
<h3 id="org692c4af"><span class="section-number-3">3.6</span> Naming conventions</h3>
|
||||
<div class="outline-text-3" id="text-3-6">
|
||||
<p>
|
||||
To avoid namespace collisions, we use <code>qmckl_</code> as a prefix for all exported
|
||||
@ -646,8 +646,8 @@ form is allowed.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgcd2a636" class="outline-3">
|
||||
<h3 id="orgcd2a636"><span class="section-number-3">3.7</span> Application programming interface</h3>
|
||||
<div id="outline-container-org82b8b22" class="outline-3">
|
||||
<h3 id="org82b8b22"><span class="section-number-3">3.7</span> Application programming interface</h3>
|
||||
<div class="outline-text-3" id="text-3-7">
|
||||
<p>
|
||||
In the C language, the number of bits used by the integer types can change
|
||||
@ -679,15 +679,15 @@ bindings in other languages in other repositories.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgc75b86c" class="outline-3">
|
||||
<h3 id="orgc75b86c"><span class="section-number-3">3.8</span> Global state</h3>
|
||||
<div id="outline-container-orgefb72c3" class="outline-3">
|
||||
<h3 id="orgefb72c3"><span class="section-number-3">3.8</span> Global state</h3>
|
||||
<div class="outline-text-3" id="text-3-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="orgecb1984">=context=</a> contains the global
|
||||
<code>qmckl_context_create</code> function. The <a id="org63ed050">=context=</a> contains the global
|
||||
state of the library, and is used as the first argument of many
|
||||
QMCkl functions.
|
||||
</p>
|
||||
@ -701,8 +701,8 @@ the state is done by setters and getters, prefixed by
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgee4719c" class="outline-3">
|
||||
<h3 id="orgee4719c"><span class="section-number-3">3.9</span> Headers</h3>
|
||||
<div id="outline-container-org3211360" class="outline-3">
|
||||
<h3 id="org3211360"><span class="section-number-3">3.9</span> Headers</h3>
|
||||
<div class="outline-text-3" id="text-3-9">
|
||||
<p>
|
||||
A single <code>qmckl.h</code> header to be distributed by the library
|
||||
@ -790,8 +790,8 @@ and the types definitions should be written in the <code>*fh_type.f90</code> fil
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org74ccc5c" class="outline-3">
|
||||
<h3 id="org74ccc5c"><span class="section-number-3">3.10</span> Low-level functions</h3>
|
||||
<div id="outline-container-orge674d5f" class="outline-3">
|
||||
<h3 id="orge674d5f"><span class="section-number-3">3.10</span> Low-level functions</h3>
|
||||
<div class="outline-text-3" id="text-3-10">
|
||||
<p>
|
||||
Low-level functions are very simple functions which are leaves of
|
||||
@ -800,14 +800,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="#orgecb1984"><code>context</code></a>. They are not allowed to allocate/deallocate memory, and
|
||||
<a href="#org63ed050"><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-org5e8b3ac" class="outline-3">
|
||||
<h3 id="org5e8b3ac"><span class="section-number-3">3.11</span> High-level functions</h3>
|
||||
<div id="outline-container-org614d0af" class="outline-3">
|
||||
<h3 id="org614d0af"><span class="section-number-3">3.11</span> High-level functions</h3>
|
||||
<div class="outline-text-3" id="text-3-11">
|
||||
<p>
|
||||
High-level functions are at the top of the function call tree.
|
||||
@ -819,8 +819,8 @@ temporary storage, to simplify the use of accelerators.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org371f513" class="outline-3">
|
||||
<h3 id="org371f513"><span class="section-number-3">3.12</span> Numerical precision</h3>
|
||||
<div id="outline-container-orgfbb428d" class="outline-3">
|
||||
<h3 id="orgfbb428d"><span class="section-number-3">3.12</span> Numerical precision</h3>
|
||||
<div class="outline-text-3" id="text-3-12">
|
||||
<p>
|
||||
The minimal number of bits of precision required for a function
|
||||
@ -828,7 +828,7 @@ 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="#orgecb1984"><code>context</code></a> variable.
|
||||
specified in the <a href="#org63ed050"><code>context</code></a> variable.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@ -896,8 +896,8 @@ following points :
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org7fddecd" class="outline-3">
|
||||
<h3 id="org7fddecd"><span class="section-number-3">3.13</span> Algorithms</h3>
|
||||
<div id="outline-container-org67ad661" class="outline-3">
|
||||
<h3 id="org67ad661"><span class="section-number-3">3.13</span> Algorithms</h3>
|
||||
<div class="outline-text-3" id="text-3-13">
|
||||
<p>
|
||||
Reducing the scaling of an algorithm usually implies also reducing
|
||||
@ -913,7 +913,7 @@ implemented adapted to different problem sizes.
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2022-01-21 Fri 07:53</p>
|
||||
<p class="date">Created: 2022-01-23 Sun 18:08</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
150
qmckl_ao.html
150
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>
|
||||
<!-- 2022-01-21 Fri 07:53 -->
|
||||
<!-- 2022-01-23 Sun 18:08 -->
|
||||
<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,53 +333,53 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org1a9246a">1. Introduction</a></li>
|
||||
<li><a href="#orge3ed600">2. Context</a>
|
||||
<li><a href="#org59130a6">1. Introduction</a></li>
|
||||
<li><a href="#org666de1a">2. Context</a>
|
||||
<ul>
|
||||
<li><a href="#orga689450">2.1. Constant data</a>
|
||||
<li><a href="#orgea43ca5">2.1. Constant data</a>
|
||||
<ul>
|
||||
<li><a href="#org07109c4">2.1.1. Initialization functions</a>
|
||||
<li><a href="#orga05be7f">2.1.1. Initialization functions</a>
|
||||
<ul>
|
||||
<li><a href="#org64e0b9e">2.1.1.1. C interface</a></li>
|
||||
<li><a href="#orga3f3478">2.1.1.2. Fortran interface</a></li>
|
||||
<li><a href="#org4a6cd6a">2.1.1.1. C interface</a></li>
|
||||
<li><a href="#org3827967">2.1.1.2. Fortran interface</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org55886bf">2.1.2. Access functions</a>
|
||||
<li><a href="#orgf7cea2d">2.1.2. Access functions</a>
|
||||
<ul>
|
||||
<li><a href="#orgbc868d0">2.1.2.1. C interface</a></li>
|
||||
<li><a href="#org3c1de51">2.1.2.2. Fortran interface</a></li>
|
||||
<li><a href="#orgb97874b">2.1.2.1. C interface</a></li>
|
||||
<li><a href="#orgb27485c">2.1.2.2. Fortran interface</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgfa9a1a5">2.2. Computed data</a>
|
||||
<li><a href="#org1b83450">2.2. Computed data</a>
|
||||
<ul>
|
||||
<li><a href="#orgb390a53">2.2.1. After initialization</a></li>
|
||||
<li><a href="#org95551d9">2.2.2. Access functions</a></li>
|
||||
<li><a href="#orgb568031">2.2.1. After initialization</a></li>
|
||||
<li><a href="#org15cac2e">2.2.2. Access functions</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org4a5d803">3. Radial part</a>
|
||||
<li><a href="#org19b0d0e">3. Radial part</a>
|
||||
<ul>
|
||||
<li><a href="#org5fc47cc">3.1. General functions for Gaussian basis functions</a></li>
|
||||
<li><a href="#org5a84718">3.2. Computation of primitives</a></li>
|
||||
<li><a href="#org6b15511">3.3. Computation of shells</a></li>
|
||||
<li><a href="#org16037c5">3.1. General functions for Gaussian basis functions</a></li>
|
||||
<li><a href="#org18199ca">3.2. Computation of primitives</a></li>
|
||||
<li><a href="#orgf6f55bf">3.3. Computation of shells</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org8f5fdd8">4. Polynomial part</a>
|
||||
<li><a href="#org9c17d3a">4. Polynomial part</a>
|
||||
<ul>
|
||||
<li><a href="#orgcca25cf">4.1. General functions for Powers of \(x-X_i\)</a></li>
|
||||
<li><a href="#orgf15805c">4.2. General functions for Value, Gradient and Laplacian of a polynomial</a></li>
|
||||
<li><a href="#org1607c82">4.1. General functions for Powers of \(x-X_i\)</a></li>
|
||||
<li><a href="#org53075c5">4.2. General functions for Value, Gradient and Laplacian of a polynomial</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org1ac9cf4">5. Combining radial and polynomial parts</a></li>
|
||||
<li><a href="#org121c257">5. Combining radial and polynomial parts</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org1a9246a" class="outline-2">
|
||||
<h2 id="org1a9246a"><span class="section-number-2">1</span> Introduction</h2>
|
||||
<div id="outline-container-org59130a6" class="outline-2">
|
||||
<h2 id="org59130a6"><span class="section-number-2">1</span> Introduction</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
<p>
|
||||
The atomic basis set is defined as a list of shells. Each shell \(s\) is
|
||||
@ -432,19 +432,19 @@ gradients and Laplacian of the atomic basis functions.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge3ed600" class="outline-2">
|
||||
<h2 id="orge3ed600"><span class="section-number-2">2</span> Context</h2>
|
||||
<div id="outline-container-org666de1a" class="outline-2">
|
||||
<h2 id="org666de1a"><span class="section-number-2">2</span> Context</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
</div>
|
||||
<div id="outline-container-orga689450" class="outline-3">
|
||||
<h3 id="orga689450"><span class="section-number-3">2.1</span> Constant data</h3>
|
||||
<div id="outline-container-orgea43ca5" class="outline-3">
|
||||
<h3 id="orgea43ca5"><span class="section-number-3">2.1</span> Constant data</h3>
|
||||
<div class="outline-text-3" id="text-2-1">
|
||||
<p>
|
||||
The following arrays are stored in the context, and need to be set
|
||||
when initializing the library:
|
||||
</p>
|
||||
|
||||
<table id="org10d6a7f" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org59e5643" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -618,7 +618,7 @@ calling the functions:
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-C" id="org8f68d3f"><span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #0000ff;">qmckl_set_ao_basis_$V$</span> ( <span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>,
|
||||
<pre class="src src-C" id="orgf95841f"><span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #0000ff;">qmckl_set_ao_basis_$V$</span> ( <span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>,
|
||||
<span style="color: #a020f0;">const</span> $type_of_V$ $V$);
|
||||
|
||||
<span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #0000ff;">qmckl_get_ao_basis_$V$</span> ( <span style="color: #a020f0;">const</span> <span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>,
|
||||
@ -655,7 +655,7 @@ For array variables, use the rule:
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-C" id="orgf9e3ff1"><span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #0000ff;">qmckl_set_ao_basis_$V$</span> ( <span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>,
|
||||
<pre class="src src-C" id="orgf4f8eec"><span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #0000ff;">qmckl_set_ao_basis_$V$</span> ( <span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>,
|
||||
<span style="color: #a020f0;">const</span> $type_of_V$ $V$,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">size_max</span>);
|
||||
|
||||
@ -693,17 +693,17 @@ For array variables, use the rule:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org07109c4" class="outline-4">
|
||||
<h4 id="org07109c4"><span class="section-number-4">2.1.1</span> Initialization functions</h4>
|
||||
<div id="outline-container-orga05be7f" class="outline-4">
|
||||
<h4 id="orga05be7f"><span class="section-number-4">2.1.1</span> Initialization functions</h4>
|
||||
<div class="outline-text-4" id="text-2-1-1">
|
||||
<p>
|
||||
<code>size_max</code> is the dimension of the input array, which should be
|
||||
equal of larger than the value given in the table of section <a href="#orge3ed600">2</a>.
|
||||
equal of larger than the value given in the table of section <a href="#org666de1a">2</a>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org64e0b9e" class="outline-5">
|
||||
<h5 id="org64e0b9e"><span class="section-number-5">2.1.1.1</span> C interface</h5>
|
||||
<div id="outline-container-org4a6cd6a" class="outline-5">
|
||||
<h5 id="org4a6cd6a"><span class="section-number-5">2.1.1.1</span> C interface</h5>
|
||||
<div class="outline-text-5" id="text-2-1-1-1">
|
||||
<p>
|
||||
To set the basis set, all the following functions need to be
|
||||
@ -827,8 +827,8 @@ called.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orga3f3478" class="outline-5">
|
||||
<h5 id="orga3f3478"><span class="section-number-5">2.1.1.2</span> Fortran interface</h5>
|
||||
<div id="outline-container-org3827967" class="outline-5">
|
||||
<h5 id="org3827967"><span class="section-number-5">2.1.1.2</span> Fortran interface</h5>
|
||||
<div class="outline-text-5" id="text-2-1-1-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90"><span style="color: #a020f0;">interface</span>
|
||||
@ -1011,17 +1011,17 @@ called.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org55886bf" class="outline-4">
|
||||
<h4 id="org55886bf"><span class="section-number-4">2.1.2</span> Access functions</h4>
|
||||
<div id="outline-container-orgf7cea2d" class="outline-4">
|
||||
<h4 id="orgf7cea2d"><span class="section-number-4">2.1.2</span> Access functions</h4>
|
||||
<div class="outline-text-4" id="text-2-1-2">
|
||||
<p>
|
||||
<code>size_max</code> is the dimension of the input array, which should be
|
||||
equal of larger than the value given in the table of section <a href="#orge3ed600">2</a>.
|
||||
equal of larger than the value given in the table of section <a href="#org666de1a">2</a>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgbc868d0" class="outline-5">
|
||||
<h5 id="orgbc868d0"><span class="section-number-5">2.1.2.1</span> C interface</h5>
|
||||
<div id="outline-container-orgb97874b" class="outline-5">
|
||||
<h5 id="orgb97874b"><span class="section-number-5">2.1.2.1</span> C interface</h5>
|
||||
<div class="outline-text-5" id="text-2-1-2-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span>
|
||||
@ -1143,8 +1143,8 @@ function returns <code>true</code>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org3c1de51" class="outline-5">
|
||||
<h5 id="org3c1de51"><span class="section-number-5">2.1.2.2</span> Fortran interface</h5>
|
||||
<div id="outline-container-orgb27485c" class="outline-5">
|
||||
<h5 id="orgb27485c"><span class="section-number-5">2.1.2.2</span> Fortran interface</h5>
|
||||
<div class="outline-text-5" id="text-2-1-2-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90"><span style="color: #a020f0;">interface</span>
|
||||
@ -1328,8 +1328,8 @@ function returns <code>true</code>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgfa9a1a5" class="outline-3">
|
||||
<h3 id="orgfa9a1a5"><span class="section-number-3">2.2</span> Computed data</h3>
|
||||
<div id="outline-container-org1b83450" class="outline-3">
|
||||
<h3 id="org1b83450"><span class="section-number-3">2.2</span> Computed data</h3>
|
||||
<div class="outline-text-3" id="text-2-2">
|
||||
<p>
|
||||
The following data is computed as described in the next sections:
|
||||
@ -1393,8 +1393,8 @@ The following data is computed as described in the next sections:
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-orgb390a53" class="outline-4">
|
||||
<h4 id="orgb390a53"><span class="section-number-4">2.2.1</span> After initialization</h4>
|
||||
<div id="outline-container-orgb568031" class="outline-4">
|
||||
<h4 id="orgb568031"><span class="section-number-4">2.2.1</span> After initialization</h4>
|
||||
<div class="outline-text-4" id="text-2-2-1">
|
||||
<p>
|
||||
When the basis set is completely entered, extra data structures may be
|
||||
@ -1408,8 +1408,8 @@ the context.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org95551d9" class="outline-4">
|
||||
<h4 id="org95551d9"><span class="section-number-4">2.2.2</span> Access functions</h4>
|
||||
<div id="outline-container-org15cac2e" class="outline-4">
|
||||
<h4 id="org15cac2e"><span class="section-number-4">2.2.2</span> Access functions</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>
|
||||
@ -1422,7 +1422,7 @@ the context.
|
||||
<p>
|
||||
Returns the array of values, gradients an Laplacian of primitive
|
||||
basis functions evaluated at the current coordinates.
|
||||
See section <a href="#org5a84718">3.2</a>.
|
||||
See section <a href="#org18199ca">3.2</a>.
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
@ -1435,7 +1435,7 @@ See section <a href="#org5a84718">3.2</a>.
|
||||
|
||||
<p>
|
||||
Returns the array of values, gradients an Laplacian of contracted shells
|
||||
evaluated at the current coordinates. See section <a href="#org6b15511">3.3</a>.
|
||||
evaluated at the current coordinates. See section <a href="#orgf6f55bf">3.3</a>.
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
@ -1449,19 +1449,19 @@ evaluated at the current coordinates. See section <a href="#org6b15511">3.3</a>.
|
||||
<p>
|
||||
Returns the array of values, gradients an Laplacian of the atomic orbitals
|
||||
evaluated at the current coordinates.
|
||||
See section <a href="#org1ac9cf4">5</a>.
|
||||
See section <a href="#org121c257">5</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org4a5d803" class="outline-2">
|
||||
<h2 id="org4a5d803"><span class="section-number-2">3</span> Radial part</h2>
|
||||
<div id="outline-container-org19b0d0e" class="outline-2">
|
||||
<h2 id="org19b0d0e"><span class="section-number-2">3</span> Radial part</h2>
|
||||
<div class="outline-text-2" id="text-3">
|
||||
</div>
|
||||
<div id="outline-container-org5fc47cc" class="outline-3">
|
||||
<h3 id="org5fc47cc"><span class="section-number-3">3.1</span> General functions for Gaussian basis functions</h3>
|
||||
<div id="outline-container-org16037c5" class="outline-3">
|
||||
<h3 id="org16037c5"><span class="section-number-3">3.1</span> General functions for 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
|
||||
@ -1632,10 +1632,10 @@ Requirements:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org5a84718" class="outline-3">
|
||||
<h3 id="org5a84718"><span class="section-number-3">3.2</span> Computation of primitives</h3>
|
||||
<div id="outline-container-org18199ca" class="outline-3">
|
||||
<h3 id="org18199ca"><span class="section-number-3">3.2</span> Computation of primitives</h3>
|
||||
<div class="outline-text-3" id="text-3-2">
|
||||
<table id="orgc829a6b" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org1c8dfd0" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1794,10 +1794,10 @@ Requirements:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6b15511" class="outline-3">
|
||||
<h3 id="org6b15511"><span class="section-number-3">3.3</span> Computation of shells</h3>
|
||||
<div id="outline-container-orgf6f55bf" class="outline-3">
|
||||
<h3 id="orgf6f55bf"><span class="section-number-3">3.3</span> Computation of shells</h3>
|
||||
<div class="outline-text-3" id="text-3-3">
|
||||
<table id="orgbd44583" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org1eded61" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -2036,8 +2036,8 @@ Requirements:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org8f5fdd8" class="outline-2">
|
||||
<h2 id="org8f5fdd8"><span class="section-number-2">4</span> Polynomial part</h2>
|
||||
<div id="outline-container-org9c17d3a" class="outline-2">
|
||||
<h2 id="org9c17d3a"><span class="section-number-2">4</span> Polynomial part</h2>
|
||||
<div class="outline-text-2" id="text-4">
|
||||
<p>
|
||||
Going from the atomic basis set to AOs implies a systematic
|
||||
@ -2057,8 +2057,8 @@ f & : & f_{xxx}, f_{xxy}, f_{xxz}, f_{xyy}, f_{xyz}, f_{xzz}, f_{yyy}, f_{yyz},
|
||||
\end{eqnarray}
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgcca25cf" class="outline-3">
|
||||
<h3 id="orgcca25cf"><span class="section-number-3">4.1</span> General functions for Powers of \(x-X_i\)</h3>
|
||||
<div id="outline-container-org1607c82" class="outline-3">
|
||||
<h3 id="org1607c82"><span class="section-number-3">4.1</span> General functions for Powers of \(x-X_i\)</h3>
|
||||
<div class="outline-text-3" id="text-4-1">
|
||||
<p>
|
||||
The <code>qmckl_ao_power</code> function computes all the powers of the <code>n</code>
|
||||
@ -2070,7 +2070,7 @@ the \(n\) points:
|
||||
\[ P_{ik} = X_i^k \]
|
||||
</p>
|
||||
|
||||
<table id="org402ccbf" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orgcf9c740" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -2208,8 +2208,8 @@ Requirements:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf15805c" class="outline-3">
|
||||
<h3 id="orgf15805c"><span class="section-number-3">4.2</span> General functions for Value, Gradient and Laplacian of a polynomial</h3>
|
||||
<div id="outline-container-org53075c5" class="outline-3">
|
||||
<h3 id="org53075c5"><span class="section-number-3">4.2</span> General functions for Value, Gradient and Laplacian of a polynomial</h3>
|
||||
<div class="outline-text-3" id="text-4-2">
|
||||
<p>
|
||||
A polynomial is centered on a nucleus \(\mathbf{R}_i\)
|
||||
@ -2254,7 +2254,7 @@ Laplacians at a given point in space, of all polynomials with an
|
||||
angular momentum up to <code>lmax</code>.
|
||||
</p>
|
||||
|
||||
<table id="org009d01e" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orgf497c10" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -2514,10 +2514,10 @@ For example, with a=0, b=2 and c=1 the string is "yyz"</li>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org1ac9cf4" class="outline-2">
|
||||
<h2 id="org1ac9cf4"><span class="section-number-2">5</span> Combining radial and polynomial parts</h2>
|
||||
<div id="outline-container-org121c257" class="outline-2">
|
||||
<h2 id="org121c257"><span class="section-number-2">5</span> Combining radial and polynomial parts</h2>
|
||||
<div class="outline-text-2" id="text-5">
|
||||
<table id="orgf0d46ae" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org5adc051" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -2795,7 +2795,7 @@ For example, with a=0, b=2 and c=1 the string is "yyz"</li>
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2022-01-21 Fri 07:53</p>
|
||||
<p class="date">Created: 2022-01-23 Sun 18:08</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
732
qmckl_blas.html
732
qmckl_blas.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>
|
||||
<!-- 2022-01-21 Fri 07:53 -->
|
||||
<!-- 2022-01-23 Sun 18:08 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>BLAS functions</title>
|
||||
@ -333,41 +333,48 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org7a8d590">1. Data types</a>
|
||||
<li><a href="#org146b74f">1. Data types</a>
|
||||
<ul>
|
||||
<li><a href="#org2a7f2e3">1.1. Vector</a></li>
|
||||
<li><a href="#org620d661">1.2. Matrix</a></li>
|
||||
<li><a href="#org381218f">1.3. Tensor</a></li>
|
||||
<li><a href="#org5a26792">1.4. Reshaping</a>
|
||||
<li><a href="#orgad21d5a">1.1. Vector</a></li>
|
||||
<li><a href="#orgff86f73">1.2. Matrix</a></li>
|
||||
<li><a href="#org6497952">1.3. Tensor</a></li>
|
||||
<li><a href="#org01e04a9">1.4. Reshaping</a>
|
||||
<ul>
|
||||
<li><a href="#orge2c7c22">1.4.1. Vector -> Matrix</a></li>
|
||||
<li><a href="#org667d381">1.4.2. Vector -> Tensor</a></li>
|
||||
<li><a href="#org63b1d0d">1.4.3. Matrix -> Vector</a></li>
|
||||
<li><a href="#orge4a33b4">1.4.4. Matrix -> Tensor</a></li>
|
||||
<li><a href="#orgaef1d7e">1.4.5. Tensor -> Vector</a></li>
|
||||
<li><a href="#org9e59138">1.4.6. Tensor -> Matrix</a></li>
|
||||
<li><a href="#orgdd8a651">1.4.1. Vector -> Matrix</a></li>
|
||||
<li><a href="#org3a130af">1.4.2. Vector -> Tensor</a></li>
|
||||
<li><a href="#org0b6a8d1">1.4.3. Matrix -> Vector</a></li>
|
||||
<li><a href="#orgdbc3919">1.4.4. Matrix -> Tensor</a></li>
|
||||
<li><a href="#org734d9a4">1.4.5. Tensor -> Vector</a></li>
|
||||
<li><a href="#orgeb67cd9">1.4.6. Tensor -> Matrix</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgd000b2d">1.5. Access macros</a></li>
|
||||
<li><a href="#orgdbbeff6">1.6. Tests</a></li>
|
||||
<li><a href="#orgf5cbf30">1.5. Access macros</a></li>
|
||||
<li><a href="#org44effb4">1.6. Copy to/from to <code>double*</code></a></li>
|
||||
<li><a href="#org6c86b38">1.7. Tests</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org8d07876">2. Matrix operations</a>
|
||||
<li><a href="#org935c037">2. Matrix operations</a>
|
||||
<ul>
|
||||
<li><a href="#orgace99e2">2.1. <code>qmckl_dgemm</code></a></li>
|
||||
<li><a href="#org45d3387">2.2. <code>qmckl_adjugate</code></a></li>
|
||||
<li><a href="#org968993c">2.1. <code>qmckl_dgemm</code></a></li>
|
||||
<li><a href="#orgde5460c">2.2. <code>qmckl_matmul</code></a></li>
|
||||
<li><a href="#org66dac88">2.3. <code>qmckl_adjugate</code></a></li>
|
||||
<li><a href="#org55226ef">2.4. <code>qmckl_transpose</code></a>
|
||||
<ul>
|
||||
<li><a href="#orgf0e0240">2.4.1. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org7a8d590" class="outline-2">
|
||||
<h2 id="org7a8d590"><span class="section-number-2">1</span> Data types</h2>
|
||||
<div id="outline-container-org146b74f" class="outline-2">
|
||||
<h2 id="org146b74f"><span class="section-number-2">1</span> Data types</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
</div>
|
||||
<div id="outline-container-org2a7f2e3" class="outline-3">
|
||||
<h3 id="org2a7f2e3"><span class="section-number-3">1.1</span> Vector</h3>
|
||||
<div id="outline-container-orgad21d5a" class="outline-3">
|
||||
<h3 id="orgad21d5a"><span class="section-number-3">1.1</span> Vector</h3>
|
||||
<div class="outline-text-3" id="text-1-1">
|
||||
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
@ -476,8 +483,8 @@ Allocates a new vector. If the allocation failed the size is zero.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org620d661" class="outline-3">
|
||||
<h3 id="org620d661"><span class="section-number-3">1.2</span> Matrix</h3>
|
||||
<div id="outline-container-orgff86f73" class="outline-3">
|
||||
<h3 id="orgff86f73"><span class="section-number-3">1.2</span> Matrix</h3>
|
||||
<div class="outline-text-3" id="text-1-2">
|
||||
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
@ -597,8 +604,8 @@ Allocates a new matrix. If the allocation failed the sizes are zero.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org381218f" class="outline-3">
|
||||
<h3 id="org381218f"><span class="section-number-3">1.3</span> Tensor</h3>
|
||||
<div id="outline-container-org6497952" class="outline-3">
|
||||
<h3 id="org6497952"><span class="section-number-3">1.3</span> Tensor</h3>
|
||||
<div class="outline-text-3" id="text-1-3">
|
||||
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
@ -734,16 +741,16 @@ is zero.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org5a26792" class="outline-3">
|
||||
<h3 id="org5a26792"><span class="section-number-3">1.4</span> Reshaping</h3>
|
||||
<div id="outline-container-org01e04a9" class="outline-3">
|
||||
<h3 id="org01e04a9"><span class="section-number-3">1.4</span> Reshaping</h3>
|
||||
<div class="outline-text-3" id="text-1-4">
|
||||
<p>
|
||||
Reshaping occurs in-place and the pointer to the data is copied.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge2c7c22" class="outline-4">
|
||||
<h4 id="orge2c7c22"><span class="section-number-4">1.4.1</span> Vector -> Matrix</h4>
|
||||
<div id="outline-container-orgdd8a651" class="outline-4">
|
||||
<h4 id="orgdd8a651"><span class="section-number-4">1.4.1</span> Vector -> Matrix</h4>
|
||||
<div class="outline-text-4" id="text-1-4-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_matrix</span>
|
||||
@ -779,8 +786,8 @@ Reshapes a vector into a matrix.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org667d381" class="outline-4">
|
||||
<h4 id="org667d381"><span class="section-number-4">1.4.2</span> Vector -> Tensor</h4>
|
||||
<div id="outline-container-org3a130af" class="outline-4">
|
||||
<h4 id="org3a130af"><span class="section-number-4">1.4.2</span> Vector -> Tensor</h4>
|
||||
<div class="outline-text-4" id="text-1-4-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_tensor</span>
|
||||
@ -818,13 +825,12 @@ Reshapes a vector into a tensor.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org63b1d0d" class="outline-4">
|
||||
<h4 id="org63b1d0d"><span class="section-number-4">1.4.3</span> Matrix -> Vector</h4>
|
||||
<div id="outline-container-org0b6a8d1" class="outline-4">
|
||||
<h4 id="org0b6a8d1"><span class="section-number-4">1.4.3</span> Matrix -> Vector</h4>
|
||||
<div class="outline-text-4" id="text-1-4-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_vector</span>
|
||||
<span style="color: #0000ff;">qmckl_vector_of_matrix</span>(<span style="color: #a020f0;">const</span> <span style="color: #228b22;">qmckl_matrix</span> <span style="color: #a0522d;">matrix</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">size</span>);
|
||||
<span style="color: #0000ff;">qmckl_vector_of_matrix</span>(<span style="color: #a020f0;">const</span> <span style="color: #228b22;">qmckl_matrix</span> <span style="color: #a0522d;">matrix</span>);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
@ -834,15 +840,11 @@ Reshapes a matrix into a vector.
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_vector</span>
|
||||
<span style="color: #0000ff;">qmckl_vector_of_matrix</span>(<span style="color: #a020f0;">const</span> <span style="color: #228b22;">qmckl_matrix</span> <span style="color: #a0522d;">matrix</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">size</span>)
|
||||
<span style="color: #0000ff;">qmckl_vector_of_matrix</span>(<span style="color: #a020f0;">const</span> <span style="color: #228b22;">qmckl_matrix</span> <span style="color: #a0522d;">matrix</span>)
|
||||
{
|
||||
/* <span style="color: #b22222;">Always true </span>*/
|
||||
assert (matrix.size[0] * matrix.size[1] == size);
|
||||
|
||||
<span style="color: #228b22;">qmckl_vector</span> <span style="color: #a0522d;">result</span>;
|
||||
|
||||
result.size = size;
|
||||
result.size = matrix.size[0] * matrix.size[1];
|
||||
result.data = matrix.data;
|
||||
|
||||
<span style="color: #a020f0;">return</span> result;
|
||||
@ -852,8 +854,8 @@ Reshapes a matrix into a vector.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge4a33b4" class="outline-4">
|
||||
<h4 id="orge4a33b4"><span class="section-number-4">1.4.4</span> Matrix -> Tensor</h4>
|
||||
<div id="outline-container-orgdbc3919" class="outline-4">
|
||||
<h4 id="orgdbc3919"><span class="section-number-4">1.4.4</span> Matrix -> Tensor</h4>
|
||||
<div class="outline-text-4" id="text-1-4-4">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_tensor</span>
|
||||
@ -891,13 +893,12 @@ Reshapes a matrix into a tensor.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgaef1d7e" class="outline-4">
|
||||
<h4 id="orgaef1d7e"><span class="section-number-4">1.4.5</span> Tensor -> Vector</h4>
|
||||
<div id="outline-container-org734d9a4" class="outline-4">
|
||||
<h4 id="org734d9a4"><span class="section-number-4">1.4.5</span> Tensor -> Vector</h4>
|
||||
<div class="outline-text-4" id="text-1-4-5">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_vector</span>
|
||||
<span style="color: #0000ff;">qmckl_vector_of_tensor</span>(<span style="color: #a020f0;">const</span> <span style="color: #228b22;">qmckl_tensor</span> <span style="color: #a0522d;">tensor</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">size</span>);
|
||||
<span style="color: #0000ff;">qmckl_vector_of_tensor</span>(<span style="color: #a020f0;">const</span> <span style="color: #228b22;">qmckl_tensor</span> <span style="color: #a0522d;">tensor</span>);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
@ -907,19 +908,16 @@ Reshapes a tensor into a vector.
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_vector</span>
|
||||
<span style="color: #0000ff;">qmckl_vector_of_tensor</span>(<span style="color: #a020f0;">const</span> <span style="color: #228b22;">qmckl_tensor</span> <span style="color: #a0522d;">tensor</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">size</span>)
|
||||
<span style="color: #0000ff;">qmckl_vector_of_tensor</span>(<span style="color: #a020f0;">const</span> <span style="color: #228b22;">qmckl_tensor</span> <span style="color: #a0522d;">tensor</span>)
|
||||
{
|
||||
/* <span style="color: #b22222;">Always true </span>*/
|
||||
<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">prod_size</span> = (<span style="color: #228b22;">int64_t</span>) 1;
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">i</span>=0 ; i<tensor.order ; i++) {
|
||||
<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">prod_size</span> = (<span style="color: #228b22;">int64_t</span>) tensor.size[0];
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">i</span>=1 ; i<tensor.order ; i++) {
|
||||
prod_size *= tensor.size[i];
|
||||
}
|
||||
assert (prod_size == size);
|
||||
|
||||
<span style="color: #228b22;">qmckl_vector</span> <span style="color: #a0522d;">result</span>;
|
||||
|
||||
result.size = size;
|
||||
result.size = prod_size;
|
||||
result.data = tensor.data;
|
||||
|
||||
<span style="color: #a020f0;">return</span> result;
|
||||
@ -929,8 +927,8 @@ Reshapes a tensor into a vector.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org9e59138" class="outline-4">
|
||||
<h4 id="org9e59138"><span class="section-number-4">1.4.6</span> Tensor -> Matrix</h4>
|
||||
<div id="outline-container-orgeb67cd9" class="outline-4">
|
||||
<h4 id="orgeb67cd9"><span class="section-number-4">1.4.6</span> Tensor -> Matrix</h4>
|
||||
<div class="outline-text-4" id="text-1-4-6">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_matrix</span>
|
||||
@ -971,8 +969,8 @@ Reshapes a tensor into a vector.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd000b2d" class="outline-3">
|
||||
<h3 id="orgd000b2d"><span class="section-number-3">1.5</span> Access macros</h3>
|
||||
<div id="outline-container-orgf5cbf30" class="outline-3">
|
||||
<h3 id="orgf5cbf30"><span class="section-number-3">1.5</span> Access macros</h3>
|
||||
<div class="outline-text-3" id="text-1-5">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #483d8b;">#define</span> <span style="color: #0000ff;">qmckl_vec</span>(<span style="color: #a0522d;">v</span>, <span style="color: #a0522d;">i</span>) v.data[i]
|
||||
@ -986,10 +984,217 @@ Reshapes a tensor into a vector.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgdbbeff6" class="outline-3">
|
||||
<h3 id="orgdbbeff6"><span class="section-number-3">1.6</span> Tests</h3>
|
||||
<div id="outline-container-org44effb4" class="outline-3">
|
||||
<h3 id="org44effb4"><span class="section-number-3">1.6</span> Copy to/from to <code>double*</code></h3>
|
||||
<div class="outline-text-3" id="text-1-6">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span>
|
||||
<span style="color: #0000ff;">qmckl_double_of_vector</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;">qmckl_vector</span> <span style="color: #a0522d;">vector</span>,
|
||||
<span style="color: #228b22;">double</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">target</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">size_max</span>);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Converts a vector to a <code>double*</code>.
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span>
|
||||
<span style="color: #0000ff;">qmckl_double_of_vector</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;">qmckl_vector</span> <span style="color: #a0522d;">vector</span>,
|
||||
<span style="color: #228b22;">double</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">target</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">size_max</span>)
|
||||
{
|
||||
/* <span style="color: #b22222;">Always true by construction </span>*/
|
||||
assert (qmckl_context_check(context) != QMCKL_NULL_CONTEXT);
|
||||
assert (vector.size > (<span style="color: #228b22;">int64_t</span>) 0);
|
||||
assert (target != <span style="color: #008b8b;">NULL</span>);
|
||||
assert (size_max > (<span style="color: #228b22;">int64_t</span>) 0);
|
||||
assert (size_max >= vector.size);
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">i</span>=0 ; i<vector.size ; ++i) {
|
||||
target[i] = vector.data[i];
|
||||
}
|
||||
<span style="color: #a020f0;">return</span> QMCKL_SUCCESS;
|
||||
|
||||
}
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span>
|
||||
<span style="color: #0000ff;">qmckl_double_of_matrix</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;">qmckl_matrix</span> <span style="color: #a0522d;">matrix</span>,
|
||||
<span style="color: #228b22;">double</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">target</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">size_max</span>);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Converts a matrix to a <code>double*</code>.
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span>
|
||||
<span style="color: #0000ff;">qmckl_double_of_matrix</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;">qmckl_matrix</span> <span style="color: #a0522d;">matrix</span>,
|
||||
<span style="color: #228b22;">double</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">target</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">size_max</span>)
|
||||
{
|
||||
<span style="color: #228b22;">qmckl_vector</span> <span style="color: #a0522d;">vector</span> = qmckl_vector_of_matrix(matrix);
|
||||
<span style="color: #a020f0;">return</span> qmckl_double_of_vector(context, vector, target, size_max);
|
||||
}
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span>
|
||||
<span style="color: #0000ff;">qmckl_double_of_tensor</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;">qmckl_tensor</span> <span style="color: #a0522d;">tensor</span>,
|
||||
<span style="color: #228b22;">double</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">target</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">size_max</span>);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Converts a tensor to a <code>double*</code>.
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span>
|
||||
<span style="color: #0000ff;">qmckl_double_of_tensor</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;">qmckl_tensor</span> <span style="color: #a0522d;">tensor</span>,
|
||||
<span style="color: #228b22;">double</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">target</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">size_max</span>)
|
||||
{
|
||||
<span style="color: #228b22;">qmckl_vector</span> <span style="color: #a0522d;">vector</span> = qmckl_vector_of_tensor(tensor);
|
||||
<span style="color: #a020f0;">return</span> qmckl_double_of_vector(context, vector, target, size_max);
|
||||
}
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span>
|
||||
<span style="color: #0000ff;">qmckl_vector_of_double</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;">double</span>* <span style="color: #a0522d;">target</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">size_max</span>,
|
||||
<span style="color: #228b22;">qmckl_vector</span>* <span style="color: #a0522d;">vector</span>);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Converts a <code>double*</code> to a vector.
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span>
|
||||
<span style="color: #0000ff;">qmckl_vector_of_double</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;">double</span>* <span style="color: #a0522d;">target</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">size_max</span>,
|
||||
<span style="color: #228b22;">qmckl_vector</span>* <span style="color: #a0522d;">vector_out</span>)
|
||||
{
|
||||
<span style="color: #228b22;">qmckl_vector</span> <span style="color: #a0522d;">vector</span> = *vector_out;
|
||||
/* <span style="color: #b22222;">Always true by construction </span>*/
|
||||
assert (qmckl_context_check(context) != QMCKL_NULL_CONTEXT);
|
||||
|
||||
<span style="color: #a020f0;">if</span> (vector.size == 0) {
|
||||
<span style="color: #a020f0;">return</span> qmckl_failwith( context,
|
||||
QMCKL_INVALID_ARG_4,
|
||||
<span style="color: #8b2252;">"qmckl_double_of_vector"</span>,
|
||||
<span style="color: #8b2252;">"Vector not allocated"</span>);
|
||||
}
|
||||
|
||||
<span style="color: #a020f0;">if</span> (vector.size != size_max) {
|
||||
<span style="color: #a020f0;">return</span> qmckl_failwith( context,
|
||||
QMCKL_INVALID_ARG_4,
|
||||
<span style="color: #8b2252;">"qmckl_double_of_vector"</span>,
|
||||
<span style="color: #8b2252;">"Wrong vector size"</span>);
|
||||
}
|
||||
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">i</span>=0 ; i<vector.size ; ++i) {
|
||||
vector.data[i] = target[i];
|
||||
}
|
||||
|
||||
*vector_out = vector;
|
||||
<span style="color: #a020f0;">return</span> QMCKL_SUCCESS;
|
||||
|
||||
}
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span>
|
||||
<span style="color: #0000ff;">qmckl_matrix_of_double</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;">double</span>* <span style="color: #a0522d;">target</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">size_max</span>,
|
||||
<span style="color: #228b22;">qmckl_matrix</span>* <span style="color: #a0522d;">matrix</span>);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Converts a matrix to a <code>double*</code>.
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span>
|
||||
<span style="color: #0000ff;">qmckl_matrix_of_double</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;">double</span>* <span style="color: #a0522d;">target</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">size_max</span>,
|
||||
<span style="color: #228b22;">qmckl_matrix</span>* <span style="color: #a0522d;">matrix</span>)
|
||||
{
|
||||
<span style="color: #228b22;">qmckl_vector</span> <span style="color: #a0522d;">vector</span> = qmckl_vector_of_matrix(*matrix);
|
||||
<span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #a0522d;">rc</span> =
|
||||
qmckl_vector_of_double(context, target, size_max, &vector);
|
||||
*matrix = qmckl_matrix_of_vector(vector, matrix->size[0], matrix->size[1]);
|
||||
<span style="color: #a020f0;">return</span> rc;
|
||||
}
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span>
|
||||
<span style="color: #0000ff;">qmckl_tensor_of_double</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;">double</span>* <span style="color: #a0522d;">target</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">size_max</span>,
|
||||
<span style="color: #228b22;">qmckl_tensor</span>* <span style="color: #a0522d;">tensor</span>);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Converts a matrix to a <code>double*</code>.
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span>
|
||||
<span style="color: #0000ff;">qmckl_tensor_of_double</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;">double</span>* <span style="color: #a0522d;">target</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">size_max</span>,
|
||||
<span style="color: #228b22;">qmckl_tensor</span>* <span style="color: #a0522d;">tensor</span>)
|
||||
{
|
||||
<span style="color: #228b22;">qmckl_vector</span> <span style="color: #a0522d;">vector</span> = qmckl_vector_of_tensor(*tensor);
|
||||
<span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #a0522d;">rc</span> =
|
||||
qmckl_vector_of_double(context, target, size_max, &vector);
|
||||
*tensor = qmckl_tensor_of_vector(vector, tensor->order, tensor->size);
|
||||
<span style="color: #a020f0;">return</span> rc;
|
||||
}
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="outline-container-org6c86b38" class="outline-3">
|
||||
<h3 id="org6c86b38"><span class="section-number-3">1.7</span> Tests</h3>
|
||||
<div class="outline-text-3" id="text-1-7">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">{
|
||||
<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">m</span> = 3;
|
||||
<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">n</span> = 4;
|
||||
@ -1011,7 +1216,7 @@ Reshapes a tensor into a vector.
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">i</span>=0 ; i<m ; ++i)
|
||||
assert ( qmckl_mat(mat, i, j) == qmckl_vec(vec, i+j*m)) ;
|
||||
|
||||
<span style="color: #228b22;">qmckl_vector</span> <span style="color: #a0522d;">vec2</span> = qmckl_vector_of_matrix(mat, p);
|
||||
<span style="color: #228b22;">qmckl_vector</span> <span style="color: #a0522d;">vec2</span> = qmckl_vector_of_matrix(mat);
|
||||
assert (vec2.size == p);
|
||||
assert (vec2.data == vec.data);
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">i</span>=0 ; i<p ; ++i)
|
||||
@ -1025,12 +1230,12 @@ Reshapes a tensor into a vector.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-org8d07876" class="outline-2">
|
||||
<h2 id="org8d07876"><span class="section-number-2">2</span> Matrix operations</h2>
|
||||
<div id="outline-container-org935c037" class="outline-2">
|
||||
<h2 id="org935c037"><span class="section-number-2">2</span> Matrix operations</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
</div>
|
||||
<div id="outline-container-orgace99e2" class="outline-3">
|
||||
<h3 id="orgace99e2"><span class="section-number-3">2.1</span> <code>qmckl_dgemm</code></h3>
|
||||
<div id="outline-container-org968993c" class="outline-3">
|
||||
<h3 id="org968993c"><span class="section-number-3">2.1</span> <code>qmckl_dgemm</code></h3>
|
||||
<div class="outline-text-3" id="text-2-1">
|
||||
<p>
|
||||
Matrix multiplication:
|
||||
@ -1042,7 +1247,7 @@ Matrix multiplication:
|
||||
\]
|
||||
</p>
|
||||
|
||||
<table id="org79d431b" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org1c6d8c8" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1109,7 +1314,7 @@ Matrix multiplication:
|
||||
<td class="org-left"><code>alpha</code></td>
|
||||
<td class="org-left"><code>double</code></td>
|
||||
<td class="org-left">in</td>
|
||||
<td class="org-left">Number of columns of the input matrix</td>
|
||||
<td class="org-left">α</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
@ -1144,21 +1349,21 @@ Matrix multiplication:
|
||||
<td class="org-left"><code>beta</code></td>
|
||||
<td class="org-left"><code>double</code></td>
|
||||
<td class="org-left">in</td>
|
||||
<td class="org-left">Array containing the matrix \(B\)</td>
|
||||
<td class="org-left">β</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left"><code>C</code></td>
|
||||
<td class="org-left"><code>double[][ldc]</code></td>
|
||||
<td class="org-left">out</td>
|
||||
<td class="org-left">Array containing the matrix \(B\)</td>
|
||||
<td class="org-left">Array containing the matrix \(C\)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left"><code>ldc</code></td>
|
||||
<td class="org-left"><code>int64_t</code></td>
|
||||
<td class="org-left">in</td>
|
||||
<td class="org-left">Leading dimension of array <code>B</code></td>
|
||||
<td class="org-left">Leading dimension of array <code>C</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -1262,10 +1467,256 @@ Requirements:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org45d3387" class="outline-3">
|
||||
<h3 id="org45d3387"><span class="section-number-3">2.2</span> <code>qmckl_adjugate</code></h3>
|
||||
<div id="outline-container-orgde5460c" class="outline-3">
|
||||
<h3 id="orgde5460c"><span class="section-number-3">2.2</span> <code>qmckl_matmul</code></h3>
|
||||
<div class="outline-text-3" id="text-2-2">
|
||||
<p>
|
||||
Matrix multiplication:
|
||||
</p>
|
||||
|
||||
<p>
|
||||
\[
|
||||
C_{ij} = \beta C_{ij} + \alpha \sum_{k} A_{ik} \cdot B_{kj}
|
||||
\]
|
||||
</p>
|
||||
|
||||
<table id="org85c29ef" 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>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="org-left">Variable</th>
|
||||
<th scope="col" class="org-left">Type</th>
|
||||
<th scope="col" class="org-left">In/Out</th>
|
||||
<th scope="col" class="org-left">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="org-left"><code>context</code></td>
|
||||
<td class="org-left"><code>qmckl_context</code></td>
|
||||
<td class="org-left">in</td>
|
||||
<td class="org-left">Global state</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left"><code>TransA</code></td>
|
||||
<td class="org-left"><code>char</code></td>
|
||||
<td class="org-left">in</td>
|
||||
<td class="org-left">'T' is transposed</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left"><code>TransB</code></td>
|
||||
<td class="org-left"><code>char</code></td>
|
||||
<td class="org-left">in</td>
|
||||
<td class="org-left">'T' is transposed</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left"><code>alpha</code></td>
|
||||
<td class="org-left"><code>double</code></td>
|
||||
<td class="org-left">in</td>
|
||||
<td class="org-left">α</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left"><code>A</code></td>
|
||||
<td class="org-left"><code>qmckl_matrix</code></td>
|
||||
<td class="org-left">in</td>
|
||||
<td class="org-left">Matrix \(A\)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left"><code>B</code></td>
|
||||
<td class="org-left"><code>qmckl_matrix</code></td>
|
||||
<td class="org-left">in</td>
|
||||
<td class="org-left">Matrix \(B\)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left"><code>beta</code></td>
|
||||
<td class="org-left"><code>double</code></td>
|
||||
<td class="org-left">in</td>
|
||||
<td class="org-left">β</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left"><code>C</code></td>
|
||||
<td class="org-left"><code>qmckl_matrix</code></td>
|
||||
<td class="org-left">out</td>
|
||||
<td class="org-left">Matrix \(C\)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #0000ff;">qmckl_matmul</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;">char</span> <span style="color: #a0522d;">TransA</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">char</span> <span style="color: #a0522d;">TransB</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">double</span> <span style="color: #a0522d;">alpha</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">qmckl_matrix</span> <span style="color: #a0522d;">A</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">qmckl_matrix</span> <span style="color: #a0522d;">B</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">double</span> <span style="color: #a0522d;">beta</span>,
|
||||
<span style="color: #228b22;">qmckl_matrix</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">C</span> );
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span>
|
||||
<span style="color: #0000ff;">qmckl_matmul</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;">char</span> <span style="color: #a0522d;">TransA</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">char</span> <span style="color: #a0522d;">TransB</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">double</span> <span style="color: #a0522d;">alpha</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">qmckl_matrix</span> <span style="color: #a0522d;">A</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">qmckl_matrix</span> <span style="color: #a0522d;">B</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">double</span> <span style="color: #a0522d;">beta</span>,
|
||||
<span style="color: #228b22;">qmckl_matrix</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">C</span> )
|
||||
{
|
||||
<span style="color: #a020f0;">if</span> (qmckl_context_check(context) == QMCKL_NULL_CONTEXT) {
|
||||
<span style="color: #a020f0;">return</span> QMCKL_INVALID_CONTEXT;
|
||||
}
|
||||
|
||||
<span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #a0522d;">rc</span> = QMCKL_SUCCESS;
|
||||
|
||||
<span style="color: #a020f0;">if</span> (TransA != <span style="color: #8b2252;">'N'</span> && TransA != <span style="color: #8b2252;">'T'</span>) {
|
||||
<span style="color: #a020f0;">return</span> qmckl_failwith( context,
|
||||
QMCKL_INVALID_ARG_2,
|
||||
<span style="color: #8b2252;">"qmckl_matmul"</span>,
|
||||
<span style="color: #8b2252;">"TransA should be 'N' or 'T'"</span>);
|
||||
}
|
||||
|
||||
<span style="color: #a020f0;">if</span> (TransB != <span style="color: #8b2252;">'N'</span> && TransB != <span style="color: #8b2252;">'T'</span>) {
|
||||
<span style="color: #a020f0;">return</span> qmckl_failwith( context,
|
||||
QMCKL_INVALID_ARG_3,
|
||||
<span style="color: #8b2252;">"qmckl_matmul"</span>,
|
||||
<span style="color: #8b2252;">"TransB should be 'N' or 'T'"</span>);
|
||||
}
|
||||
|
||||
<span style="color: #a020f0;">if</span> (A.size[0] < 1) {
|
||||
<span style="color: #a020f0;">return</span> qmckl_failwith( context,
|
||||
QMCKL_INVALID_ARG_5,
|
||||
<span style="color: #8b2252;">"qmckl_matmul"</span>,
|
||||
<span style="color: #8b2252;">"Invalid size for A"</span>);
|
||||
}
|
||||
|
||||
<span style="color: #a020f0;">if</span> (B.size[0] < 1) {
|
||||
<span style="color: #a020f0;">return</span> qmckl_failwith( context,
|
||||
QMCKL_INVALID_ARG_6,
|
||||
<span style="color: #8b2252;">"qmckl_matmul"</span>,
|
||||
<span style="color: #8b2252;">"Invalid size for B"</span>);
|
||||
}
|
||||
|
||||
<span style="color: #a020f0;">if</span> (C == <span style="color: #008b8b;">NULL</span>) {
|
||||
<span style="color: #a020f0;">return</span> qmckl_failwith( context,
|
||||
QMCKL_INVALID_ARG_8,
|
||||
<span style="color: #8b2252;">"qmckl_matmul"</span>,
|
||||
<span style="color: #8b2252;">"Null pointer"</span>);
|
||||
}
|
||||
|
||||
<span style="color: #228b22;">int</span> <span style="color: #a0522d;">t</span> = 0;
|
||||
<span style="color: #a020f0;">if</span> (TransA == <span style="color: #8b2252;">'T'</span>) t +=1;
|
||||
<span style="color: #a020f0;">if</span> (TransB == <span style="color: #8b2252;">'T'</span>) t +=2;
|
||||
/*
|
||||
<span style="color: #b22222;"> | t | TransA | TransB |</span>
|
||||
<span style="color: #b22222;"> +---+--------+--------+</span>
|
||||
<span style="color: #b22222;"> | 0 | N | N |</span>
|
||||
<span style="color: #b22222;"> | 1 | T | N |</span>
|
||||
<span style="color: #b22222;"> | 2 | N | T |</span>
|
||||
<span style="color: #b22222;"> | 3 | T | T |</span>
|
||||
<span style="color: #b22222;"> </span>*/
|
||||
|
||||
<span style="color: #a020f0;">switch</span> (t) {
|
||||
<span style="color: #a020f0;">case</span> 0:
|
||||
<span style="color: #a020f0;">if</span> (A.size[1] != B.size[0]) {
|
||||
<span style="color: #a020f0;">return</span> qmckl_failwith( context,
|
||||
QMCKL_INVALID_ARG_2,
|
||||
<span style="color: #8b2252;">"qmckl_matmul"</span>,
|
||||
<span style="color: #8b2252;">"A and B have incompatible dimensions"</span>);
|
||||
}
|
||||
C->size[0] = A.size[0];
|
||||
C->size[1] = B.size[1];
|
||||
rc = qmckl_dgemm (context, <span style="color: #8b2252;">'N'</span>, <span style="color: #8b2252;">'N'</span>,
|
||||
C->size[0], C->size[1], A.size[1],
|
||||
alpha,
|
||||
A.data, A.size[0],
|
||||
B.data, B.size[0],
|
||||
beta,
|
||||
C->data, C->size[0]);
|
||||
<span style="color: #a020f0;">break</span>;
|
||||
<span style="color: #a020f0;">case</span> 1:
|
||||
<span style="color: #a020f0;">if</span> (A.size[0] != B.size[0]) {
|
||||
<span style="color: #a020f0;">return</span> qmckl_failwith( context,
|
||||
QMCKL_INVALID_ARG_2,
|
||||
<span style="color: #8b2252;">"qmckl_matmul"</span>,
|
||||
<span style="color: #8b2252;">"A and B have incompatible dimensions"</span>);
|
||||
}
|
||||
C->size[0] = A.size[1];
|
||||
C->size[1] = B.size[1];
|
||||
rc = qmckl_dgemm (context, <span style="color: #8b2252;">'T'</span>, <span style="color: #8b2252;">'N'</span>,
|
||||
C->size[0], C->size[1], A.size[0],
|
||||
alpha,
|
||||
A.data, A.size[0],
|
||||
B.data, B.size[0],
|
||||
beta,
|
||||
C->data, C->size[0]);
|
||||
<span style="color: #a020f0;">break</span>;
|
||||
<span style="color: #a020f0;">case</span> 2:
|
||||
<span style="color: #a020f0;">if</span> (A.size[1] != B.size[1]) {
|
||||
<span style="color: #a020f0;">return</span> qmckl_failwith( context,
|
||||
QMCKL_INVALID_ARG_2,
|
||||
<span style="color: #8b2252;">"qmckl_matmul"</span>,
|
||||
<span style="color: #8b2252;">"A and B have incompatible dimensions"</span>);
|
||||
}
|
||||
C->size[0] = A.size[0];
|
||||
C->size[1] = B.size[0];
|
||||
rc = qmckl_dgemm (context, <span style="color: #8b2252;">'N'</span>, <span style="color: #8b2252;">'T'</span>,
|
||||
C->size[0], C->size[1], A.size[1],
|
||||
alpha,
|
||||
A.data, A.size[0],
|
||||
B.data, B.size[0],
|
||||
beta,
|
||||
C->data, C->size[0]);
|
||||
<span style="color: #a020f0;">break</span>;
|
||||
<span style="color: #a020f0;">case</span> 3:
|
||||
<span style="color: #a020f0;">if</span> (A.size[0] != B.size[1]) {
|
||||
<span style="color: #a020f0;">return</span> qmckl_failwith( context,
|
||||
QMCKL_INVALID_ARG_2,
|
||||
<span style="color: #8b2252;">"qmckl_matmul"</span>,
|
||||
<span style="color: #8b2252;">"A and B have incompatible dimensions"</span>);
|
||||
}
|
||||
C->size[0] = A.size[1];
|
||||
C->size[1] = B.size[0];
|
||||
rc = qmckl_dgemm (context, <span style="color: #8b2252;">'T'</span>, <span style="color: #8b2252;">'T'</span>,
|
||||
C->size[0], C->size[1], A.size[0],
|
||||
alpha,
|
||||
A.data, A.size[0],
|
||||
B.data, B.size[0],
|
||||
beta,
|
||||
C->data, C->size[0]);
|
||||
<span style="color: #a020f0;">break</span>;
|
||||
}
|
||||
<span style="color: #a020f0;">return</span> rc;
|
||||
}
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org66dac88" class="outline-3">
|
||||
<h3 id="org66dac88"><span class="section-number-3">2.3</span> <code>qmckl_adjugate</code></h3>
|
||||
<div class="outline-text-3" id="text-2-3">
|
||||
<p>
|
||||
Given a matrix \(\mathbf{A}\), the adjugate matrix
|
||||
\(\text{adj}(\mathbf{A})\) is the transpose of the cofactors matrix
|
||||
of \(\mathbf{A}\).
|
||||
@ -1281,7 +1732,7 @@ of \(\mathbf{A}\).
|
||||
See also: <a href="https://en.wikipedia.org/wiki/Adjugate_matrix">https://en.wikipedia.org/wiki/Adjugate_matrix</a>
|
||||
</p>
|
||||
|
||||
<table id="org6c81574" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org5d3669c" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1533,11 +1984,144 @@ determinant with the inverse:
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org55226ef" class="outline-3">
|
||||
<h3 id="org55226ef"><span class="section-number-3">2.4</span> <code>qmckl_transpose</code></h3>
|
||||
<div class="outline-text-3" id="text-2-4">
|
||||
<p>
|
||||
Transposes a matrix: \(A^\dagger_{ji} = A_{ij}\).
|
||||
</p>
|
||||
|
||||
<table 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>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="org-left">Variable</th>
|
||||
<th scope="col" class="org-left">Type</th>
|
||||
<th scope="col" class="org-left">In/Out</th>
|
||||
<th scope="col" class="org-left">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="org-left">context</td>
|
||||
<td class="org-left">qmckl<sub>context</sub></td>
|
||||
<td class="org-left">in</td>
|
||||
<td class="org-left">Global state</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left">A</td>
|
||||
<td class="org-left">qmckl<sub>matrix</sub></td>
|
||||
<td class="org-left">in</td>
|
||||
<td class="org-left">Input matrix</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left">At</td>
|
||||
<td class="org-left">qmckl<sub>matrix</sub></td>
|
||||
<td class="org-left">out</td>
|
||||
<td class="org-left">Transposed matrix</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<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: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">qmckl_matrix</span> <span style="color: #a0522d;">A</span>,
|
||||
<span style="color: #228b22;">qmckl_matrix</span> <span style="color: #a0522d;">At</span> );
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
<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: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">qmckl_matrix</span> <span style="color: #a0522d;">A</span>,
|
||||
<span style="color: #228b22;">qmckl_matrix</span> <span style="color: #a0522d;">At</span> )
|
||||
{
|
||||
<span style="color: #a020f0;">if</span> (qmckl_context_check(context) == QMCKL_NULL_CONTEXT) {
|
||||
<span style="color: #a020f0;">return</span> QMCKL_INVALID_CONTEXT;
|
||||
}
|
||||
|
||||
<span style="color: #a020f0;">if</span> (A.size[0] < 1) {
|
||||
<span style="color: #a020f0;">return</span> qmckl_failwith( context,
|
||||
QMCKL_INVALID_ARG_2,
|
||||
<span style="color: #8b2252;">"qmckl_transpose"</span>,
|
||||
<span style="color: #8b2252;">"Invalid size for A"</span>);
|
||||
}
|
||||
|
||||
<span style="color: #a020f0;">if</span> (At.data == <span style="color: #008b8b;">NULL</span>) {
|
||||
<span style="color: #a020f0;">return</span> qmckl_failwith( context,
|
||||
QMCKL_INVALID_ARG_3,
|
||||
<span style="color: #8b2252;">"qmckl_transpose"</span>,
|
||||
<span style="color: #8b2252;">"Output matrix not allocated"</span>);
|
||||
}
|
||||
|
||||
<span style="color: #a020f0;">if</span> (At.size[0] != A.size[1] || At.size[1] != A.size[0]) {
|
||||
<span style="color: #a020f0;">return</span> qmckl_failwith( context,
|
||||
QMCKL_INVALID_ARG_3,
|
||||
<span style="color: #8b2252;">"qmckl_transpose"</span>,
|
||||
<span style="color: #8b2252;">"Invalid size for At"</span>);
|
||||
}
|
||||
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">j</span>=0 ; j<At.size[1] ; ++j)
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">i</span>=0 ; i<At.size[0] ; ++i)
|
||||
qmckl_mat(At, i, j) = qmckl_mat(A, j, i);
|
||||
|
||||
<span style="color: #a020f0;">return</span> QMCKL_SUCCESS;
|
||||
}
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf0e0240" class="outline-4">
|
||||
<h4 id="orgf0e0240"><span class="section-number-4">2.4.1</span> Test</h4>
|
||||
<div class="outline-text-4" id="text-2-4-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">{
|
||||
<span style="color: #228b22;">qmckl_matrix</span> <span style="color: #a0522d;">A</span>;
|
||||
<span style="color: #228b22;">qmckl_matrix</span> <span style="color: #a0522d;">At</span>;
|
||||
A = qmckl_matrix_alloc(context, 2, 3);
|
||||
At = qmckl_matrix_alloc(context, 3, 2);
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">int</span> <span style="color: #a0522d;">j</span>=0 ; j<3 ; ++j)
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">int</span> <span style="color: #a0522d;">i</span>=0 ; i<2 ; ++i)
|
||||
qmckl_mat(A, i, j) = (<span style="color: #228b22;">double</span>) 10*i+j;
|
||||
|
||||
<span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #a0522d;">rc</span> = qmckl_transpose(context, A, At);
|
||||
assert(rc == QMCKL_SUCCESS);
|
||||
|
||||
assert(A.size[0] == At.size[1]);
|
||||
assert(A.size[1] == At.size[0]);
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">int</span> <span style="color: #a0522d;">j</span>=0 ; j<3 ; ++j)
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">int</span> <span style="color: #a0522d;">i</span>=0 ; i<2 ; ++i)
|
||||
assert (qmckl_mat(A, i, j) == qmckl_mat(At, j, i));
|
||||
|
||||
qmckl_matrix_free(context, A);
|
||||
qmckl_matrix_free(context, At);
|
||||
}
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2022-01-21 Fri 07:53</p>
|
||||
<p class="date">Created: 2022-01-23 Sun 18:08</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>
|
||||
<!-- 2022-01-21 Fri 07:53 -->
|
||||
<!-- 2022-01-23 Sun 18:08 -->
|
||||
<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="#org23e5b0a">1. Context handling</a>
|
||||
<li><a href="#org0771d8f">1. Context handling</a>
|
||||
<ul>
|
||||
<li><a href="#orge47df12">1.1. Data structure</a></li>
|
||||
<li><a href="#org3733cea">1.2. Creation</a></li>
|
||||
<li><a href="#orgeb911c0">1.3. Locking</a></li>
|
||||
<li><a href="#org1c775e6">1.4. <span class="todo TODO">TODO</span> Copy</a></li>
|
||||
<li><a href="#orgcfea5ee">1.5. Destroy</a></li>
|
||||
<li><a href="#orge9cef51">1.1. Data structure</a></li>
|
||||
<li><a href="#orgcc9eb29">1.2. Creation</a></li>
|
||||
<li><a href="#orgbeeb27e">1.3. Locking</a></li>
|
||||
<li><a href="#orge6a6466">1.4. <span class="todo TODO">TODO</span> Copy</a></li>
|
||||
<li><a href="#org0dcfe47">1.5. Destroy</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org23e5b0a" class="outline-2">
|
||||
<h2 id="org23e5b0a"><span class="section-number-2">1</span> Context handling</h2>
|
||||
<div id="outline-container-org0771d8f" class="outline-2">
|
||||
<h2 id="org0771d8f"><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="org25939d6"><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="org692bee5"><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-orge47df12" class="outline-3">
|
||||
<h3 id="orge47df12"><span class="section-number-3">1.1</span> Data structure</h3>
|
||||
<div id="outline-container-orge9cef51" class="outline-3">
|
||||
<h3 id="orge9cef51"><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="#org3733cea">qmckl<sub>context</sub><sub>create</sub></a>, <a href="#orgcfea5ee">qmckl<sub>context</sub><sub>destroy</sub></a> and <a href="#org1c775e6">qmckl<sub>context</sub><sub>copy</sub></a>
|
||||
<a href="#orgcc9eb29">qmckl<sub>context</sub><sub>create</sub></a>, <a href="#org0dcfe47">qmckl<sub>context</sub><sub>destroy</sub></a> and <a href="#orge6a6466">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-org3733cea" class="outline-3">
|
||||
<h3 id="org3733cea"><span class="section-number-3">1.2</span> Creation</h3>
|
||||
<div id="outline-container-orgcc9eb29" class="outline-3">
|
||||
<h3 id="orgcc9eb29"><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.
|
||||
@ -511,8 +511,8 @@ To create a new context, <code>qmckl_context_create()</code> should be used.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-orgeb911c0" class="outline-3">
|
||||
<h3 id="orgeb911c0"><span class="section-number-3">1.3</span> Locking</h3>
|
||||
<div id="outline-container-orgbeeb27e" class="outline-3">
|
||||
<h3 id="orgbeeb27e"><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
|
||||
@ -557,8 +557,8 @@ number of times the thread has locked it is saved in the
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org1c775e6" class="outline-3">
|
||||
<h3 id="org1c775e6"><span class="section-number-3">1.4</span> <span class="todo TODO">TODO</span> Copy</h3>
|
||||
<div id="outline-container-orge6a6466" class="outline-3">
|
||||
<h3 id="orge6a6466"><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
|
||||
@ -606,8 +606,8 @@ number of times the thread has locked it is saved in the
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-orgcfea5ee" class="outline-3">
|
||||
<h3 id="orgcfea5ee"><span class="section-number-3">1.5</span> Destroy</h3>
|
||||
<div id="outline-container-org0dcfe47" class="outline-3">
|
||||
<h3 id="org0dcfe47"><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.
|
||||
@ -661,7 +661,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: 2022-01-21 Fri 07:53</p>
|
||||
<p class="date">Created: 2022-01-23 Sun 18:08</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>
|
||||
<!-- 2022-01-21 Fri 07:53 -->
|
||||
<!-- 2022-01-23 Sun 18:09 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Slater Determinant</title>
|
||||
@ -311,32 +311,32 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org59d5f6f">1. Context</a>
|
||||
<li><a href="#org629f274">1. Context</a>
|
||||
<ul>
|
||||
<li><a href="#org5ab8e55">1.1. Data structure</a></li>
|
||||
<li><a href="#org274e96b">1.2. Access functions</a></li>
|
||||
<li><a href="#org8d7a327">1.3. Initialization functions</a></li>
|
||||
<li><a href="#orgce5d2da">1.4. Fortran Interfaces</a></li>
|
||||
<li><a href="#orgb00084e">1.5. Test</a></li>
|
||||
<li><a href="#org9a6e18d">1.1. Data structure</a></li>
|
||||
<li><a href="#org7d1be2a">1.2. Access functions</a></li>
|
||||
<li><a href="#org5fd1037">1.3. Initialization functions</a></li>
|
||||
<li><a href="#org179a2e8">1.4. Fortran Interfaces</a></li>
|
||||
<li><a href="#org3755243">1.5. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org8f3a3cf">2. Computation</a>
|
||||
<li><a href="#orgb726176">2. Computation</a>
|
||||
<ul>
|
||||
<li><a href="#org4274b67">2.1. Determinant matrix</a>
|
||||
<li><a href="#orge8c979f">2.1. Determinant matrix</a>
|
||||
<ul>
|
||||
<li><a href="#org26486b1">2.1.1. Get</a></li>
|
||||
<li><a href="#org68154fa">2.1.2. Provide</a></li>
|
||||
<li><a href="#org990a17c">2.1.3. Compute alpha</a></li>
|
||||
<li><a href="#orgff3db9b">2.1.4. Compute beta</a></li>
|
||||
<li><a href="#orgf7bc82d">2.1.5. Test</a></li>
|
||||
<li><a href="#org16a26b5">2.1.1. Get</a></li>
|
||||
<li><a href="#orgfee5fe0">2.1.2. Provide</a></li>
|
||||
<li><a href="#orgdfe578a">2.1.3. Compute alpha</a></li>
|
||||
<li><a href="#org0e9b3e1">2.1.4. Compute beta</a></li>
|
||||
<li><a href="#org216dee1">2.1.5. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgc5cd4a2">2.2. Inverse of Determinant matrix</a>
|
||||
<li><a href="#org1d9ce87">2.2. Inverse of Determinant matrix</a>
|
||||
<ul>
|
||||
<li><a href="#org6df3a1d">2.2.1. Get</a></li>
|
||||
<li><a href="#org9018c8b">2.2.2. Provide</a></li>
|
||||
<li><a href="#orgaa3083b">2.2.3. Compute alpha</a></li>
|
||||
<li><a href="#org4a697a6">2.2.4. Compute beta</a></li>
|
||||
<li><a href="#orgd574d56">2.2.1. Get</a></li>
|
||||
<li><a href="#org27b65e6">2.2.2. Provide</a></li>
|
||||
<li><a href="#org65be39a">2.2.3. Compute alpha</a></li>
|
||||
<li><a href="#org1d7b1f9">2.2.4. Compute beta</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@ -345,8 +345,8 @@ for the JavaScript code in this tag.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org59d5f6f" class="outline-2">
|
||||
<h2 id="org59d5f6f"><span class="section-number-2">1</span> Context</h2>
|
||||
<div id="outline-container-org629f274" class="outline-2">
|
||||
<h2 id="org629f274"><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:
|
||||
@ -528,8 +528,8 @@ Computed data:
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org5ab8e55" class="outline-3">
|
||||
<h3 id="org5ab8e55"><span class="section-number-3">1.1</span> Data structure</h3>
|
||||
<div id="outline-container-org9a6e18d" class="outline-3">
|
||||
<h3 id="org9a6e18d"><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_determinant_struct</span> {
|
||||
@ -598,8 +598,8 @@ this mechanism.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org274e96b" class="outline-3">
|
||||
<h3 id="org274e96b"><span class="section-number-3">1.2</span> Access functions</h3>
|
||||
<div id="outline-container-org7d1be2a" class="outline-3">
|
||||
<h3 id="org7d1be2a"><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 slater determinants have been provided, the following
|
||||
@ -613,8 +613,8 @@ function returns <code>true</code>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org8d7a327" class="outline-3">
|
||||
<h3 id="org8d7a327"><span class="section-number-3">1.3</span> Initialization functions</h3>
|
||||
<div id="outline-container-org5fd1037" class="outline-3">
|
||||
<h3 id="org5fd1037"><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
|
||||
@ -638,24 +638,24 @@ computed to accelerate the calculations.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgce5d2da" class="outline-3">
|
||||
<h3 id="orgce5d2da"><span class="section-number-3">1.4</span> Fortran Interfaces</h3>
|
||||
<div id="outline-container-org179a2e8" class="outline-3">
|
||||
<h3 id="org179a2e8"><span class="section-number-3">1.4</span> Fortran Interfaces</h3>
|
||||
</div>
|
||||
<div id="outline-container-orgb00084e" class="outline-3">
|
||||
<h3 id="orgb00084e"><span class="section-number-3">1.5</span> Test</h3>
|
||||
<div id="outline-container-org3755243" class="outline-3">
|
||||
<h3 id="org3755243"><span class="section-number-3">1.5</span> Test</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-org8f3a3cf" class="outline-2">
|
||||
<h2 id="org8f3a3cf"><span class="section-number-2">2</span> Computation</h2>
|
||||
<div id="outline-container-orgb726176" class="outline-2">
|
||||
<h2 id="orgb726176"><span class="section-number-2">2</span> Computation</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
</div>
|
||||
<div id="outline-container-org4274b67" class="outline-3">
|
||||
<h3 id="org4274b67"><span class="section-number-3">2.1</span> Determinant matrix</h3>
|
||||
<div id="outline-container-orge8c979f" class="outline-3">
|
||||
<h3 id="orge8c979f"><span class="section-number-3">2.1</span> Determinant matrix</h3>
|
||||
<div class="outline-text-3" id="text-2-1">
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org26486b1" class="outline-4">
|
||||
<h4 id="org26486b1"><span class="section-number-4">2.1.1</span> Get</h4>
|
||||
<div id="outline-container-org16a26b5" class="outline-4">
|
||||
<h4 id="org16a26b5"><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_det_vgl_alpha</span>(<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #228b22;">double</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">det_vgl_alpha</span>);
|
||||
@ -665,14 +665,14 @@ computed to accelerate the calculations.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org68154fa" class="outline-4">
|
||||
<h4 id="org68154fa"><span class="section-number-4">2.1.2</span> Provide</h4>
|
||||
<div id="outline-container-orgfee5fe0" class="outline-4">
|
||||
<h4 id="orgfee5fe0"><span class="section-number-4">2.1.2</span> Provide</h4>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org990a17c" class="outline-4">
|
||||
<h4 id="org990a17c"><span class="section-number-4">2.1.3</span> Compute alpha</h4>
|
||||
<div id="outline-container-orgdfe578a" class="outline-4">
|
||||
<h4 id="orgdfe578a"><span class="section-number-4">2.1.3</span> Compute alpha</h4>
|
||||
<div class="outline-text-4" id="text-2-1-3">
|
||||
<table id="orgad2541b" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org2796c6c" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -846,10 +846,10 @@ computed to accelerate the calculations.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgff3db9b" class="outline-4">
|
||||
<h4 id="orgff3db9b"><span class="section-number-4">2.1.4</span> Compute beta</h4>
|
||||
<div id="outline-container-org0e9b3e1" class="outline-4">
|
||||
<h4 id="org0e9b3e1"><span class="section-number-4">2.1.4</span> Compute beta</h4>
|
||||
<div class="outline-text-4" id="text-2-1-4">
|
||||
<table id="org85cdf3a" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orgd28f163" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1023,18 +1023,18 @@ computed to accelerate the calculations.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf7bc82d" class="outline-4">
|
||||
<h4 id="orgf7bc82d"><span class="section-number-4">2.1.5</span> Test</h4>
|
||||
<div id="outline-container-org216dee1" class="outline-4">
|
||||
<h4 id="org216dee1"><span class="section-number-4">2.1.5</span> Test</h4>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgc5cd4a2" class="outline-3">
|
||||
<h3 id="orgc5cd4a2"><span class="section-number-3">2.2</span> Inverse of Determinant matrix</h3>
|
||||
<div id="outline-container-org1d9ce87" class="outline-3">
|
||||
<h3 id="org1d9ce87"><span class="section-number-3">2.2</span> Inverse of Determinant matrix</h3>
|
||||
<div class="outline-text-3" id="text-2-2">
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6df3a1d" class="outline-4">
|
||||
<h4 id="org6df3a1d"><span class="section-number-4">2.2.1</span> Get</h4>
|
||||
<div id="outline-container-orgd574d56" class="outline-4">
|
||||
<h4 id="orgd574d56"><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_det_inv_matrix_alpha</span>(<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #228b22;">double</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">det_inv_matrix_alpha</span>);
|
||||
@ -1048,14 +1048,14 @@ computed to accelerate the calculations.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org9018c8b" class="outline-4">
|
||||
<h4 id="org9018c8b"><span class="section-number-4">2.2.2</span> Provide</h4>
|
||||
<div id="outline-container-org27b65e6" class="outline-4">
|
||||
<h4 id="org27b65e6"><span class="section-number-4">2.2.2</span> Provide</h4>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgaa3083b" class="outline-4">
|
||||
<h4 id="orgaa3083b"><span class="section-number-4">2.2.3</span> Compute alpha</h4>
|
||||
<div id="outline-container-org65be39a" class="outline-4">
|
||||
<h4 id="org65be39a"><span class="section-number-4">2.2.3</span> Compute alpha</h4>
|
||||
<div class="outline-text-4" id="text-2-2-3">
|
||||
<table id="org040df86" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orga8a446a" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1217,10 +1217,10 @@ computed to accelerate the calculations.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org4a697a6" class="outline-4">
|
||||
<h4 id="org4a697a6"><span class="section-number-4">2.2.4</span> Compute beta</h4>
|
||||
<div id="outline-container-org1d7b1f9" class="outline-4">
|
||||
<h4 id="org1d7b1f9"><span class="section-number-4">2.2.4</span> Compute beta</h4>
|
||||
<div class="outline-text-4" id="text-2-2-4">
|
||||
<table id="org4dda464" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org2c17454" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1387,7 +1387,7 @@ computed to accelerate the calculations.
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2022-01-21 Fri 07:53</p>
|
||||
<p class="date">Created: 2022-01-23 Sun 18:09</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>
|
||||
<!-- 2022-01-21 Fri 07:53 -->
|
||||
<!-- 2022-01-23 Sun 18:09 -->
|
||||
<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,54 +333,54 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org3f251c8">1. Squared distance</a>
|
||||
<li><a href="#org1e2cb4b">1. Squared distance</a>
|
||||
<ul>
|
||||
<li><a href="#orgda4b88c">1.1. <code>qmckl_distance_sq</code></a>
|
||||
<li><a href="#orgb1fbf38">1.1. <code>qmckl_distance_sq</code></a>
|
||||
<ul>
|
||||
<li><a href="#orgd5b2018">1.1.1. Performance</a></li>
|
||||
<li><a href="#org7132e19">1.1.1. Performance</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org9be7d4b">2. Distance</a>
|
||||
<li><a href="#orga641edc">2. Distance</a>
|
||||
<ul>
|
||||
<li><a href="#org67d194d">2.1. <code>qmckl_distance</code></a>
|
||||
<li><a href="#orgea4ee1b">2.1. <code>qmckl_distance</code></a>
|
||||
<ul>
|
||||
<li><a href="#orgc1fdbb9">2.1.1. Requirements</a></li>
|
||||
<li><a href="#org4c6788f">2.1.2. C header</a></li>
|
||||
<li><a href="#orgbe75901">2.1.3. Source</a></li>
|
||||
<li><a href="#org9484c5c">2.1.4. Performance</a></li>
|
||||
<li><a href="#orgea1a28e">2.1.1. Requirements</a></li>
|
||||
<li><a href="#org3a3be61">2.1.2. C header</a></li>
|
||||
<li><a href="#org51caf2c">2.1.3. Source</a></li>
|
||||
<li><a href="#org5ea6450">2.1.4. Performance</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgf7e48d2">3. Rescaled Distance</a>
|
||||
<li><a href="#org85c54a2">3. Rescaled Distance</a>
|
||||
<ul>
|
||||
<li><a href="#orgae553c4">3.1. <code>qmckl_distance_rescaled</code></a>
|
||||
<li><a href="#org93ff710">3.1. <code>qmckl_distance_rescaled</code></a>
|
||||
<ul>
|
||||
<li><a href="#org1fdb4da">3.1.1. Requirements</a></li>
|
||||
<li><a href="#orgab9e96e">3.1.2. C header</a></li>
|
||||
<li><a href="#org610d8b8">3.1.3. Source</a></li>
|
||||
<li><a href="#org2d46d04">3.1.4. Performance</a></li>
|
||||
<li><a href="#orgd270f54">3.1.1. Requirements</a></li>
|
||||
<li><a href="#org04be735">3.1.2. C header</a></li>
|
||||
<li><a href="#org196ac86">3.1.3. Source</a></li>
|
||||
<li><a href="#org0de10f2">3.1.4. Performance</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org70c50ba">4. Rescaled Distance Derivatives</a>
|
||||
<li><a href="#org2692e5d">4. Rescaled Distance Derivatives</a>
|
||||
<ul>
|
||||
<li><a href="#org4842ffc">4.1. <code>qmckl_distance_rescaled_deriv_e</code></a></li>
|
||||
<li><a href="#org873b420">4.1. <code>qmckl_distance_rescaled_deriv_e</code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org3f251c8" class="outline-2">
|
||||
<h2 id="org3f251c8"><span class="section-number-2">1</span> Squared distance</h2>
|
||||
<div id="outline-container-org1e2cb4b" class="outline-2">
|
||||
<h2 id="org1e2cb4b"><span class="section-number-2">1</span> Squared distance</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
</div>
|
||||
<div id="outline-container-orgda4b88c" class="outline-3">
|
||||
<h3 id="orgda4b88c"><span class="section-number-3">1.1</span> <code>qmckl_distance_sq</code></h3>
|
||||
<div id="outline-container-orgb1fbf38" class="outline-3">
|
||||
<h3 id="orgb1fbf38"><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
|
||||
@ -393,7 +393,7 @@ between all pairs of points in two sets, one point within each set:
|
||||
\]
|
||||
</p>
|
||||
|
||||
<table id="orge6bb2e1" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org82a08c9" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -659,8 +659,8 @@ Requirements:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd5b2018" class="outline-4">
|
||||
<h4 id="orgd5b2018"><span class="section-number-4">1.1.1</span> Performance</h4>
|
||||
<div id="outline-container-org7132e19" class="outline-4">
|
||||
<h4 id="org7132e19"><span class="section-number-4">1.1.1</span> Performance</h4>
|
||||
<div class="outline-text-4" id="text-1-1-1">
|
||||
<p>
|
||||
This function is more efficient when <code>A</code> and <code>B</code> are
|
||||
@ -670,12 +670,12 @@ transposed.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-org9be7d4b" class="outline-2">
|
||||
<h2 id="org9be7d4b"><span class="section-number-2">2</span> Distance</h2>
|
||||
<div id="outline-container-orga641edc" class="outline-2">
|
||||
<h2 id="orga641edc"><span class="section-number-2">2</span> Distance</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
</div>
|
||||
<div id="outline-container-org67d194d" class="outline-3">
|
||||
<h3 id="org67d194d"><span class="section-number-3">2.1</span> <code>qmckl_distance</code></h3>
|
||||
<div id="outline-container-orgea4ee1b" class="outline-3">
|
||||
<h3 id="orgea4ee1b"><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
|
||||
@ -693,7 +693,7 @@ 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="orgf1b37ea" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orgde2cf9c" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -794,8 +794,8 @@ the leading dimension: <code>[n][3]</code> in C and <code>(3,n)</code> in Fortra
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgc1fdbb9" class="outline-4">
|
||||
<h4 id="orgc1fdbb9"><span class="section-number-4">2.1.1</span> Requirements</h4>
|
||||
<div id="outline-container-orgea1a28e" class="outline-4">
|
||||
<h4 id="orgea1a28e"><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>
|
||||
@ -813,8 +813,8 @@ the leading dimension: <code>[n][3]</code> in C and <code>(3,n)</code> in Fortra
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org4c6788f" class="outline-4">
|
||||
<h4 id="org4c6788f"><span class="section-number-4">2.1.2</span> C header</h4>
|
||||
<div id="outline-container-org3a3be61" class="outline-4">
|
||||
<h4 id="org3a3be61"><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> (
|
||||
@ -834,8 +834,8 @@ the leading dimension: <code>[n][3]</code> in C and <code>(3,n)</code> in Fortra
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgbe75901" class="outline-4">
|
||||
<h4 id="orgbe75901"><span class="section-number-4">2.1.3</span> Source</h4>
|
||||
<div id="outline-container-org51caf2c" class="outline-4">
|
||||
<h4 id="org51caf2c"><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>
|
||||
@ -1002,8 +1002,8 @@ the leading dimension: <code>[n][3]</code> in C and <code>(3,n)</code> in Fortra
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org9484c5c" class="outline-4">
|
||||
<h4 id="org9484c5c"><span class="section-number-4">2.1.4</span> Performance</h4>
|
||||
<div id="outline-container-org5ea6450" class="outline-4">
|
||||
<h4 id="org5ea6450"><span class="section-number-4">2.1.4</span> Performance</h4>
|
||||
<div class="outline-text-4" id="text-2-1-4">
|
||||
<p>
|
||||
This function is more efficient when <code>A</code> and <code>B</code> are transposed.
|
||||
@ -1013,12 +1013,12 @@ This function is more efficient when <code>A</code> and <code>B</code> are trans
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf7e48d2" class="outline-2">
|
||||
<h2 id="orgf7e48d2"><span class="section-number-2">3</span> Rescaled Distance</h2>
|
||||
<div id="outline-container-org85c54a2" class="outline-2">
|
||||
<h2 id="org85c54a2"><span class="section-number-2">3</span> Rescaled Distance</h2>
|
||||
<div class="outline-text-2" id="text-3">
|
||||
</div>
|
||||
<div id="outline-container-orgae553c4" class="outline-3">
|
||||
<h3 id="orgae553c4"><span class="section-number-3">3.1</span> <code>qmckl_distance_rescaled</code></h3>
|
||||
<div id="outline-container-org93ff710" class="outline-3">
|
||||
<h3 id="org93ff710"><span class="section-number-3">3.1</span> <code>qmckl_distance_rescaled</code></h3>
|
||||
<div class="outline-text-3" id="text-3-1">
|
||||
<p>
|
||||
<code>qmckl_distance_rescaled</code> computes the matrix of the rescaled distances between all
|
||||
@ -1036,7 +1036,7 @@ 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="org074f661" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org8167cde" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1144,8 +1144,8 @@ the leading dimension: <code>[n][3]</code> in C and <code>(3,n)</code> in Fortra
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org1fdb4da" class="outline-4">
|
||||
<h4 id="org1fdb4da"><span class="section-number-4">3.1.1</span> Requirements</h4>
|
||||
<div id="outline-container-orgd270f54" class="outline-4">
|
||||
<h4 id="orgd270f54"><span class="section-number-4">3.1.1</span> Requirements</h4>
|
||||
<div class="outline-text-4" id="text-3-1-1">
|
||||
<ul class="org-ul">
|
||||
<li><code>context</code> is not <code>QMCKL_NULL_CONTEXT</code></li>
|
||||
@ -1163,8 +1163,8 @@ the leading dimension: <code>[n][3]</code> in C and <code>(3,n)</code> in Fortra
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgab9e96e" class="outline-4">
|
||||
<h4 id="orgab9e96e"><span class="section-number-4">3.1.2</span> C header</h4>
|
||||
<div id="outline-container-org04be735" class="outline-4">
|
||||
<h4 id="org04be735"><span class="section-number-4">3.1.2</span> C header</h4>
|
||||
<div class="outline-text-4" id="text-3-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_rescaled</span> (
|
||||
@ -1185,8 +1185,8 @@ the leading dimension: <code>[n][3]</code> in C and <code>(3,n)</code> in Fortra
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org610d8b8" class="outline-4">
|
||||
<h4 id="org610d8b8"><span class="section-number-4">3.1.3</span> Source</h4>
|
||||
<div id="outline-container-org196ac86" class="outline-4">
|
||||
<h4 id="org196ac86"><span class="section-number-4">3.1.3</span> Source</h4>
|
||||
<div class="outline-text-4" id="text-3-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_rescaled_f(context, transa, transb, m, n, </span><span style="color: #a020f0;">&</span>
|
||||
@ -1356,8 +1356,8 @@ the leading dimension: <code>[n][3]</code> in C and <code>(3,n)</code> in Fortra
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org2d46d04" class="outline-4">
|
||||
<h4 id="org2d46d04"><span class="section-number-4">3.1.4</span> Performance</h4>
|
||||
<div id="outline-container-org0de10f2" class="outline-4">
|
||||
<h4 id="org0de10f2"><span class="section-number-4">3.1.4</span> Performance</h4>
|
||||
<div class="outline-text-4" id="text-3-1-4">
|
||||
<p>
|
||||
This function is more efficient when <code>A</code> and <code>B</code> are transposed.
|
||||
@ -1366,12 +1366,12 @@ This function is more efficient when <code>A</code> and <code>B</code> are trans
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-org70c50ba" class="outline-2">
|
||||
<h2 id="org70c50ba"><span class="section-number-2">4</span> Rescaled Distance Derivatives</h2>
|
||||
<div id="outline-container-org2692e5d" class="outline-2">
|
||||
<h2 id="org2692e5d"><span class="section-number-2">4</span> Rescaled Distance Derivatives</h2>
|
||||
<div class="outline-text-2" id="text-4">
|
||||
</div>
|
||||
<div id="outline-container-org4842ffc" class="outline-3">
|
||||
<h3 id="org4842ffc"><span class="section-number-3">4.1</span> <code>qmckl_distance_rescaled_deriv_e</code></h3>
|
||||
<div id="outline-container-org873b420" class="outline-3">
|
||||
<h3 id="org873b420"><span class="section-number-3">4.1</span> <code>qmckl_distance_rescaled_deriv_e</code></h3>
|
||||
<div class="outline-text-3" id="text-4-1">
|
||||
<p>
|
||||
<code>qmckl_distance_rescaled_deriv_e</code> computes the matrix of the gradient and laplacian of the
|
||||
@ -1438,7 +1438,7 @@ 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="orgce45390" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orgead6390" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1776,7 +1776,7 @@ This function is more efficient when <code>A</code> and <code>B</code> are trans
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2022-01-21 Fri 07:53</p>
|
||||
<p class="date">Created: 2022-01-23 Sun 18:09</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>
|
||||
<!-- 2022-01-21 Fri 07:53 -->
|
||||
<!-- 2022-01-23 Sun 18:08 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Electrons</title>
|
||||
@ -333,88 +333,88 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org010367b">1. Context</a>
|
||||
<li><a href="#org015ce43">1. Context</a>
|
||||
<ul>
|
||||
<li><a href="#org2bc3fd8">1.1. Data structure</a></li>
|
||||
<li><a href="#org6720aad">1.2. Access functions</a>
|
||||
<li><a href="#org375a22a">1.1. Data structure</a></li>
|
||||
<li><a href="#org7d675b8">1.2. Access functions</a>
|
||||
<ul>
|
||||
<li><a href="#orga585cda">1.2.1. Number of electrons</a></li>
|
||||
<li><a href="#orgb065781">1.2.2. Number of walkers</a></li>
|
||||
<li><a href="#orgf667804">1.2.3. Scaling factors Kappa</a></li>
|
||||
<li><a href="#orgd04584b">1.2.4. Electron coordinates</a></li>
|
||||
<li><a href="#orgc5144cb">1.2.1. Number of electrons</a></li>
|
||||
<li><a href="#org2c8df9a">1.2.2. Number of walkers</a></li>
|
||||
<li><a href="#org00537cb">1.2.3. Scaling factors Kappa</a></li>
|
||||
<li><a href="#org30cec01">1.2.4. Electron coordinates</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org7b020c2">1.3. Initialization functions</a></li>
|
||||
<li><a href="#orgacd0885">1.4. Test</a></li>
|
||||
<li><a href="#org816ee2b">1.3. Initialization functions</a></li>
|
||||
<li><a href="#org62d8ee6">1.4. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgdf9ccef">2. Computation</a>
|
||||
<li><a href="#org9e1d1c9">2. Computation</a>
|
||||
<ul>
|
||||
<li><a href="#orga824568">2.1. Electron-electron distances</a>
|
||||
<li><a href="#org4424c4d">2.1. Electron-electron distances</a>
|
||||
<ul>
|
||||
<li><a href="#orgb5a07ba">2.1.1. Get</a></li>
|
||||
<li><a href="#orgd99b401">2.1.2. Compute</a></li>
|
||||
<li><a href="#org9efb2a4">2.1.3. Test</a></li>
|
||||
<li><a href="#org9adbdf8">2.1.1. Get</a></li>
|
||||
<li><a href="#org11d1f93">2.1.2. Compute</a></li>
|
||||
<li><a href="#org4febe42">2.1.3. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org8867758">2.2. Electron-electron rescaled distances</a>
|
||||
<li><a href="#org97a7f11">2.2. Electron-electron rescaled distances</a>
|
||||
<ul>
|
||||
<li><a href="#orga6d8435">2.2.1. Get</a></li>
|
||||
<li><a href="#orgb1e9c3b">2.2.2. Compute</a></li>
|
||||
<li><a href="#org699c161">2.2.3. Test</a></li>
|
||||
<li><a href="#org0f6f899">2.2.1. Get</a></li>
|
||||
<li><a href="#org1e6263f">2.2.2. Compute</a></li>
|
||||
<li><a href="#org9d2638f">2.2.3. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org9d48d14">2.3. Electron-electron rescaled distance gradients and laplacian with respect to electron coords</a>
|
||||
<li><a href="#org16fc7e4">2.3. Electron-electron rescaled distance gradients and laplacian with respect to electron coords</a>
|
||||
<ul>
|
||||
<li><a href="#orgacec971">2.3.1. Get</a></li>
|
||||
<li><a href="#orgba32e3a">2.3.2. Compute</a></li>
|
||||
<li><a href="#org2304b2e">2.3.3. Test</a></li>
|
||||
<li><a href="#org0507432">2.3.1. Get</a></li>
|
||||
<li><a href="#org26626f9">2.3.2. Compute</a></li>
|
||||
<li><a href="#orgfce2977">2.3.3. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgeeeb06b">2.4. Electron-electron potential</a>
|
||||
<li><a href="#org07097cc">2.4. Electron-electron potential</a>
|
||||
<ul>
|
||||
<li><a href="#org4d4ede9">2.4.1. Get</a></li>
|
||||
<li><a href="#org3cb21c6">2.4.2. Compute</a></li>
|
||||
<li><a href="#org9e5c725">2.4.3. Test</a></li>
|
||||
<li><a href="#org01ce7a9">2.4.1. Get</a></li>
|
||||
<li><a href="#org20c07c1">2.4.2. Compute</a></li>
|
||||
<li><a href="#org400c841">2.4.3. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org978a219">2.5. Electron-nucleus distances</a>
|
||||
<li><a href="#org9d34def">2.5. Electron-nucleus distances</a>
|
||||
<ul>
|
||||
<li><a href="#org8aef480">2.5.1. Get</a></li>
|
||||
<li><a href="#org16f81ee">2.5.2. Compute</a></li>
|
||||
<li><a href="#org882c57a">2.5.3. Test</a></li>
|
||||
<li><a href="#org0db349f">2.5.1. Get</a></li>
|
||||
<li><a href="#org4e8c31d">2.5.2. Compute</a></li>
|
||||
<li><a href="#orgc5b19ba">2.5.3. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org38e01fa">2.6. Electron-nucleus rescaled distances</a>
|
||||
<li><a href="#orge4aee41">2.6. Electron-nucleus rescaled distances</a>
|
||||
<ul>
|
||||
<li><a href="#orgb932e99">2.6.1. Get</a></li>
|
||||
<li><a href="#org9204ec4">2.6.2. Compute</a></li>
|
||||
<li><a href="#org051cd83">2.6.3. Test</a></li>
|
||||
<li><a href="#org2893b6f">2.6.1. Get</a></li>
|
||||
<li><a href="#org547a1cd">2.6.2. Compute</a></li>
|
||||
<li><a href="#orgf22286e">2.6.3. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org98f5c0b">2.7. Electron-nucleus rescaled distance gradients and laplacian with respect to electron coords</a>
|
||||
<li><a href="#org92b5486">2.7. Electron-nucleus rescaled distance gradients and laplacian with respect to electron coords</a>
|
||||
<ul>
|
||||
<li><a href="#org551aeb9">2.7.1. Get</a></li>
|
||||
<li><a href="#orge8b4063">2.7.2. Compute</a></li>
|
||||
<li><a href="#org63b05e8">2.7.3. Test</a></li>
|
||||
<li><a href="#orgacdf4a3">2.7.1. Get</a></li>
|
||||
<li><a href="#org5366020">2.7.2. Compute</a></li>
|
||||
<li><a href="#org4251448">2.7.3. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgc28266a">2.8. Electron-nucleus potential</a>
|
||||
<li><a href="#orgc757cd5">2.8. Electron-nucleus potential</a>
|
||||
<ul>
|
||||
<li><a href="#orgf731341">2.8.1. Get</a></li>
|
||||
<li><a href="#orgdcc5f13">2.8.2. Compute</a></li>
|
||||
<li><a href="#org3964156">2.8.3. Test</a></li>
|
||||
<li><a href="#orgb98e42d">2.8.1. Get</a></li>
|
||||
<li><a href="#org76ed19c">2.8.2. Compute</a></li>
|
||||
<li><a href="#org81e0a93">2.8.3. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org24d5d54">2.9. Generate initial coordinates</a></li>
|
||||
<li><a href="#orge8a8fb0">2.9. Generate initial coordinates</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org010367b" class="outline-2">
|
||||
<h2 id="org010367b"><span class="section-number-2">1</span> Context</h2>
|
||||
<div id="outline-container-org015ce43" class="outline-2">
|
||||
<h2 id="org015ce43"><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:
|
||||
@ -488,13 +488,13 @@ The following data stored in the context:
|
||||
|
||||
<tr>
|
||||
<td class="org-left"><code>coord_new</code></td>
|
||||
<td class="org-left"><code>double[walk_num][3][num]</code></td>
|
||||
<td class="org-left"><code>double[3][walk_num][num]</code></td>
|
||||
<td class="org-left">New set of electron coordinates</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left"><code>coord_old</code></td>
|
||||
<td class="org-left"><code>double[walk_num][3][num]</code></td>
|
||||
<td class="org-left"><code>double[3][walk_num][num]</code></td>
|
||||
<td class="org-left">Old set of electron coordinates</td>
|
||||
</tr>
|
||||
|
||||
@ -627,8 +627,8 @@ Computed data:
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org2bc3fd8" class="outline-3">
|
||||
<h3 id="org2bc3fd8"><span class="section-number-3">1.1</span> Data structure</h3>
|
||||
<div id="outline-container-org375a22a" class="outline-3">
|
||||
<h3 id="org375a22a"><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> {
|
||||
@ -707,8 +707,8 @@ this mechanism.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6720aad" class="outline-3">
|
||||
<h3 id="org6720aad"><span class="section-number-3">1.2</span> Access functions</h3>
|
||||
<div id="outline-container-org7d675b8" class="outline-3">
|
||||
<h3 id="org7d675b8"><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
|
||||
@ -720,12 +720,12 @@ contains the requested data. Otherwise, this variable is untouched.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orga585cda" class="outline-4">
|
||||
<h4 id="orga585cda"><span class="section-number-4">1.2.1</span> Number of electrons</h4>
|
||||
<div id="outline-container-orgc5144cb" class="outline-4">
|
||||
<h4 id="orgc5144cb"><span class="section-number-4">1.2.1</span> Number of electrons</h4>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgb065781" class="outline-4">
|
||||
<h4 id="orgb065781"><span class="section-number-4">1.2.2</span> Number of walkers</h4>
|
||||
<div id="outline-container-org2c8df9a" class="outline-4">
|
||||
<h4 id="org2c8df9a"><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
|
||||
@ -734,12 +734,12 @@ the wave function. <code>walk_num</code> is the number of walkers.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf667804" class="outline-4">
|
||||
<h4 id="orgf667804"><span class="section-number-4">1.2.3</span> Scaling factors Kappa</h4>
|
||||
<div id="outline-container-org00537cb" class="outline-4">
|
||||
<h4 id="org00537cb"><span class="section-number-4">1.2.3</span> Scaling factors Kappa</h4>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd04584b" class="outline-4">
|
||||
<h4 id="orgd04584b"><span class="section-number-4">1.2.4</span> Electron coordinates</h4>
|
||||
<div id="outline-container-org30cec01" class="outline-4">
|
||||
<h4 id="org30cec01"><span class="section-number-4">1.2.4</span> Electron coordinates</h4>
|
||||
<div class="outline-text-4" id="text-1-2-4">
|
||||
<p>
|
||||
Returns the current electron coordinates. The pointer is assumed
|
||||
@ -767,14 +767,14 @@ The order of the indices is:
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="org-left">C</td>
|
||||
<td class="org-left"><code>[walk_num][elec_num][3]</code></td>
|
||||
<td class="org-left"><code>[walk_num][3][elec_num]</code></td>
|
||||
<td class="org-left"><code>[walk_num*elec_num][3]</code></td>
|
||||
<td class="org-left"><code>[3][walk_num*elec_num]</code></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left">Fortran</td>
|
||||
<td class="org-left"><code>(3,elec_num,walk_num)</code></td>
|
||||
<td class="org-left"><code>(elec_num,3,walk_num)</code></td>
|
||||
<td class="org-left"><code>(3,walk_num*elec_num)</code></td>
|
||||
<td class="org-left"><code>(walk_num*elec_num, 3)</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -783,8 +783,8 @@ The order of the indices is:
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org7b020c2" class="outline-3">
|
||||
<h3 id="org7b020c2"><span class="section-number-3">1.3</span> Initialization functions</h3>
|
||||
<div id="outline-container-org816ee2b" class="outline-3">
|
||||
<h3 id="org816ee2b"><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
|
||||
@ -828,6 +828,7 @@ Next we set the rescale parameter for the rescaled distance metric.
|
||||
<span style="color: #228b22;">integer</span> (<span style="color: #008b8b;">c_int64_t</span>) , <span style="color: #a020f0;">intent</span>(in) , <span style="color: #a020f0;">value</span> ::<span style="color: #a0522d;"> beta </span>
|
||||
<span style="color: #a020f0;">end function</span>
|
||||
<span style="color: #a020f0;">end interface</span>
|
||||
|
||||
<span style="color: #a020f0;">interface</span>
|
||||
<span style="color: #228b22;">integer</span>(<span style="color: #008b8b;">c_int32_t</span>) <span style="color: #a020f0;">function</span> <span style="color: #0000ff;">qmckl_set_electron_walk_num</span>(context, walk_num) <span style="color: #a020f0;">bind</span>(C)
|
||||
<span style="color: #a020f0;">use</span>, <span style="color: #a020f0;">intrinsic</span> :: <span style="color: #0000ff;">iso_c_binding</span>
|
||||
@ -872,8 +873,8 @@ in the context.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgacd0885" class="outline-3">
|
||||
<h3 id="orgacd0885"><span class="section-number-3">1.4</span> Test</h3>
|
||||
<div id="outline-container-org62d8ee6" class="outline-3">
|
||||
<h3 id="org62d8ee6"><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>*/
|
||||
@ -967,9 +968,9 @@ rc = qmckl_set_electron_coord (context, <span style="color: #8b2252;">'N'</span>
|
||||
|
||||
<span style="color: #228b22;">double</span> <span style="color: #a0522d;">elec_coord2</span>[walk_num*3*elec_num];
|
||||
|
||||
rc = qmckl_get_electron_coord (context, <span style="color: #8b2252;">'N'</span>, elec_coord2);
|
||||
rc = qmckl_get_electron_coord (context, <span style="color: #8b2252;">'N'</span>, elec_coord2, walk_num*3*elec_num);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_SUCCESS);
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">i</span>=0 ; i<3*elec_num ; ++i) {
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">i</span>=0 ; i<3*elec_num*walk_num ; ++i) {
|
||||
assert( elec_coord[i] == elec_coord2[i] );
|
||||
}
|
||||
|
||||
@ -979,8 +980,8 @@ rc = qmckl_get_electron_coord (context, <span style="color: #8b2252;">'N'</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgdf9ccef" class="outline-2">
|
||||
<h2 id="orgdf9ccef"><span class="section-number-2">2</span> Computation</h2>
|
||||
<div id="outline-container-org9e1d1c9" class="outline-2">
|
||||
<h2 id="org9e1d1c9"><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
|
||||
@ -993,12 +994,12 @@ current date is stored.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orga824568" class="outline-3">
|
||||
<h3 id="orga824568"><span class="section-number-3">2.1</span> Electron-electron distances</h3>
|
||||
<div id="outline-container-org4424c4d" class="outline-3">
|
||||
<h3 id="org4424c4d"><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-orgb5a07ba" class="outline-4">
|
||||
<h4 id="orgb5a07ba"><span class="section-number-4">2.1.1</span> Get</h4>
|
||||
<div id="outline-container-org9adbdf8" class="outline-4">
|
||||
<h4 id="org9adbdf8"><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: #a020f0;">const</span> <span style="color: #a0522d;">distance</span>);
|
||||
@ -1007,10 +1008,10 @@ current date is stored.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd99b401" class="outline-4">
|
||||
<h4 id="orgd99b401"><span class="section-number-4">2.1.2</span> Compute</h4>
|
||||
<div id="outline-container-org11d1f93" class="outline-4">
|
||||
<h4 id="org11d1f93"><span class="section-number-4">2.1.2</span> Compute</h4>
|
||||
<div class="outline-text-4" id="text-2-1-2">
|
||||
<table id="orgae38e4b" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orgbf9c0b6" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1054,7 +1055,7 @@ current date is stored.
|
||||
|
||||
<tr>
|
||||
<td class="org-left"><code>coord</code></td>
|
||||
<td class="org-left"><code>double[walk_num][3][elec_num]</code></td>
|
||||
<td class="org-left"><code>double[3][walk_num][elec_num]</code></td>
|
||||
<td class="org-left">in</td>
|
||||
<td class="org-left">Electron coordinates</td>
|
||||
</tr>
|
||||
@ -1076,10 +1077,11 @@ current date is stored.
|
||||
<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;"> elec_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;"> 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;"> coord(elec_num,walk_num,3)</span>
|
||||
<span style="color: #228b22;">double precision</span> , <span style="color: #a020f0;">intent</span>(out) ::<span style="color: #a0522d;"> ee_distance(elec_num,elec_num,walk_num)</span>
|
||||
|
||||
<span style="color: #228b22;">integer</span>*8 ::<span style="color: #a0522d;"> k</span>
|
||||
<span style="color: #228b22;">integer</span>*8 ::<span style="color: #a0522d;"> k, i, j</span>
|
||||
<span style="color: #228b22;">double precision</span> ::<span style="color: #a0522d;"> x, y, z</span>
|
||||
|
||||
info = QMCKL_SUCCESS
|
||||
|
||||
@ -1100,8 +1102,8 @@ current date is stored.
|
||||
|
||||
<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>
|
||||
coord(1,k,1), elec_num * walk_num, <span style="color: #a020f0;">&</span>
|
||||
coord(1,k,1), elec_num * walk_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>
|
||||
@ -1114,8 +1116,8 @@ current date is stored.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org9efb2a4" class="outline-4">
|
||||
<h4 id="org9efb2a4"><span class="section-number-4">2.1.3</span> Test</h4>
|
||||
<div id="outline-container-org4febe42" class="outline-4">
|
||||
<h4 id="org4febe42"><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: #0000ff;">assert</span>(<span style="color: #228b22;">qmckl_electron_provided</span>(<span style="color: #a0522d;">context</span>));
|
||||
@ -1149,8 +1151,8 @@ rc = qmckl_get_electron_ee_distance(context, ee_distance);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org8867758" class="outline-3">
|
||||
<h3 id="org8867758"><span class="section-number-3">2.2</span> Electron-electron rescaled distances</h3>
|
||||
<div id="outline-container-org97a7f11" class="outline-3">
|
||||
<h3 id="org97a7f11"><span class="section-number-3">2.2</span> Electron-electron rescaled distances</h3>
|
||||
<div class="outline-text-3" id="text-2-2">
|
||||
<p>
|
||||
<code>ee_distance_rescaled</code> stores the matrix of the rescaled distances between all
|
||||
@ -1168,8 +1170,8 @@ where \(C_{ij}\) is the matrix of electron-electron distances.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orga6d8435" class="outline-4">
|
||||
<h4 id="orga6d8435"><span class="section-number-4">2.2.1</span> Get</h4>
|
||||
<div id="outline-container-org0f6f899" class="outline-4">
|
||||
<h4 id="org0f6f899"><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_ee_distance_rescaled</span>(<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #228b22;">double</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">distance_rescaled</span>);
|
||||
@ -1178,10 +1180,10 @@ where \(C_{ij}\) is the matrix of electron-electron distances.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgb1e9c3b" class="outline-4">
|
||||
<h4 id="orgb1e9c3b"><span class="section-number-4">2.2.2</span> Compute</h4>
|
||||
<div id="outline-container-org1e6263f" class="outline-4">
|
||||
<h4 id="org1e6263f"><span class="section-number-4">2.2.2</span> Compute</h4>
|
||||
<div class="outline-text-4" id="text-2-2-2">
|
||||
<table id="org512523a" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org862ec27" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1280,8 +1282,8 @@ where \(C_{ij}\) is the matrix of electron-electron distances.
|
||||
|
||||
<span style="color: #a020f0;">do</span> k=1,walk_num
|
||||
info = qmckl_distance_rescaled(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>
|
||||
coord(1,k,1), elec_num * walk_num, <span style="color: #a020f0;">&</span>
|
||||
coord(1,k,1), elec_num * walk_num, <span style="color: #a020f0;">&</span>
|
||||
ee_distance_rescaled(1,1,k), elec_num, rescale_factor_kappa_ee)
|
||||
<span style="color: #a020f0;">if</span> (info /= QMCKL_SUCCESS) <span style="color: #a020f0;">then</span>
|
||||
<span style="color: #a020f0;">exit</span>
|
||||
@ -1294,8 +1296,8 @@ where \(C_{ij}\) is the matrix of electron-electron distances.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org699c161" class="outline-4">
|
||||
<h4 id="org699c161"><span class="section-number-4">2.2.3</span> Test</h4>
|
||||
<div id="outline-container-org9d2638f" class="outline-4">
|
||||
<h4 id="org9d2638f"><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: #0000ff;">assert</span>(<span style="color: #228b22;">qmckl_electron_provided</span>(<span style="color: #a0522d;">context</span>));
|
||||
@ -1329,8 +1331,8 @@ rc = qmckl_get_electron_ee_distance_rescaled(context, ee_distance_rescaled);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org9d48d14" class="outline-3">
|
||||
<h3 id="org9d48d14"><span class="section-number-3">2.3</span> Electron-electron rescaled distance gradients and laplacian with respect to electron coords</h3>
|
||||
<div id="outline-container-org16fc7e4" class="outline-3">
|
||||
<h3 id="org16fc7e4"><span class="section-number-3">2.3</span> Electron-electron rescaled distance gradients and laplacian with respect to electron coords</h3>
|
||||
<div class="outline-text-3" id="text-2-3">
|
||||
<p>
|
||||
The rescaled distances which is given as \(R = (1 - \exp{-\kappa r})/\kappa\)
|
||||
@ -1342,8 +1344,8 @@ gives the Laplacian \(\partial x^2 + \partial y^2 + \partial z^2\).
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgacec971" class="outline-4">
|
||||
<h4 id="orgacec971"><span class="section-number-4">2.3.1</span> Get</h4>
|
||||
<div id="outline-container-org0507432" class="outline-4">
|
||||
<h4 id="org0507432"><span class="section-number-4">2.3.1</span> Get</h4>
|
||||
<div class="outline-text-4" id="text-2-3-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_rescaled_deriv_e</span>(<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #228b22;">double</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">distance_rescaled_deriv_e</span>);
|
||||
@ -1352,10 +1354,10 @@ gives the Laplacian \(\partial x^2 + \partial y^2 + \partial z^2\).
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgba32e3a" class="outline-4">
|
||||
<h4 id="orgba32e3a"><span class="section-number-4">2.3.2</span> Compute</h4>
|
||||
<div id="outline-container-org26626f9" class="outline-4">
|
||||
<h4 id="org26626f9"><span class="section-number-4">2.3.2</span> Compute</h4>
|
||||
<div class="outline-text-4" id="text-2-3-2">
|
||||
<table id="org2382bb6" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org045cef8" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1468,8 +1470,8 @@ gives the Laplacian \(\partial x^2 + \partial y^2 + \partial z^2\).
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org2304b2e" class="outline-4">
|
||||
<h4 id="org2304b2e"><span class="section-number-4">2.3.3</span> Test</h4>
|
||||
<div id="outline-container-orgfce2977" class="outline-4">
|
||||
<h4 id="orgfce2977"><span class="section-number-4">2.3.3</span> Test</h4>
|
||||
<div class="outline-text-4" id="text-2-3-3">
|
||||
<div class="org-src-container">
|
||||
<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>));
|
||||
@ -1504,8 +1506,8 @@ rc = qmckl_get_electron_ee_distance_rescaled_deriv_e(context, ee_distance_rescal
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgeeeb06b" class="outline-3">
|
||||
<h3 id="orgeeeb06b"><span class="section-number-3">2.4</span> Electron-electron potential</h3>
|
||||
<div id="outline-container-org07097cc" class="outline-3">
|
||||
<h3 id="org07097cc"><span class="section-number-3">2.4</span> Electron-electron potential</h3>
|
||||
<div class="outline-text-3" id="text-2-4">
|
||||
<p>
|
||||
<code>ee_pot</code> calculates the <code>ee</code> potential energy.
|
||||
@ -1523,8 +1525,8 @@ distance.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org4d4ede9" class="outline-4">
|
||||
<h4 id="org4d4ede9"><span class="section-number-4">2.4.1</span> Get</h4>
|
||||
<div id="outline-container-org01ce7a9" class="outline-4">
|
||||
<h4 id="org01ce7a9"><span class="section-number-4">2.4.1</span> Get</h4>
|
||||
<div class="outline-text-4" id="text-2-4-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_potential</span>(<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #228b22;">double</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">ee_pot</span>);
|
||||
@ -1533,10 +1535,10 @@ distance.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org3cb21c6" class="outline-4">
|
||||
<h4 id="org3cb21c6"><span class="section-number-4">2.4.2</span> Compute</h4>
|
||||
<div id="outline-container-org20c07c1" class="outline-4">
|
||||
<h4 id="org20c07c1"><span class="section-number-4">2.4.2</span> Compute</h4>
|
||||
<div class="outline-text-4" id="text-2-4-2">
|
||||
<table id="org87b6100" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org662fe44" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1652,8 +1654,8 @@ distance.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org9e5c725" class="outline-4">
|
||||
<h4 id="org9e5c725"><span class="section-number-4">2.4.3</span> Test</h4>
|
||||
<div id="outline-container-org400c841" class="outline-4">
|
||||
<h4 id="org400c841"><span class="section-number-4">2.4.3</span> Test</h4>
|
||||
<div class="outline-text-4" id="text-2-4-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">double</span> <span style="color: #a0522d;">ee_pot</span>[walk_num];
|
||||
@ -1665,12 +1667,12 @@ rc = qmckl_get_electron_ee_potential(context, &(ee_pot[0]));
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-org978a219" class="outline-3">
|
||||
<h3 id="org978a219"><span class="section-number-3">2.5</span> Electron-nucleus distances</h3>
|
||||
<div id="outline-container-org9d34def" class="outline-3">
|
||||
<h3 id="org9d34def"><span class="section-number-3">2.5</span> Electron-nucleus distances</h3>
|
||||
<div class="outline-text-3" id="text-2-5">
|
||||
</div>
|
||||
<div id="outline-container-org8aef480" class="outline-4">
|
||||
<h4 id="org8aef480"><span class="section-number-4">2.5.1</span> Get</h4>
|
||||
<div id="outline-container-org0db349f" class="outline-4">
|
||||
<h4 id="org0db349f"><span class="section-number-4">2.5.1</span> Get</h4>
|
||||
<div class="outline-text-4" id="text-2-5-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>);
|
||||
@ -1679,10 +1681,10 @@ rc = qmckl_get_electron_ee_potential(context, &(ee_pot[0]));
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org16f81ee" class="outline-4">
|
||||
<h4 id="org16f81ee"><span class="section-number-4">2.5.2</span> Compute</h4>
|
||||
<div id="outline-container-org4e8c31d" class="outline-4">
|
||||
<h4 id="org4e8c31d"><span class="section-number-4">2.5.2</span> Compute</h4>
|
||||
<div class="outline-text-4" id="text-2-5-2">
|
||||
<table id="org89dfc3e" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org936a3ed" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1763,7 +1765,7 @@ rc = qmckl_get_electron_ee_potential(context, &(ee_pot[0]));
|
||||
<span style="color: #228b22;">integer</span>*8 , <span style="color: #a020f0;">intent</span>(in) ::<span style="color: #a0522d;"> elec_num</span>
|
||||
<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;"> elec_coord(elec_num,walk_num,3)</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>
|
||||
|
||||
@ -1793,7 +1795,7 @@ rc = qmckl_get_electron_ee_potential(context, &(ee_pot[0]));
|
||||
|
||||
<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>
|
||||
elec_coord(1,k,1), elec_num * walk_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>
|
||||
@ -1807,8 +1809,8 @@ rc = qmckl_get_electron_ee_potential(context, &(ee_pot[0]));
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org882c57a" class="outline-4">
|
||||
<h4 id="org882c57a"><span class="section-number-4">2.5.3</span> Test</h4>
|
||||
<div id="outline-container-orgc5b19ba" class="outline-4">
|
||||
<h4 id="orgc5b19ba"><span class="section-number-4">2.5.3</span> Test</h4>
|
||||
<div class="outline-text-4" id="text-2-5-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">
|
||||
@ -1818,10 +1820,10 @@ assert(!qmckl_nucleus_provided(context));
|
||||
rc = qmckl_set_nucleus_num (context, nucl_num);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_SUCCESS);
|
||||
|
||||
rc = qmckl_set_nucleus_charge (context, charge);
|
||||
rc = qmckl_set_nucleus_charge (context, charge, nucl_num);
|
||||
<span style="color: #0000ff;">assert</span> (rc == QMCKL_SUCCESS);
|
||||
|
||||
rc = qmckl_set_nucleus_coord (context, <span style="color: #8b2252;">'T'</span>, nucl_coord);
|
||||
rc = qmckl_set_nucleus_coord (context, <span style="color: #8b2252;">'T'</span>, nucl_coord, 3*nucl_num);
|
||||
<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>));
|
||||
@ -1856,8 +1858,8 @@ rc = qmckl_get_electron_en_distance(context, &(en_distance[0][0][0]));
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org38e01fa" class="outline-3">
|
||||
<h3 id="org38e01fa"><span class="section-number-3">2.6</span> Electron-nucleus rescaled distances</h3>
|
||||
<div id="outline-container-orge4aee41" class="outline-3">
|
||||
<h3 id="orge4aee41"><span class="section-number-3">2.6</span> Electron-nucleus rescaled distances</h3>
|
||||
<div class="outline-text-3" id="text-2-6">
|
||||
<p>
|
||||
<code>en_distance_rescaled</code> stores the matrix of the rescaled distances between
|
||||
@ -1875,8 +1877,8 @@ where \(C_{ij}\) is the matrix of electron-nucleus distances.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgb932e99" class="outline-4">
|
||||
<h4 id="orgb932e99"><span class="section-number-4">2.6.1</span> Get</h4>
|
||||
<div id="outline-container-org2893b6f" class="outline-4">
|
||||
<h4 id="org2893b6f"><span class="section-number-4">2.6.1</span> Get</h4>
|
||||
<div class="outline-text-4" id="text-2-6-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_rescaled</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_rescaled</span>);
|
||||
@ -1885,10 +1887,11 @@ where \(C_{ij}\) is the matrix of electron-nucleus distances.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org9204ec4" class="outline-4">
|
||||
<h4 id="org9204ec4"><span class="section-number-4">2.6.2</span> Compute</h4>
|
||||
|
||||
<div id="outline-container-org547a1cd" class="outline-4">
|
||||
<h4 id="org547a1cd"><span class="section-number-4">2.6.2</span> Compute</h4>
|
||||
<div class="outline-text-4" id="text-2-6-2">
|
||||
<table id="org78756e1" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org9a9ae9b" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1978,7 +1981,7 @@ where \(C_{ij}\) is the matrix of electron-nucleus distances.
|
||||
<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;">double precision</span> , <span style="color: #a020f0;">intent</span>(in) ::<span style="color: #a0522d;"> rescale_factor_kappa_en</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;"> elec_coord(elec_num,walk_num,3)</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_rescaled(elec_num,nucl_num,walk_num)</span>
|
||||
|
||||
@ -2014,7 +2017,7 @@ where \(C_{ij}\) is the matrix of electron-nucleus distances.
|
||||
|
||||
<span style="color: #a020f0;">do</span> k=1,walk_num
|
||||
info = qmckl_distance_rescaled(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>
|
||||
elec_coord(1,k,1), elec_num*walk_num, <span style="color: #a020f0;">&</span>
|
||||
nucl_coord, nucl_num, <span style="color: #a020f0;">&</span>
|
||||
en_distance_rescaled(1,1,k), elec_num, rescale_factor_kappa_en)
|
||||
<span style="color: #a020f0;">if</span> (info /= QMCKL_SUCCESS) <span style="color: #a020f0;">then</span>
|
||||
@ -2028,8 +2031,8 @@ where \(C_{ij}\) is the matrix of electron-nucleus distances.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org051cd83" class="outline-4">
|
||||
<h4 id="org051cd83"><span class="section-number-4">2.6.3</span> Test</h4>
|
||||
<div id="outline-container-orgf22286e" class="outline-4">
|
||||
<h4 id="orgf22286e"><span class="section-number-4">2.6.3</span> Test</h4>
|
||||
<div class="outline-text-4" id="text-2-6-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">
|
||||
@ -2038,10 +2041,10 @@ where \(C_{ij}\) is the matrix of electron-nucleus distances.
|
||||
rc = qmckl_set_nucleus_num (context, nucl_num);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_SUCCESS);
|
||||
|
||||
rc = qmckl_set_nucleus_charge (context, charge);
|
||||
rc = qmckl_set_nucleus_charge (context, charge, nucl_num);
|
||||
<span style="color: #0000ff;">assert</span> (rc == QMCKL_SUCCESS);
|
||||
|
||||
rc = qmckl_set_nucleus_coord (context, <span style="color: #8b2252;">'T'</span>, nucl_coord);
|
||||
rc = qmckl_set_nucleus_coord (context, <span style="color: #8b2252;">'T'</span>, nucl_coord, 3*nucl_num);
|
||||
<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>));
|
||||
@ -2057,6 +2060,7 @@ rc = qmckl_get_electron_en_distance_rescaled(context, &(en_distance_rescaled
|
||||
<span style="color: #0000ff;">assert</span>(fabs(<span style="color: #228b22;">en_distance_rescaled</span>[0][0][0] - 0.9994721712909764) < 1.e-12);
|
||||
|
||||
// <span style="color: #b22222;">(1,2,1)</span>
|
||||
printf(<span style="color: #8b2252;">"%f\n%f\n"</span>, en_distance_rescaled[0][1][0] , 0.9998448354439821);
|
||||
<span style="color: #0000ff;">assert</span>(fabs(<span style="color: #228b22;">en_distance_rescaled</span>[0][1][0] - 0.9998448354439821) < 1.e-12);
|
||||
|
||||
// <span style="color: #b22222;">(2,1,1)</span>
|
||||
@ -2077,8 +2081,8 @@ rc = qmckl_get_electron_en_distance_rescaled(context, &(en_distance_rescaled
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org98f5c0b" class="outline-3">
|
||||
<h3 id="org98f5c0b"><span class="section-number-3">2.7</span> Electron-nucleus rescaled distance gradients and laplacian with respect to electron coords</h3>
|
||||
<div id="outline-container-org92b5486" class="outline-3">
|
||||
<h3 id="org92b5486"><span class="section-number-3">2.7</span> Electron-nucleus rescaled distance gradients and laplacian with respect to electron coords</h3>
|
||||
<div class="outline-text-3" id="text-2-7">
|
||||
<p>
|
||||
The rescaled distances which is given as \(R = (1 - \exp{-\kappa r})/\kappa\)
|
||||
@ -2090,8 +2094,8 @@ gives the Laplacian \(\partial x^2 + \partial y^2 + \partial z^2\).
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org551aeb9" class="outline-4">
|
||||
<h4 id="org551aeb9"><span class="section-number-4">2.7.1</span> Get</h4>
|
||||
<div id="outline-container-orgacdf4a3" class="outline-4">
|
||||
<h4 id="orgacdf4a3"><span class="section-number-4">2.7.1</span> Get</h4>
|
||||
<div class="outline-text-4" id="text-2-7-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_rescaled_deriv_e</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_rescaled_deriv_e</span>);
|
||||
@ -2100,10 +2104,10 @@ gives the Laplacian \(\partial x^2 + \partial y^2 + \partial z^2\).
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge8b4063" class="outline-4">
|
||||
<h4 id="orge8b4063"><span class="section-number-4">2.7.2</span> Compute</h4>
|
||||
<div id="outline-container-org5366020" class="outline-4">
|
||||
<h4 id="org5366020"><span class="section-number-4">2.7.2</span> Compute</h4>
|
||||
<div class="outline-text-4" id="text-2-7-2">
|
||||
<table id="orgfe7d0e1" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org3fb48c7" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -2194,7 +2198,7 @@ gives the Laplacian \(\partial x^2 + \partial y^2 + \partial z^2\).
|
||||
<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;">double precision</span> , <span style="color: #a020f0;">intent</span>(in) ::<span style="color: #a0522d;"> rescale_factor_kappa_en</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;"> elec_coord(elec_num,walk_num,3)</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_rescaled_deriv_e(elec_num,nucl_num,walk_num)</span>
|
||||
|
||||
@ -2230,7 +2234,7 @@ gives the Laplacian \(\partial x^2 + \partial y^2 + \partial z^2\).
|
||||
|
||||
<span style="color: #a020f0;">do</span> k=1,walk_num
|
||||
info = qmckl_distance_rescaled_deriv_e(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>
|
||||
elec_coord(1,k,1), elec_num*walk_num, <span style="color: #a020f0;">&</span>
|
||||
nucl_coord, nucl_num, <span style="color: #a020f0;">&</span>
|
||||
en_distance_rescaled_deriv_e(1,1,k), elec_num, rescale_factor_kappa_en)
|
||||
<span style="color: #a020f0;">if</span> (info /= QMCKL_SUCCESS) <span style="color: #a020f0;">then</span>
|
||||
@ -2244,8 +2248,8 @@ gives the Laplacian \(\partial x^2 + \partial y^2 + \partial z^2\).
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org63b05e8" class="outline-4">
|
||||
<h4 id="org63b05e8"><span class="section-number-4">2.7.3</span> Test</h4>
|
||||
<div id="outline-container-org4251448" class="outline-4">
|
||||
<h4 id="org4251448"><span class="section-number-4">2.7.3</span> Test</h4>
|
||||
<div class="outline-text-4" id="text-2-7-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">
|
||||
@ -2257,10 +2261,10 @@ rc = qmckl_set_nucleus_num (context, nucl_num);
|
||||
rc = qmckl_set_nucleus_rescale_factor (context, nucl_rescale_factor_kappa);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_SUCCESS);
|
||||
|
||||
rc = qmckl_set_nucleus_charge (context, charge);
|
||||
rc = qmckl_set_nucleus_charge (context, charge, nucl_num);
|
||||
<span style="color: #0000ff;">assert</span> (rc == QMCKL_SUCCESS);
|
||||
|
||||
rc = qmckl_set_nucleus_coord (context, <span style="color: #8b2252;">'T'</span>, nucl_coord);
|
||||
rc = qmckl_set_nucleus_coord (context, <span style="color: #8b2252;">'T'</span>, nucl_coord, 3*nucl_num);
|
||||
<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>));
|
||||
@ -2297,8 +2301,8 @@ rc = qmckl_get_electron_en_distance_rescaled_deriv_e(context, &(en_distance_
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgc28266a" class="outline-3">
|
||||
<h3 id="orgc28266a"><span class="section-number-3">2.8</span> Electron-nucleus potential</h3>
|
||||
<div id="outline-container-orgc757cd5" class="outline-3">
|
||||
<h3 id="orgc757cd5"><span class="section-number-3">2.8</span> Electron-nucleus potential</h3>
|
||||
<div class="outline-text-3" id="text-2-8">
|
||||
<p>
|
||||
<code>en_potential</code> stores the <code>en</code> potential energy
|
||||
@ -2316,8 +2320,8 @@ distance and \[Z_A\] is the nuclear charge.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf731341" class="outline-4">
|
||||
<h4 id="orgf731341"><span class="section-number-4">2.8.1</span> Get</h4>
|
||||
<div id="outline-container-orgb98e42d" class="outline-4">
|
||||
<h4 id="orgb98e42d"><span class="section-number-4">2.8.1</span> Get</h4>
|
||||
<div class="outline-text-4" id="text-2-8-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_potential</span>(<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #228b22;">double</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">en_pot</span>);
|
||||
@ -2326,10 +2330,10 @@ distance and \[Z_A\] is the nuclear charge.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgdcc5f13" class="outline-4">
|
||||
<h4 id="orgdcc5f13"><span class="section-number-4">2.8.2</span> Compute</h4>
|
||||
<div id="outline-container-org76ed19c" class="outline-4">
|
||||
<h4 id="org76ed19c"><span class="section-number-4">2.8.2</span> Compute</h4>
|
||||
<div class="outline-text-4" id="text-2-8-2">
|
||||
<table id="org00ee125" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org6d2994a" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -2463,8 +2467,8 @@ distance and \[Z_A\] is the nuclear charge.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org3964156" class="outline-4">
|
||||
<h4 id="org3964156"><span class="section-number-4">2.8.3</span> Test</h4>
|
||||
<div id="outline-container-org81e0a93" class="outline-4">
|
||||
<h4 id="org81e0a93"><span class="section-number-4">2.8.3</span> Test</h4>
|
||||
<div class="outline-text-4" id="text-2-8-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">double</span> <span style="color: #a0522d;">en_pot</span>[walk_num];
|
||||
@ -2477,14 +2481,14 @@ rc = qmckl_get_electron_en_potential(context, &(en_pot[0]));
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org24d5d54" class="outline-3">
|
||||
<h3 id="org24d5d54"><span class="section-number-3">2.9</span> Generate initial coordinates</h3>
|
||||
<div id="outline-container-orge8a8fb0" class="outline-3">
|
||||
<h3 id="orge8a8fb0"><span class="section-number-3">2.9</span> Generate initial coordinates</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2022-01-21 Fri 07:53</p>
|
||||
<p class="date">Created: 2022-01-23 Sun 18:08</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>
|
||||
<!-- 2022-01-21 Fri 07:53 -->
|
||||
<!-- 2022-01-23 Sun 18:08 -->
|
||||
<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,17 +311,17 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org712b998">1. Decoding errors</a></li>
|
||||
<li><a href="#org9b8e568">2. Data structure in context</a></li>
|
||||
<li><a href="#orgcdda45a">3. Updating errors in the context</a></li>
|
||||
<li><a href="#org13f5399">4. Get the error</a></li>
|
||||
<li><a href="#org74f9e4a">5. Failing</a></li>
|
||||
<li><a href="#org8cc9cb9">1. Decoding errors</a></li>
|
||||
<li><a href="#orgeda63a0">2. Data structure in context</a></li>
|
||||
<li><a href="#orgdd3298a">3. Updating errors in the context</a></li>
|
||||
<li><a href="#orged31786">4. Get the error</a></li>
|
||||
<li><a href="#orgf87c6c5">5. Failing</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org712b998" class="outline-2">
|
||||
<h2 id="org712b998"><span class="section-number-2">1</span> Decoding errors</h2>
|
||||
<div id="outline-container-org8cc9cb9" class="outline-2">
|
||||
<h2 id="org8cc9cb9"><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
|
||||
@ -451,8 +451,8 @@ The text strings are extracted from the previous table.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org9b8e568" class="outline-2">
|
||||
<h2 id="org9b8e568"><span class="section-number-2">2</span> Data structure in context</h2>
|
||||
<div id="outline-container-orgeda63a0" class="outline-2">
|
||||
<h2 id="orgeda63a0"><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
|
||||
@ -475,8 +475,8 @@ dynamic memory allocation.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgcdda45a" class="outline-2">
|
||||
<h2 id="orgcdda45a"><span class="section-number-2">3</span> Updating errors in the context</h2>
|
||||
<div id="outline-container-orgdd3298a" class="outline-2">
|
||||
<h2 id="orgdd3298a"><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>.
|
||||
@ -522,8 +522,8 @@ explaining the error. The exit code can't be <code>QMCKL_SUCCESS</code>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org13f5399" class="outline-2">
|
||||
<h2 id="org13f5399"><span class="section-number-2">4</span> Get the error</h2>
|
||||
<div id="outline-container-orged31786" class="outline-2">
|
||||
<h2 id="orged31786"><span class="section-number-2">4</span> Get the error</h2>
|
||||
<div class="outline-text-2" id="text-4">
|
||||
<p>
|
||||
Upon error, the error type and message can be obtained from the
|
||||
@ -575,8 +575,8 @@ function name and message is mandatory.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org74f9e4a" class="outline-2">
|
||||
<h2 id="org74f9e4a"><span class="section-number-2">5</span> Failing</h2>
|
||||
<div id="outline-container-orgf87c6c5" class="outline-2">
|
||||
<h2 id="orgf87c6c5"><span class="section-number-2">5</span> Failing</h2>
|
||||
<div class="outline-text-2" id="text-5">
|
||||
<p>
|
||||
To make a function fail, the <code>qmckl_failwith</code> function should be
|
||||
@ -639,7 +639,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: 2022-01-21 Fri 07:53</p>
|
||||
<p class="date">Created: 2022-01-23 Sun 18:08</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>
|
||||
<!-- 2022-01-21 Fri 07:53 -->
|
||||
<!-- 2022-01-23 Sun 18:09 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Jastrow Factor</title>
|
||||
@ -333,104 +333,104 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org6c4417d">1. Context</a>
|
||||
<li><a href="#org19da4a3">1. Context</a>
|
||||
<ul>
|
||||
<li><a href="#orgd767e4f">1.1. Data structure</a></li>
|
||||
<li><a href="#orgad7f633">1.2. Access functions</a></li>
|
||||
<li><a href="#orgcf3d101">1.3. Initialization functions</a></li>
|
||||
<li><a href="#orgd42ea8e">1.4. Test</a></li>
|
||||
<li><a href="#orge53f111">1.1. Data structure</a></li>
|
||||
<li><a href="#org1f284c8">1.2. Access functions</a></li>
|
||||
<li><a href="#org4bb929a">1.3. Initialization functions</a></li>
|
||||
<li><a href="#orgba8df0f">1.4. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org608902d">2. Computation</a>
|
||||
<li><a href="#orgbf014ef">2. Computation</a>
|
||||
<ul>
|
||||
<li><a href="#org8e7ce08">2.1. Asymptotic component for \(f_{ee}\)</a>
|
||||
<li><a href="#org7d1edd3">2.1. Asymptotic component for \(f_{ee}\)</a>
|
||||
<ul>
|
||||
<li><a href="#org6d99227">2.1.1. Get</a></li>
|
||||
<li><a href="#org95354cc">2.1.2. Compute</a></li>
|
||||
<li><a href="#org4293935">2.1.3. Test</a></li>
|
||||
<li><a href="#org1ad150f">2.1.1. Get</a></li>
|
||||
<li><a href="#orgeb9f24d">2.1.2. Compute</a></li>
|
||||
<li><a href="#orgd100587">2.1.3. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orge66f956">2.2. Electron-electron component \(f_{ee}\)</a>
|
||||
<li><a href="#org6e9c3a0">2.2. Electron-electron component \(f_{ee}\)</a>
|
||||
<ul>
|
||||
<li><a href="#org96c6fa1">2.2.1. Get</a></li>
|
||||
<li><a href="#org9f6183b">2.2.2. Compute</a></li>
|
||||
<li><a href="#orgeb911c1">2.2.3. Test</a></li>
|
||||
<li><a href="#orgea718bc">2.2.1. Get</a></li>
|
||||
<li><a href="#orgfd88c3e">2.2.2. Compute</a></li>
|
||||
<li><a href="#orgb07e5bb">2.2.3. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgd054289">2.3. Electron-electron component derivative \(f'_{ee}\)</a>
|
||||
<li><a href="#org033344c">2.3. Electron-electron component derivative \(f'_{ee}\)</a>
|
||||
<ul>
|
||||
<li><a href="#org3f02be4">2.3.1. Get</a></li>
|
||||
<li><a href="#org6f3a522">2.3.2. Compute</a></li>
|
||||
<li><a href="#orgf4883d0">2.3.3. Test</a></li>
|
||||
<li><a href="#orgfdc3a2f">2.3.1. Get</a></li>
|
||||
<li><a href="#org26dc70a">2.3.2. Compute</a></li>
|
||||
<li><a href="#orgb7a7071">2.3.3. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org9dce4b1">2.4. Electron-nucleus component \(f_{en}\)</a>
|
||||
<li><a href="#org28c7876">2.4. Electron-nucleus component \(f_{en}\)</a>
|
||||
<ul>
|
||||
<li><a href="#orgc73e2c2">2.4.1. Get</a></li>
|
||||
<li><a href="#org8fb28d6">2.4.2. Compute</a></li>
|
||||
<li><a href="#org3e6c50d">2.4.3. Test</a></li>
|
||||
<li><a href="#org8cfa20f">2.4.1. Get</a></li>
|
||||
<li><a href="#org54c83f9">2.4.2. Compute</a></li>
|
||||
<li><a href="#org2e7d05b">2.4.3. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orge29d7a8">2.5. Electron-nucleus component derivative \(f'_{en}\)</a>
|
||||
<li><a href="#org9ad4fda">2.5. Electron-nucleus component derivative \(f'_{en}\)</a>
|
||||
<ul>
|
||||
<li><a href="#orgdd5482d">2.5.1. Get</a></li>
|
||||
<li><a href="#orgb0c3818">2.5.2. Compute</a></li>
|
||||
<li><a href="#org69bc096">2.5.3. Test</a></li>
|
||||
<li><a href="#org130f1d0">2.5.1. Get</a></li>
|
||||
<li><a href="#orgc143776">2.5.2. Compute</a></li>
|
||||
<li><a href="#orga67e421">2.5.3. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgb53276b">2.6. Electron-electron rescaled distances for each order</a>
|
||||
<li><a href="#org46143cb">2.6. Electron-electron rescaled distances for each order</a>
|
||||
<ul>
|
||||
<li><a href="#org0bf75ba">2.6.1. Get</a></li>
|
||||
<li><a href="#orgac828d5">2.6.2. Compute</a></li>
|
||||
<li><a href="#orgf6287a2">2.6.3. Test</a></li>
|
||||
<li><a href="#org0de1768">2.6.1. Get</a></li>
|
||||
<li><a href="#orgc16266f">2.6.2. Compute</a></li>
|
||||
<li><a href="#org94e75f8">2.6.3. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgcc3a000">2.7. Electron-electron rescaled distances for each order and derivatives</a>
|
||||
<li><a href="#orgc85946f">2.7. Electron-electron rescaled distances for each order and derivatives</a>
|
||||
<ul>
|
||||
<li><a href="#orga84e9a1">2.7.1. Get</a></li>
|
||||
<li><a href="#org6cb28d2">2.7.2. Compute</a></li>
|
||||
<li><a href="#org17d4635">2.7.3. Test</a></li>
|
||||
<li><a href="#org90162f7">2.7.1. Get</a></li>
|
||||
<li><a href="#orgb925e8b">2.7.2. Compute</a></li>
|
||||
<li><a href="#org078a59d">2.7.3. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org30e036a">2.8. Electron-nucleus rescaled distances for each order</a>
|
||||
<li><a href="#orga17ad07">2.8. Electron-nucleus rescaled distances for each order</a>
|
||||
<ul>
|
||||
<li><a href="#orgdb2a3b3">2.8.1. Get</a></li>
|
||||
<li><a href="#orgeab1d30">2.8.2. Compute</a></li>
|
||||
<li><a href="#orgf564f56">2.8.3. Test</a></li>
|
||||
<li><a href="#org50e6386">2.8.1. Get</a></li>
|
||||
<li><a href="#org0fcf848">2.8.2. Compute</a></li>
|
||||
<li><a href="#org508eb4d">2.8.3. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org76fc9fd">2.9. Electron-nucleus rescaled distances for each order and derivatives</a>
|
||||
<li><a href="#org0e2a6c9">2.9. Electron-nucleus rescaled distances for each order and derivatives</a>
|
||||
<ul>
|
||||
<li><a href="#org07035e9">2.9.1. Get</a></li>
|
||||
<li><a href="#orgb7873dd">2.9.2. Compute</a></li>
|
||||
<li><a href="#orgfd715cf">2.9.3. Test</a></li>
|
||||
<li><a href="#orgafaf3a9">2.9.1. Get</a></li>
|
||||
<li><a href="#orgd0e553c">2.9.2. Compute</a></li>
|
||||
<li><a href="#orge6676fd">2.9.3. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgbf3004c">2.10. Prepare for electron-electron-nucleus Jastrow \(f_{een}\)</a>
|
||||
<li><a href="#org5702b88">2.10. Prepare for electron-electron-nucleus Jastrow \(f_{een}\)</a>
|
||||
<ul>
|
||||
<li><a href="#orgeb2fe3a">2.10.1. Get</a></li>
|
||||
<li><a href="#org6e6c79c">2.10.2. Compute dim<sub>cord</sub><sub>vect</sub></a></li>
|
||||
<li><a href="#org8bb5f60">2.10.3. Compute cord<sub>vect</sub><sub>full</sub></a></li>
|
||||
<li><a href="#org2bd2af9">2.10.4. Compute lkpm<sub>combined</sub><sub>index</sub></a></li>
|
||||
<li><a href="#orgdc70199">2.10.5. Compute tmp<sub>c</sub></a></li>
|
||||
<li><a href="#org73d6a07">2.10.6. Compute dtmp<sub>c</sub></a></li>
|
||||
<li><a href="#org9fa10b7">2.10.7. Test</a></li>
|
||||
<li><a href="#orgff28a38">2.10.1. Get</a></li>
|
||||
<li><a href="#orga14d55b">2.10.2. Compute dim<sub>cord</sub><sub>vect</sub></a></li>
|
||||
<li><a href="#orgfdb2a95">2.10.3. Compute cord<sub>vect</sub><sub>full</sub></a></li>
|
||||
<li><a href="#orgcefc094">2.10.4. Compute lkpm<sub>combined</sub><sub>index</sub></a></li>
|
||||
<li><a href="#orgf6b6b5f">2.10.5. Compute tmp<sub>c</sub></a></li>
|
||||
<li><a href="#org14e546e">2.10.6. Compute dtmp<sub>c</sub></a></li>
|
||||
<li><a href="#orgf9b9605">2.10.7. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgd9c9cfe">2.11. Electron-electron-nucleus Jastrow \(f_{een}\)</a>
|
||||
<li><a href="#org77f58fa">2.11. Electron-electron-nucleus Jastrow \(f_{een}\)</a>
|
||||
<ul>
|
||||
<li><a href="#orga540333">2.11.1. Get</a></li>
|
||||
<li><a href="#orgf1e4a7a">2.11.2. Compute naive</a></li>
|
||||
<li><a href="#org48d6e94">2.11.3. Compute</a></li>
|
||||
<li><a href="#orgc0d84b8">2.11.4. Test</a></li>
|
||||
<li><a href="#orge170a94">2.11.1. Get</a></li>
|
||||
<li><a href="#orgdeb8236">2.11.2. Compute naive</a></li>
|
||||
<li><a href="#org5341211">2.11.3. Compute</a></li>
|
||||
<li><a href="#orgc4f8f0f">2.11.4. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org893ccbc">2.12. Electron-electron-nucleus Jastrow \(f_{een}\) derivative</a>
|
||||
<li><a href="#org8a4699d">2.12. Electron-electron-nucleus Jastrow \(f_{een}\) derivative</a>
|
||||
<ul>
|
||||
<li><a href="#orgf035e3c">2.12.1. Get</a></li>
|
||||
<li><a href="#org6d2f6d0">2.12.2. Compute Naive</a></li>
|
||||
<li><a href="#org0b24d1d">2.12.3. Compute</a></li>
|
||||
<li><a href="#org152f76b">2.12.4. Test</a></li>
|
||||
<li><a href="#orga076f74">2.12.1. Get</a></li>
|
||||
<li><a href="#orgdc1c9c4">2.12.2. Compute Naive</a></li>
|
||||
<li><a href="#orgcd0709b">2.12.3. Compute</a></li>
|
||||
<li><a href="#orgcfd80fc">2.12.4. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@ -439,14 +439,14 @@ for the JavaScript code in this tag.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6c4417d" class="outline-2">
|
||||
<h2 id="org6c4417d"><span class="section-number-2">1</span> Context</h2>
|
||||
<div id="outline-container-org19da4a3" class="outline-2">
|
||||
<h2 id="org19da4a3"><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:
|
||||
</p>
|
||||
|
||||
<table id="org3b9dd2a" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orga7375de" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -710,21 +710,22 @@ computed data:
|
||||
<td class="org-left">vector of non-zero coefficients</td>
|
||||
<td class="org-left"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<tr>
|
||||
<td class="org-left"><code>een_rescaled_e</code></td>
|
||||
<td class="org-left"><code>double[walk_num][walk_num][elec_num][elec_num][0:cord_num]</code></td>
|
||||
<td class="org-left">The electron-electron rescaled distances raised to the powers defined by cord</td>
|
||||
<td class="org-left"> </td>
|
||||
</tr>
|
||||
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
<tr>
|
||||
<td class="org-left"><code>een_rescaled_e_date</code></td>
|
||||
<td class="org-left"><code>uint64_t</code></td>
|
||||
<td class="org-left">Keep track of the date of creation</td>
|
||||
<td class="org-left"> </td>
|
||||
</tr>
|
||||
|
||||
<colgroup>
|
||||
<col class="org-left" />
|
||||
|
||||
<col class="org-left" />
|
||||
|
||||
<col class="org-left" />
|
||||
|
||||
<col class="org-left" />
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="org-left"><code>een_rescaled_n</code></td>
|
||||
<td class="org-left"><code>double[walk_num][elec_num][nucl_num][0:cord_num]</code></td>
|
||||
@ -774,7 +775,7 @@ For H2O we have the following data:
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-python" id="org0b75601"><span style="color: #a020f0;">import</span> numpy <span style="color: #a020f0;">as</span> np
|
||||
<pre class="src src-python" id="org3d74358"><span style="color: #a020f0;">import</span> numpy <span style="color: #a020f0;">as</span> np
|
||||
|
||||
<span style="color: #a0522d;">elec_num</span> = 10
|
||||
<span style="color: #a0522d;">nucl_num</span> = 2
|
||||
@ -924,8 +925,8 @@ For H2O we have the following data:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd767e4f" class="outline-3">
|
||||
<h3 id="orgd767e4f"><span class="section-number-3">1.1</span> Data structure</h3>
|
||||
<div id="outline-container-orge53f111" class="outline-3">
|
||||
<h3 id="orge53f111"><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_jastrow_struct</span>{
|
||||
@ -1012,8 +1013,8 @@ this mechanism.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgad7f633" class="outline-3">
|
||||
<h3 id="orgad7f633"><span class="section-number-3">1.2</span> Access functions</h3>
|
||||
<div id="outline-container-org1f284c8" class="outline-3">
|
||||
<h3 id="org1f284c8"><span class="section-number-3">1.2</span> Access functions</h3>
|
||||
<div class="outline-text-3" id="text-1-2">
|
||||
<p>
|
||||
Along with these core functions, calculation of the jastrow factor
|
||||
@ -1033,8 +1034,8 @@ function returns <code>true</code>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgcf3d101" class="outline-3">
|
||||
<h3 id="orgcf3d101"><span class="section-number-3">1.3</span> Initialization functions</h3>
|
||||
<div id="outline-container-org4bb929a" class="outline-3">
|
||||
<h3 id="org4bb929a"><span class="section-number-3">1.3</span> Initialization functions</h3>
|
||||
<div class="outline-text-3" id="text-1-3">
|
||||
<p>
|
||||
To prepare for the Jastrow and its derivative, all the following functions need to be
|
||||
@ -1060,8 +1061,8 @@ are precontracted using BLAS LEVEL 3 operations for an optimal FLOP count.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd42ea8e" class="outline-3">
|
||||
<h3 id="orgd42ea8e"><span class="section-number-3">1.4</span> Test</h3>
|
||||
<div id="outline-container-orgba8df0f" class="outline-3">
|
||||
<h3 id="orgba8df0f"><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>*/
|
||||
@ -1155,7 +1156,7 @@ rc = qmckl_set_electron_coord (context, <span style="color: #8b2252;">'N'</span>
|
||||
|
||||
<span style="color: #228b22;">double</span> <span style="color: #a0522d;">elec_coord2</span>[walk_num*3*elec_num];
|
||||
|
||||
rc = qmckl_get_electron_coord (context, <span style="color: #8b2252;">'N'</span>, elec_coord2);
|
||||
rc = qmckl_get_electron_coord (context, <span style="color: #8b2252;">'N'</span>, elec_coord2, walk_num*3*elec_num);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_SUCCESS);
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">i</span>=0 ; i<3*elec_num ; ++i) {
|
||||
assert( elec_coord[i] == elec_coord2[i] );
|
||||
@ -1193,15 +1194,15 @@ rc = qmckl_get_nucleus_rescale_factor (context, &k);
|
||||
|
||||
<span style="color: #228b22;">double</span> <span style="color: #a0522d;">nucl_coord2</span>[3*nucl_num];
|
||||
|
||||
rc = qmckl_get_nucleus_coord (context, <span style="color: #8b2252;">'T'</span>, nucl_coord2);
|
||||
rc = qmckl_get_nucleus_coord (context, <span style="color: #8b2252;">'T'</span>, nucl_coord2, 3*nucl_num);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_NOT_PROVIDED);
|
||||
|
||||
rc = qmckl_set_nucleus_coord (context, <span style="color: #8b2252;">'T'</span>, &(nucl_coord[0]));
|
||||
rc = qmckl_set_nucleus_coord (context, <span style="color: #8b2252;">'T'</span>, &(nucl_coord[0]), 3*nucl_num);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_SUCCESS);
|
||||
|
||||
assert(!qmckl_nucleus_provided(context));
|
||||
|
||||
rc = qmckl_get_nucleus_coord (context, <span style="color: #8b2252;">'N'</span>, nucl_coord2);
|
||||
rc = qmckl_get_nucleus_coord (context, <span style="color: #8b2252;">'N'</span>, nucl_coord2, nucl_num*3);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_SUCCESS);
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">k</span>=0 ; k<3 ; ++k) {
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">i</span>=0 ; i<nucl_num ; ++i) {
|
||||
@ -1209,7 +1210,7 @@ rc = qmckl_get_nucleus_coord (context, <span style="color: #8b2252;">'N'</span>,
|
||||
}
|
||||
}
|
||||
|
||||
rc = qmckl_get_nucleus_coord (context, <span style="color: #8b2252;">'T'</span>, nucl_coord2);
|
||||
rc = qmckl_get_nucleus_coord (context, <span style="color: #8b2252;">'T'</span>, nucl_coord2, nucl_num*3);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_SUCCESS);
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">i</span>=0 ; i<3*nucl_num ; ++i) {
|
||||
assert( nucl_coord[i] == nucl_coord2[i] );
|
||||
@ -1217,13 +1218,13 @@ rc = qmckl_get_nucleus_coord (context, <span style="color: #8b2252;">'T'</span>,
|
||||
|
||||
<span style="color: #228b22;">double</span> <span style="color: #a0522d;">nucl_charge2</span>[nucl_num];
|
||||
|
||||
rc = qmckl_get_nucleus_charge(context, nucl_charge2);
|
||||
rc = qmckl_get_nucleus_charge(context, nucl_charge2, nucl_num);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_NOT_PROVIDED);
|
||||
|
||||
rc = qmckl_set_nucleus_charge(context, nucl_charge);
|
||||
rc = qmckl_set_nucleus_charge(context, nucl_charge, nucl_num);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_SUCCESS);
|
||||
|
||||
rc = qmckl_get_nucleus_charge(context, nucl_charge2);
|
||||
rc = qmckl_get_nucleus_charge(context, nucl_charge2, nucl_num);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_SUCCESS);
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">i</span>=0 ; i<nucl_num ; ++i) {
|
||||
assert( nucl_charge[i] == nucl_charge2[i] );
|
||||
@ -1236,8 +1237,8 @@ rc = qmckl_get_nucleus_charge(context, nucl_charge2);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org608902d" class="outline-2">
|
||||
<h2 id="org608902d"><span class="section-number-2">2</span> Computation</h2>
|
||||
<div id="outline-container-orgbf014ef" class="outline-2">
|
||||
<h2 id="orgbf014ef"><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
|
||||
@ -1250,8 +1251,8 @@ current date is stored.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org8e7ce08" class="outline-3">
|
||||
<h3 id="org8e7ce08"><span class="section-number-3">2.1</span> Asymptotic component for \(f_{ee}\)</h3>
|
||||
<div id="outline-container-org7d1edd3" class="outline-3">
|
||||
<h3 id="org7d1edd3"><span class="section-number-3">2.1</span> Asymptotic component for \(f_{ee}\)</h3>
|
||||
<div class="outline-text-3" id="text-2-1">
|
||||
<p>
|
||||
Calculate the asymptotic component <code>asymp_jasb</code> to be substracted from the final
|
||||
@ -1266,8 +1267,8 @@ via the <code>bord_vector</code> and the electron-electron rescale factor <code>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6d99227" class="outline-4">
|
||||
<h4 id="org6d99227"><span class="section-number-4">2.1.1</span> Get</h4>
|
||||
<div id="outline-container-org1ad150f" class="outline-4">
|
||||
<h4 id="org1ad150f"><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_jastrow_asymp_jasb</span>(<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #228b22;">double</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">asymp_jasb</span>);
|
||||
@ -1276,10 +1277,10 @@ via the <code>bord_vector</code> and the electron-electron rescale factor <code>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org95354cc" class="outline-4">
|
||||
<h4 id="org95354cc"><span class="section-number-4">2.1.2</span> Compute</h4>
|
||||
<div id="outline-container-orgeb9f24d" class="outline-4">
|
||||
<h4 id="orgeb9f24d"><span class="section-number-4">2.1.2</span> Compute</h4>
|
||||
<div class="outline-text-4" id="text-2-1-2">
|
||||
<table id="org179388f" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orgb3c53c7" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1392,8 +1393,8 @@ via the <code>bord_vector</code> and the electron-electron rescale factor <code>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org4293935" class="outline-4">
|
||||
<h4 id="org4293935"><span class="section-number-4">2.1.3</span> Test</h4>
|
||||
<div id="outline-container-orgd100587" class="outline-4">
|
||||
<h4 id="orgd100587"><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: #0000ff;">assert</span>(<span style="color: #228b22;">qmckl_electron_provided</span>(<span style="color: #a0522d;">context</span>));
|
||||
@ -1445,8 +1446,8 @@ rc = qmckl_get_jastrow_asymp_jasb(context, asymp_jasb);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge66f956" class="outline-3">
|
||||
<h3 id="orge66f956"><span class="section-number-3">2.2</span> Electron-electron component \(f_{ee}\)</h3>
|
||||
<div id="outline-container-org6e9c3a0" class="outline-3">
|
||||
<h3 id="org6e9c3a0"><span class="section-number-3">2.2</span> Electron-electron component \(f_{ee}\)</h3>
|
||||
<div class="outline-text-3" id="text-2-2">
|
||||
<p>
|
||||
Calculate the electron-electron jastrow component <code>factor_ee</code> using the <code>asymp_jasb</code>
|
||||
@ -1461,8 +1462,8 @@ f_{ee} = \sum_{i,j<i} \left\{ \frac{ \eta B_0 C_{ij}}{1 - B_1 C_{ij}} - J_{asym
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org96c6fa1" class="outline-4">
|
||||
<h4 id="org96c6fa1"><span class="section-number-4">2.2.1</span> Get</h4>
|
||||
<div id="outline-container-orgea718bc" class="outline-4">
|
||||
<h4 id="orgea718bc"><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_jastrow_factor_ee</span>(<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #228b22;">double</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">factor_ee</span>);
|
||||
@ -1471,10 +1472,10 @@ f_{ee} = \sum_{i,j<i} \left\{ \frac{ \eta B_0 C_{ij}}{1 - B_1 C_{ij}} - J_{asym
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org9f6183b" class="outline-4">
|
||||
<h4 id="org9f6183b"><span class="section-number-4">2.2.2</span> Compute</h4>
|
||||
<div id="outline-container-orgfd88c3e" class="outline-4">
|
||||
<h4 id="orgfd88c3e"><span class="section-number-4">2.2.2</span> Compute</h4>
|
||||
<div class="outline-text-4" id="text-2-2-2">
|
||||
<table id="org7bb5726" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orgabb8946" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1649,8 +1650,8 @@ f_{ee} = \sum_{i,j<i} \left\{ \frac{ \eta B_0 C_{ij}}{1 - B_1 C_{ij}} - J_{asym
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-orgeb911c1" class="outline-4">
|
||||
<h4 id="orgeb911c1"><span class="section-number-4">2.2.3</span> Test</h4>
|
||||
<div id="outline-container-orgb07e5bb" class="outline-4">
|
||||
<h4 id="orgb07e5bb"><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;">Check if Jastrow is properly initialized </span>*/
|
||||
@ -1668,8 +1669,8 @@ rc = qmckl_get_jastrow_factor_ee(context, factor_ee);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd054289" class="outline-3">
|
||||
<h3 id="orgd054289"><span class="section-number-3">2.3</span> Electron-electron component derivative \(f'_{ee}\)</h3>
|
||||
<div id="outline-container-org033344c" class="outline-3">
|
||||
<h3 id="org033344c"><span class="section-number-3">2.3</span> Electron-electron component derivative \(f'_{ee}\)</h3>
|
||||
<div class="outline-text-3" id="text-2-3">
|
||||
<p>
|
||||
Calculate the derivative of the <code>factor_ee</code> using the <code>ee_distance_rescaled</code> and
|
||||
@ -1684,8 +1685,8 @@ TODO: Add equation
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org3f02be4" class="outline-4">
|
||||
<h4 id="org3f02be4"><span class="section-number-4">2.3.1</span> Get</h4>
|
||||
<div id="outline-container-orgfdc3a2f" class="outline-4">
|
||||
<h4 id="orgfdc3a2f"><span class="section-number-4">2.3.1</span> Get</h4>
|
||||
<div class="outline-text-4" id="text-2-3-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_jastrow_factor_ee_deriv_e</span>(<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #228b22;">double</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">factor_ee_deriv_e</span>);
|
||||
@ -1694,10 +1695,10 @@ TODO: Add equation
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6f3a522" class="outline-4">
|
||||
<h4 id="org6f3a522"><span class="section-number-4">2.3.2</span> Compute</h4>
|
||||
<div id="outline-container-org26dc70a" class="outline-4">
|
||||
<h4 id="org26dc70a"><span class="section-number-4">2.3.2</span> Compute</h4>
|
||||
<div class="outline-text-4" id="text-2-3-2">
|
||||
<table id="orgda094bb" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org2a8b8bc" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1912,8 +1913,8 @@ TODO: Add equation
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-orgf4883d0" class="outline-4">
|
||||
<h4 id="orgf4883d0"><span class="section-number-4">2.3.3</span> Test</h4>
|
||||
<div id="outline-container-orgb7a7071" class="outline-4">
|
||||
<h4 id="orgb7a7071"><span class="section-number-4">2.3.3</span> Test</h4>
|
||||
<div class="outline-text-4" id="text-2-3-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">/* <span style="color: #b22222;">Check if Jastrow is properly initialized </span>*/
|
||||
@ -1935,8 +1936,8 @@ rc = qmckl_get_jastrow_factor_ee_deriv_e(context, &(factor_ee_deriv_e[0][0][
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org9dce4b1" class="outline-3">
|
||||
<h3 id="org9dce4b1"><span class="section-number-3">2.4</span> Electron-nucleus component \(f_{en}\)</h3>
|
||||
<div id="outline-container-org28c7876" class="outline-3">
|
||||
<h3 id="org28c7876"><span class="section-number-3">2.4</span> Electron-nucleus component \(f_{en}\)</h3>
|
||||
<div class="outline-text-3" id="text-2-4">
|
||||
<p>
|
||||
Calculate the electron-electron jastrow component <code>factor_en</code> using the <code>aord_vector</code>
|
||||
@ -1951,8 +1952,8 @@ f_{en} = \sum_{i,j<i} \left\{ \frac{ A_0 C_{ij}}{1 - A_1 C_{ij}} + \sum^{nord}_{
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-orgc73e2c2" class="outline-4">
|
||||
<h4 id="orgc73e2c2"><span class="section-number-4">2.4.1</span> Get</h4>
|
||||
<div id="outline-container-org8cfa20f" class="outline-4">
|
||||
<h4 id="org8cfa20f"><span class="section-number-4">2.4.1</span> Get</h4>
|
||||
<div class="outline-text-4" id="text-2-4-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_jastrow_factor_en</span>(<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #228b22;">double</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">factor_en</span>);
|
||||
@ -1961,10 +1962,10 @@ f_{en} = \sum_{i,j<i} \left\{ \frac{ A_0 C_{ij}}{1 - A_1 C_{ij}} + \sum^{nord}_{
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org8fb28d6" class="outline-4">
|
||||
<h4 id="org8fb28d6"><span class="section-number-4">2.4.2</span> Compute</h4>
|
||||
<div id="outline-container-org54c83f9" class="outline-4">
|
||||
<h4 id="org54c83f9"><span class="section-number-4">2.4.2</span> Compute</h4>
|
||||
<div class="outline-text-4" id="text-2-4-2">
|
||||
<table id="org01ce8e2" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org79867b6" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -2146,8 +2147,8 @@ f_{en} = \sum_{i,j<i} \left\{ \frac{ A_0 C_{ij}}{1 - A_1 C_{ij}} + \sum^{nord}_{
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org3e6c50d" class="outline-4">
|
||||
<h4 id="org3e6c50d"><span class="section-number-4">2.4.3</span> Test</h4>
|
||||
<div id="outline-container-org2e7d05b" class="outline-4">
|
||||
<h4 id="org2e7d05b"><span class="section-number-4">2.4.3</span> Test</h4>
|
||||
<div class="outline-text-4" id="text-2-4-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">/* <span style="color: #b22222;">Check if Jastrow is properly initialized </span>*/
|
||||
@ -2165,8 +2166,8 @@ rc = qmckl_get_jastrow_factor_en(context, factor_en);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge29d7a8" class="outline-3">
|
||||
<h3 id="orge29d7a8"><span class="section-number-3">2.5</span> Electron-nucleus component derivative \(f'_{en}\)</h3>
|
||||
<div id="outline-container-org9ad4fda" class="outline-3">
|
||||
<h3 id="org9ad4fda"><span class="section-number-3">2.5</span> Electron-nucleus component derivative \(f'_{en}\)</h3>
|
||||
<div class="outline-text-3" id="text-2-5">
|
||||
<p>
|
||||
Calculate the electron-electron jastrow component <code>factor_en_deriv_e</code> derivative
|
||||
@ -2179,8 +2180,8 @@ TODO: write equations.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgdd5482d" class="outline-4">
|
||||
<h4 id="orgdd5482d"><span class="section-number-4">2.5.1</span> Get</h4>
|
||||
<div id="outline-container-org130f1d0" class="outline-4">
|
||||
<h4 id="org130f1d0"><span class="section-number-4">2.5.1</span> Get</h4>
|
||||
<div class="outline-text-4" id="text-2-5-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_jastrow_factor_en_deriv_e</span>(<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #228b22;">double</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">factor_en_deriv_e</span>);
|
||||
@ -2189,10 +2190,10 @@ TODO: write equations.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgb0c3818" class="outline-4">
|
||||
<h4 id="orgb0c3818"><span class="section-number-4">2.5.2</span> Compute</h4>
|
||||
<div id="outline-container-orgc143776" class="outline-4">
|
||||
<h4 id="orgc143776"><span class="section-number-4">2.5.2</span> Compute</h4>
|
||||
<div class="outline-text-4" id="text-2-5-2">
|
||||
<table id="orgd8f4053" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orgfe9d971" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -2413,8 +2414,8 @@ TODO: write equations.
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org69bc096" class="outline-4">
|
||||
<h4 id="org69bc096"><span class="section-number-4">2.5.3</span> Test</h4>
|
||||
<div id="outline-container-orga67e421" class="outline-4">
|
||||
<h4 id="orga67e421"><span class="section-number-4">2.5.3</span> Test</h4>
|
||||
<div class="outline-text-4" id="text-2-5-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">/* <span style="color: #b22222;">Check if Jastrow is properly initialized </span>*/
|
||||
@ -2436,8 +2437,8 @@ rc = qmckl_get_jastrow_factor_en_deriv_e(context, &(factor_en_deriv_e[0][0][
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgb53276b" class="outline-3">
|
||||
<h3 id="orgb53276b"><span class="section-number-3">2.6</span> Electron-electron rescaled distances for each order</h3>
|
||||
<div id="outline-container-org46143cb" class="outline-3">
|
||||
<h3 id="org46143cb"><span class="section-number-3">2.6</span> Electron-electron rescaled distances for each order</h3>
|
||||
<div class="outline-text-3" id="text-2-6">
|
||||
<p>
|
||||
<code>een_rescaled_e</code> stores the table of the rescaled distances between all
|
||||
@ -2455,8 +2456,8 @@ where \(C_{ij}\) is the matrix of electron-electron distances.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org0bf75ba" class="outline-4">
|
||||
<h4 id="org0bf75ba"><span class="section-number-4">2.6.1</span> Get</h4>
|
||||
<div id="outline-container-org0de1768" class="outline-4">
|
||||
<h4 id="org0de1768"><span class="section-number-4">2.6.1</span> Get</h4>
|
||||
<div class="outline-text-4" id="text-2-6-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_jastrow_een_rescaled_e</span>(<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #228b22;">double</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">distance_rescaled</span>);
|
||||
@ -2465,10 +2466,10 @@ where \(C_{ij}\) is the matrix of electron-electron distances.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgac828d5" class="outline-4">
|
||||
<h4 id="orgac828d5"><span class="section-number-4">2.6.2</span> Compute</h4>
|
||||
<div id="outline-container-orgc16266f" class="outline-4">
|
||||
<h4 id="orgc16266f"><span class="section-number-4">2.6.2</span> Compute</h4>
|
||||
<div class="outline-text-4" id="text-2-6-2">
|
||||
<table id="org32f4361" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orgd001271" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -2642,8 +2643,8 @@ where \(C_{ij}\) is the matrix of electron-electron distances.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf6287a2" class="outline-4">
|
||||
<h4 id="orgf6287a2"><span class="section-number-4">2.6.3</span> Test</h4>
|
||||
<div id="outline-container-org94e75f8" class="outline-4">
|
||||
<h4 id="org94e75f8"><span class="section-number-4">2.6.3</span> Test</h4>
|
||||
<div class="outline-text-4" id="text-2-6-3">
|
||||
<div class="org-src-container">
|
||||
<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>));
|
||||
@ -2666,8 +2667,8 @@ rc = qmckl_get_jastrow_een_rescaled_e(context, &(een_rescaled_e[0][0][0][0])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgcc3a000" class="outline-3">
|
||||
<h3 id="orgcc3a000"><span class="section-number-3">2.7</span> Electron-electron rescaled distances for each order and derivatives</h3>
|
||||
<div id="outline-container-orgc85946f" class="outline-3">
|
||||
<h3 id="orgc85946f"><span class="section-number-3">2.7</span> Electron-electron rescaled distances for each order and derivatives</h3>
|
||||
<div class="outline-text-3" id="text-2-7">
|
||||
<p>
|
||||
<code>een_rescaled_e_deriv_e</code> stores the table of the derivatives of the
|
||||
@ -2682,8 +2683,8 @@ TODO: write formulae
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-orga84e9a1" class="outline-4">
|
||||
<h4 id="orga84e9a1"><span class="section-number-4">2.7.1</span> Get</h4>
|
||||
<div id="outline-container-org90162f7" class="outline-4">
|
||||
<h4 id="org90162f7"><span class="section-number-4">2.7.1</span> Get</h4>
|
||||
<div class="outline-text-4" id="text-2-7-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_jastrow_een_rescaled_e_deriv_e</span>(<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #228b22;">double</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">distance_rescaled</span>);
|
||||
@ -2692,10 +2693,10 @@ TODO: write formulae
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6cb28d2" class="outline-4">
|
||||
<h4 id="org6cb28d2"><span class="section-number-4">2.7.2</span> Compute</h4>
|
||||
<div id="outline-container-orgb925e8b" class="outline-4">
|
||||
<h4 id="orgb925e8b"><span class="section-number-4">2.7.2</span> Compute</h4>
|
||||
<div class="outline-text-4" id="text-2-7-2">
|
||||
<table id="org370aec8" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orga1c88c5" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -2882,8 +2883,8 @@ TODO: write formulae
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org17d4635" class="outline-4">
|
||||
<h4 id="org17d4635"><span class="section-number-4">2.7.3</span> Test</h4>
|
||||
<div id="outline-container-org078a59d" class="outline-4">
|
||||
<h4 id="org078a59d"><span class="section-number-4">2.7.3</span> Test</h4>
|
||||
<div class="outline-text-4" id="text-2-7-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">//<span style="color: #b22222;">assert(qmckl_electron_provided(context));</span>
|
||||
@ -2903,8 +2904,8 @@ rc = qmckl_get_jastrow_een_rescaled_e_deriv_e(context, &(een_rescaled_e_deri
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org30e036a" class="outline-3">
|
||||
<h3 id="org30e036a"><span class="section-number-3">2.8</span> Electron-nucleus rescaled distances for each order</h3>
|
||||
<div id="outline-container-orga17ad07" class="outline-3">
|
||||
<h3 id="orga17ad07"><span class="section-number-3">2.8</span> Electron-nucleus rescaled distances for each order</h3>
|
||||
<div class="outline-text-3" id="text-2-8">
|
||||
<p>
|
||||
<code>een_rescaled_n</code> stores the table of the rescaled distances between
|
||||
@ -2922,8 +2923,8 @@ where \(C_{ia}\) is the matrix of electron-nucleus distances.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgdb2a3b3" class="outline-4">
|
||||
<h4 id="orgdb2a3b3"><span class="section-number-4">2.8.1</span> Get</h4>
|
||||
<div id="outline-container-org50e6386" class="outline-4">
|
||||
<h4 id="org50e6386"><span class="section-number-4">2.8.1</span> Get</h4>
|
||||
<div class="outline-text-4" id="text-2-8-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_jastrow_een_rescaled_n</span>(<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #228b22;">double</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">distance_rescaled</span>);
|
||||
@ -2932,10 +2933,10 @@ where \(C_{ia}\) is the matrix of electron-nucleus distances.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgeab1d30" class="outline-4">
|
||||
<h4 id="orgeab1d30"><span class="section-number-4">2.8.2</span> Compute</h4>
|
||||
<div id="outline-container-org0fcf848" class="outline-4">
|
||||
<h4 id="org0fcf848"><span class="section-number-4">2.8.2</span> Compute</h4>
|
||||
<div class="outline-text-4" id="text-2-8-2">
|
||||
<table id="orgba2e76d" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org76d3706" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -3099,8 +3100,8 @@ where \(C_{ia}\) is the matrix of electron-nucleus distances.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf564f56" class="outline-4">
|
||||
<h4 id="orgf564f56"><span class="section-number-4">2.8.3</span> Test</h4>
|
||||
<div id="outline-container-org508eb4d" class="outline-4">
|
||||
<h4 id="org508eb4d"><span class="section-number-4">2.8.3</span> Test</h4>
|
||||
<div class="outline-text-4" id="text-2-8-3">
|
||||
<div class="org-src-container">
|
||||
<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>));
|
||||
@ -3122,8 +3123,8 @@ rc = qmckl_get_jastrow_een_rescaled_n(context, &(een_rescaled_n[0][0][0][0])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org76fc9fd" class="outline-3">
|
||||
<h3 id="org76fc9fd"><span class="section-number-3">2.9</span> Electron-nucleus rescaled distances for each order and derivatives</h3>
|
||||
<div id="outline-container-org0e2a6c9" class="outline-3">
|
||||
<h3 id="org0e2a6c9"><span class="section-number-3">2.9</span> Electron-nucleus rescaled distances for each order and derivatives</h3>
|
||||
<div class="outline-text-3" id="text-2-9">
|
||||
<p>
|
||||
<code>een_rescaled_n_deriv_e</code> stores the table of the rescaled distances between
|
||||
@ -3132,8 +3133,8 @@ electrons and nucleii raised to the power \(p\) defined by <code>cord_num</code>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org07035e9" class="outline-4">
|
||||
<h4 id="org07035e9"><span class="section-number-4">2.9.1</span> Get</h4>
|
||||
<div id="outline-container-orgafaf3a9" class="outline-4">
|
||||
<h4 id="orgafaf3a9"><span class="section-number-4">2.9.1</span> Get</h4>
|
||||
<div class="outline-text-4" id="text-2-9-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_jastrow_een_rescaled_n_deriv_e</span>(<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #228b22;">double</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">distance_rescaled</span>);
|
||||
@ -3142,10 +3143,10 @@ electrons and nucleii raised to the power \(p\) defined by <code>cord_num</code>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgb7873dd" class="outline-4">
|
||||
<h4 id="orgb7873dd"><span class="section-number-4">2.9.2</span> Compute</h4>
|
||||
<div id="outline-container-orgd0e553c" class="outline-4">
|
||||
<h4 id="orgd0e553c"><span class="section-number-4">2.9.2</span> Compute</h4>
|
||||
<div class="outline-text-4" id="text-2-9-2">
|
||||
<table id="org0f48b21" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org5bfb64a" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -3355,8 +3356,8 @@ electrons and nucleii raised to the power \(p\) defined by <code>cord_num</code>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgfd715cf" class="outline-4">
|
||||
<h4 id="orgfd715cf"><span class="section-number-4">2.9.3</span> Test</h4>
|
||||
<div id="outline-container-orge6676fd" class="outline-4">
|
||||
<h4 id="orge6676fd"><span class="section-number-4">2.9.3</span> Test</h4>
|
||||
<div class="outline-text-4" id="text-2-9-3">
|
||||
<div class="org-src-container">
|
||||
<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>));
|
||||
@ -3378,8 +3379,8 @@ rc = qmckl_get_jastrow_een_rescaled_n_deriv_e(context, &(een_rescaled_n_deri
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgbf3004c" class="outline-3">
|
||||
<h3 id="orgbf3004c"><span class="section-number-3">2.10</span> Prepare for electron-electron-nucleus Jastrow \(f_{een}\)</h3>
|
||||
<div id="outline-container-org5702b88" class="outline-3">
|
||||
<h3 id="org5702b88"><span class="section-number-3">2.10</span> Prepare for electron-electron-nucleus Jastrow \(f_{een}\)</h3>
|
||||
<div class="outline-text-3" id="text-2-10">
|
||||
<p>
|
||||
Prepare <code>cord_vect_full</code> and <code>lkpm_combined_index</code> tables required for the
|
||||
@ -3388,8 +3389,8 @@ calculation of the three-body jastrow <code>factor_een</code> and its derivative
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgeb2fe3a" class="outline-4">
|
||||
<h4 id="orgeb2fe3a"><span class="section-number-4">2.10.1</span> Get</h4>
|
||||
<div id="outline-container-orgff28a38" class="outline-4">
|
||||
<h4 id="orgff28a38"><span class="section-number-4">2.10.1</span> Get</h4>
|
||||
<div class="outline-text-4" id="text-2-10-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_jastrow_dim_cord_vect</span>(<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #228b22;">int64_t</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">dim_cord_vect</span>);
|
||||
@ -3402,10 +3403,10 @@ calculation of the three-body jastrow <code>factor_een</code> and its derivative
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6e6c79c" class="outline-4">
|
||||
<h4 id="org6e6c79c"><span class="section-number-4">2.10.2</span> Compute dim<sub>cord</sub><sub>vect</sub></h4>
|
||||
<div id="outline-container-orga14d55b" class="outline-4">
|
||||
<h4 id="orga14d55b"><span class="section-number-4">2.10.2</span> Compute dim<sub>cord</sub><sub>vect</sub></h4>
|
||||
<div class="outline-text-4" id="text-2-10-2">
|
||||
<table id="orgaa2b3c8" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org333f1b5" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -3503,10 +3504,10 @@ calculation of the three-body jastrow <code>factor_een</code> and its derivative
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org8bb5f60" class="outline-4">
|
||||
<h4 id="org8bb5f60"><span class="section-number-4">2.10.3</span> Compute cord<sub>vect</sub><sub>full</sub></h4>
|
||||
<div id="outline-container-orgfdb2a95" class="outline-4">
|
||||
<h4 id="orgfdb2a95"><span class="section-number-4">2.10.3</span> Compute cord<sub>vect</sub><sub>full</sub></h4>
|
||||
<div class="outline-text-4" id="text-2-10-3">
|
||||
<table id="org46327cc" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orge6c1bb9" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -3640,10 +3641,10 @@ calculation of the three-body jastrow <code>factor_een</code> and its derivative
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org2bd2af9" class="outline-4">
|
||||
<h4 id="org2bd2af9"><span class="section-number-4">2.10.4</span> Compute lkpm<sub>combined</sub><sub>index</sub></h4>
|
||||
<div id="outline-container-orgcefc094" class="outline-4">
|
||||
<h4 id="orgcefc094"><span class="section-number-4">2.10.4</span> Compute lkpm<sub>combined</sub><sub>index</sub></h4>
|
||||
<div class="outline-text-4" id="text-2-10-4">
|
||||
<table id="org930ac24" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orgf28a25b" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -3761,10 +3762,10 @@ calculation of the three-body jastrow <code>factor_een</code> and its derivative
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-orgdc70199" class="outline-4">
|
||||
<h4 id="orgdc70199"><span class="section-number-4">2.10.5</span> Compute tmp<sub>c</sub></h4>
|
||||
<div id="outline-container-orgf6b6b5f" class="outline-4">
|
||||
<h4 id="orgf6b6b5f"><span class="section-number-4">2.10.5</span> Compute tmp<sub>c</sub></h4>
|
||||
<div class="outline-text-4" id="text-2-10-5">
|
||||
<table id="org6a7c85d" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org36fea68" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -3959,10 +3960,10 @@ calculation of the three-body jastrow <code>factor_een</code> and its derivative
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org73d6a07" class="outline-4">
|
||||
<h4 id="org73d6a07"><span class="section-number-4">2.10.6</span> Compute dtmp<sub>c</sub></h4>
|
||||
<div id="outline-container-org14e546e" class="outline-4">
|
||||
<h4 id="org14e546e"><span class="section-number-4">2.10.6</span> Compute dtmp<sub>c</sub></h4>
|
||||
<div class="outline-text-4" id="text-2-10-6">
|
||||
<table id="org8c62deb" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org2644d1c" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -4150,8 +4151,8 @@ calculation of the three-body jastrow <code>factor_een</code> and its derivative
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org9fa10b7" class="outline-4">
|
||||
<h4 id="org9fa10b7"><span class="section-number-4">2.10.7</span> Test</h4>
|
||||
<div id="outline-container-orgf9b9605" class="outline-4">
|
||||
<h4 id="orgf9b9605"><span class="section-number-4">2.10.7</span> Test</h4>
|
||||
<div class="outline-text-4" id="text-2-10-7">
|
||||
<div class="org-src-container">
|
||||
<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>));
|
||||
@ -4171,8 +4172,8 @@ rc = qmckl_get_jastrow_dtmp_c(context, &(dtmp_c[0][0][0][0][0][0]));
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd9c9cfe" class="outline-3">
|
||||
<h3 id="orgd9c9cfe"><span class="section-number-3">2.11</span> Electron-electron-nucleus Jastrow \(f_{een}\)</h3>
|
||||
<div id="outline-container-org77f58fa" class="outline-3">
|
||||
<h3 id="org77f58fa"><span class="section-number-3">2.11</span> Electron-electron-nucleus Jastrow \(f_{een}\)</h3>
|
||||
<div class="outline-text-3" id="text-2-11">
|
||||
<p>
|
||||
Calculate the electron-electron-nuclear three-body jastrow component <code>factor_een</code>
|
||||
@ -4184,8 +4185,8 @@ TODO: write equations.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orga540333" class="outline-4">
|
||||
<h4 id="orga540333"><span class="section-number-4">2.11.1</span> Get</h4>
|
||||
<div id="outline-container-orge170a94" class="outline-4">
|
||||
<h4 id="orge170a94"><span class="section-number-4">2.11.1</span> Get</h4>
|
||||
<div class="outline-text-4" id="text-2-11-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_jastrow_factor_een</span>(<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #228b22;">double</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">factor_een</span>);
|
||||
@ -4194,10 +4195,10 @@ TODO: write equations.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf1e4a7a" class="outline-4">
|
||||
<h4 id="orgf1e4a7a"><span class="section-number-4">2.11.2</span> Compute naive</h4>
|
||||
<div id="outline-container-orgdeb8236" class="outline-4">
|
||||
<h4 id="orgdeb8236"><span class="section-number-4">2.11.2</span> Compute naive</h4>
|
||||
<div class="outline-text-4" id="text-2-11-2">
|
||||
<table id="orge981ca8" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org5cda784" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -4393,10 +4394,10 @@ TODO: write equations.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org48d6e94" class="outline-4">
|
||||
<h4 id="org48d6e94"><span class="section-number-4">2.11.3</span> Compute</h4>
|
||||
<div id="outline-container-org5341211" class="outline-4">
|
||||
<h4 id="org5341211"><span class="section-number-4">2.11.3</span> Compute</h4>
|
||||
<div class="outline-text-4" id="text-2-11-3">
|
||||
<table id="org90e5549" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orgeb51589" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -4585,8 +4586,8 @@ TODO: write equations.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgc0d84b8" class="outline-4">
|
||||
<h4 id="orgc0d84b8"><span class="section-number-4">2.11.4</span> Test</h4>
|
||||
<div id="outline-container-orgc4f8f0f" class="outline-4">
|
||||
<h4 id="orgc4f8f0f"><span class="section-number-4">2.11.4</span> Test</h4>
|
||||
<div class="outline-text-4" id="text-2-11-4">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">/* <span style="color: #b22222;">Check if Jastrow is properly initialized </span>*/
|
||||
@ -4602,8 +4603,8 @@ rc = qmckl_get_jastrow_factor_een(context, &(factor_een[0]));
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org893ccbc" class="outline-3">
|
||||
<h3 id="org893ccbc"><span class="section-number-3">2.12</span> Electron-electron-nucleus Jastrow \(f_{een}\) derivative</h3>
|
||||
<div id="outline-container-org8a4699d" class="outline-3">
|
||||
<h3 id="org8a4699d"><span class="section-number-3">2.12</span> Electron-electron-nucleus Jastrow \(f_{een}\) derivative</h3>
|
||||
<div class="outline-text-3" id="text-2-12">
|
||||
<p>
|
||||
Calculate the electron-electron-nuclear three-body jastrow component <code>factor_een_deriv_e</code>
|
||||
@ -4615,8 +4616,8 @@ TODO: write equations.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf035e3c" class="outline-4">
|
||||
<h4 id="orgf035e3c"><span class="section-number-4">2.12.1</span> Get</h4>
|
||||
<div id="outline-container-orga076f74" class="outline-4">
|
||||
<h4 id="orga076f74"><span class="section-number-4">2.12.1</span> Get</h4>
|
||||
<div class="outline-text-4" id="text-2-12-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_jastrow_factor_een_deriv_e</span>(<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #228b22;">double</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">factor_een_deriv_e</span>);
|
||||
@ -4625,10 +4626,10 @@ TODO: write equations.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6d2f6d0" class="outline-4">
|
||||
<h4 id="org6d2f6d0"><span class="section-number-4">2.12.2</span> Compute Naive</h4>
|
||||
<div id="outline-container-orgdc1c9c4" class="outline-4">
|
||||
<h4 id="orgdc1c9c4"><span class="section-number-4">2.12.2</span> Compute Naive</h4>
|
||||
<div class="outline-text-4" id="text-2-12-2">
|
||||
<table id="orge4397b8" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orgda4a760" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -4861,10 +4862,10 @@ TODO: write equations.
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org0b24d1d" class="outline-4">
|
||||
<h4 id="org0b24d1d"><span class="section-number-4">2.12.3</span> Compute</h4>
|
||||
<div id="outline-container-orgcd0709b" class="outline-4">
|
||||
<h4 id="orgcd0709b"><span class="section-number-4">2.12.3</span> Compute</h4>
|
||||
<div class="outline-text-4" id="text-2-12-3">
|
||||
<table id="orgad202fa" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org667e03f" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -5090,8 +5091,8 @@ TODO: write equations.
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org152f76b" class="outline-4">
|
||||
<h4 id="org152f76b"><span class="section-number-4">2.12.4</span> Test</h4>
|
||||
<div id="outline-container-orgcfd80fc" class="outline-4">
|
||||
<h4 id="orgcfd80fc"><span class="section-number-4">2.12.4</span> Test</h4>
|
||||
<div class="outline-text-4" id="text-2-12-4">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">/* <span style="color: #b22222;">Check if Jastrow is properly initialized </span>*/
|
||||
@ -5110,7 +5111,7 @@ rc = qmckl_get_jastrow_factor_een_deriv_e(context, &(factor_een_deriv_e[0][0
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2022-01-21 Fri 07:53</p>
|
||||
<p class="date">Created: 2022-01-23 Sun 18:09</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>
|
||||
<!-- 2022-01-21 Fri 07:53 -->
|
||||
<!-- 2022-01-23 Sun 18:08 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Local Energy</title>
|
||||
@ -333,43 +333,43 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#orgbc32833">1. Context</a>
|
||||
<li><a href="#orgcf3eb5f">1. Context</a>
|
||||
<ul>
|
||||
<li><a href="#orgf86c7ce">1.1. Data structure</a></li>
|
||||
<li><a href="#org17afa1a">1.1. Data structure</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orga8fcde1">2. Computation</a>
|
||||
<li><a href="#org8ca21e9">2. Computation</a>
|
||||
<ul>
|
||||
<li><a href="#org9dab9a2">2.1. Kinetic energy</a>
|
||||
<li><a href="#orgf50f1e3">2.1. Kinetic energy</a>
|
||||
<ul>
|
||||
<li><a href="#org75c4eb4">2.1.1. Get</a></li>
|
||||
<li><a href="#org8d533bc">2.1.2. Provide</a></li>
|
||||
<li><a href="#org6a4676e">2.1.3. Compute kinetic enregy</a></li>
|
||||
<li><a href="#orgab4ad87">2.1.4. Test</a></li>
|
||||
<li><a href="#org58f326e">2.1.1. Get</a></li>
|
||||
<li><a href="#org0c0a41d">2.1.2. Provide</a></li>
|
||||
<li><a href="#org726d28d">2.1.3. Compute kinetic enregy</a></li>
|
||||
<li><a href="#orgf0955a3">2.1.4. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org19ae34f">2.2. Potential energy</a>
|
||||
<li><a href="#orgb705a05">2.2. Potential energy</a>
|
||||
<ul>
|
||||
<li><a href="#org4cdc88a">2.2.1. Get</a></li>
|
||||
<li><a href="#orgf019aff">2.2.2. Provide</a></li>
|
||||
<li><a href="#org62cee05">2.2.3. Compute potential enregy</a></li>
|
||||
<li><a href="#orge9cd55c">2.2.4. Test</a></li>
|
||||
<li><a href="#orgd487e5f">2.2.1. Get</a></li>
|
||||
<li><a href="#org0141936">2.2.2. Provide</a></li>
|
||||
<li><a href="#orgb81555e">2.2.3. Compute potential enregy</a></li>
|
||||
<li><a href="#org31e6352">2.2.4. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org4d1e7c0">2.3. Local energy</a>
|
||||
<li><a href="#orgf00ce84">2.3. Local energy</a>
|
||||
<ul>
|
||||
<li><a href="#org046cad0">2.3.1. Get</a></li>
|
||||
<li><a href="#org24d95f6">2.3.2. Provide</a></li>
|
||||
<li><a href="#org5e58f00">2.3.3. Compute local enregy</a></li>
|
||||
<li><a href="#orge62a8b8">2.3.4. Test</a></li>
|
||||
<li><a href="#orga712e13">2.3.1. Get</a></li>
|
||||
<li><a href="#org41c3f76">2.3.2. Provide</a></li>
|
||||
<li><a href="#org99278e6">2.3.3. Compute local enregy</a></li>
|
||||
<li><a href="#orgb8f2775">2.3.4. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org8a6d3f7">2.4. Drift vector</a>
|
||||
<li><a href="#orgba0a775">2.4. Drift vector</a>
|
||||
<ul>
|
||||
<li><a href="#org1e8439a">2.4.1. Get</a></li>
|
||||
<li><a href="#orgaeabbe8">2.4.2. Provide</a></li>
|
||||
<li><a href="#org70b876d">2.4.3. Compute drift vector</a></li>
|
||||
<li><a href="#orgb5d7d8d">2.4.4. Test</a></li>
|
||||
<li><a href="#org4aa1b6f">2.4.1. Get</a></li>
|
||||
<li><a href="#org43a0f62">2.4.2. Provide</a></li>
|
||||
<li><a href="#org6eb7a78">2.4.3. Compute drift vector</a></li>
|
||||
<li><a href="#org133fa5b">2.4.4. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@ -378,8 +378,8 @@ for the JavaScript code in this tag.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgbc32833" class="outline-2">
|
||||
<h2 id="orgbc32833"><span class="section-number-2">1</span> Context</h2>
|
||||
<div id="outline-container-orgcf3eb5f" class="outline-2">
|
||||
<h2 id="orgcf3eb5f"><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:
|
||||
@ -452,8 +452,8 @@ Computed data:
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf86c7ce" class="outline-3">
|
||||
<h3 id="orgf86c7ce"><span class="section-number-3">1.1</span> Data structure</h3>
|
||||
<div id="outline-container-org17afa1a" class="outline-3">
|
||||
<h3 id="org17afa1a"><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_local_energy_struct</span> {
|
||||
@ -488,12 +488,12 @@ this mechanism.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orga8fcde1" class="outline-2">
|
||||
<h2 id="orga8fcde1"><span class="section-number-2">2</span> Computation</h2>
|
||||
<div id="outline-container-org8ca21e9" class="outline-2">
|
||||
<h2 id="org8ca21e9"><span class="section-number-2">2</span> Computation</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
</div>
|
||||
<div id="outline-container-org9dab9a2" class="outline-3">
|
||||
<h3 id="org9dab9a2"><span class="section-number-3">2.1</span> Kinetic energy</h3>
|
||||
<div id="outline-container-orgf50f1e3" class="outline-3">
|
||||
<h3 id="orgf50f1e3"><span class="section-number-3">2.1</span> Kinetic energy</h3>
|
||||
<div class="outline-text-3" id="text-2-1">
|
||||
<p>
|
||||
Where the kinetic energy is given as:
|
||||
@ -517,8 +517,8 @@ case is given as follows:
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org75c4eb4" class="outline-4">
|
||||
<h4 id="org75c4eb4"><span class="section-number-4">2.1.1</span> Get</h4>
|
||||
<div id="outline-container-org58f326e" class="outline-4">
|
||||
<h4 id="org58f326e"><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_kinetic_energy</span>(<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #228b22;">double</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">kinetic_energy</span>);
|
||||
@ -527,14 +527,14 @@ case is given as follows:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org8d533bc" class="outline-4">
|
||||
<h4 id="org8d533bc"><span class="section-number-4">2.1.2</span> Provide</h4>
|
||||
<div id="outline-container-org0c0a41d" class="outline-4">
|
||||
<h4 id="org0c0a41d"><span class="section-number-4">2.1.2</span> Provide</h4>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6a4676e" class="outline-4">
|
||||
<h4 id="org6a4676e"><span class="section-number-4">2.1.3</span> Compute kinetic enregy</h4>
|
||||
<div id="outline-container-org726d28d" class="outline-4">
|
||||
<h4 id="org726d28d"><span class="section-number-4">2.1.3</span> Compute kinetic enregy</h4>
|
||||
<div class="outline-text-4" id="text-2-1-3">
|
||||
<table id="org8618610" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org7bd6908" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -763,12 +763,12 @@ case is given as follows:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgab4ad87" class="outline-4">
|
||||
<h4 id="orgab4ad87"><span class="section-number-4">2.1.4</span> Test</h4>
|
||||
<div id="outline-container-orgf0955a3" class="outline-4">
|
||||
<h4 id="orgf0955a3"><span class="section-number-4">2.1.4</span> Test</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-org19ae34f" class="outline-3">
|
||||
<h3 id="org19ae34f"><span class="section-number-3">2.2</span> Potential energy</h3>
|
||||
<div id="outline-container-orgb705a05" class="outline-3">
|
||||
<h3 id="orgb705a05"><span class="section-number-3">2.2</span> Potential energy</h3>
|
||||
<div class="outline-text-3" id="text-2-2">
|
||||
<p>
|
||||
The potential energy is the sum of all the following terms
|
||||
@ -804,8 +804,8 @@ contributions.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org4cdc88a" class="outline-4">
|
||||
<h4 id="org4cdc88a"><span class="section-number-4">2.2.1</span> Get</h4>
|
||||
<div id="outline-container-orgd487e5f" class="outline-4">
|
||||
<h4 id="orgd487e5f"><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_potential_energy</span>(<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #228b22;">double</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">potential_energy</span>);
|
||||
@ -814,14 +814,14 @@ contributions.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf019aff" class="outline-4">
|
||||
<h4 id="orgf019aff"><span class="section-number-4">2.2.2</span> Provide</h4>
|
||||
<div id="outline-container-org0141936" class="outline-4">
|
||||
<h4 id="org0141936"><span class="section-number-4">2.2.2</span> Provide</h4>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org62cee05" class="outline-4">
|
||||
<h4 id="org62cee05"><span class="section-number-4">2.2.3</span> Compute potential enregy</h4>
|
||||
<div id="outline-container-orgb81555e" class="outline-4">
|
||||
<h4 id="orgb81555e"><span class="section-number-4">2.2.3</span> Compute potential enregy</h4>
|
||||
<div class="outline-text-4" id="text-2-2-3">
|
||||
<table id="orge63a2e8" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org22adfae" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -949,12 +949,12 @@ contributions.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge9cd55c" class="outline-4">
|
||||
<h4 id="orge9cd55c"><span class="section-number-4">2.2.4</span> Test</h4>
|
||||
<div id="outline-container-org31e6352" class="outline-4">
|
||||
<h4 id="org31e6352"><span class="section-number-4">2.2.4</span> Test</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-org4d1e7c0" class="outline-3">
|
||||
<h3 id="org4d1e7c0"><span class="section-number-3">2.3</span> Local energy</h3>
|
||||
<div id="outline-container-orgf00ce84" class="outline-3">
|
||||
<h3 id="orgf00ce84"><span class="section-number-3">2.3</span> Local energy</h3>
|
||||
<div class="outline-text-3" id="text-2-3">
|
||||
<p>
|
||||
The local energy is the sum of kinetic and potential energies.
|
||||
@ -968,8 +968,8 @@ E_L = KE + PE
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org046cad0" class="outline-4">
|
||||
<h4 id="org046cad0"><span class="section-number-4">2.3.1</span> Get</h4>
|
||||
<div id="outline-container-orga712e13" class="outline-4">
|
||||
<h4 id="orga712e13"><span class="section-number-4">2.3.1</span> Get</h4>
|
||||
<div class="outline-text-4" id="text-2-3-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_local_energy</span>(<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #228b22;">double</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">local_energy</span>);
|
||||
@ -978,14 +978,14 @@ E_L = KE + PE
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org24d95f6" class="outline-4">
|
||||
<h4 id="org24d95f6"><span class="section-number-4">2.3.2</span> Provide</h4>
|
||||
<div id="outline-container-org41c3f76" class="outline-4">
|
||||
<h4 id="org41c3f76"><span class="section-number-4">2.3.2</span> Provide</h4>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org5e58f00" class="outline-4">
|
||||
<h4 id="org5e58f00"><span class="section-number-4">2.3.3</span> Compute local enregy</h4>
|
||||
<div id="outline-container-org99278e6" class="outline-4">
|
||||
<h4 id="org99278e6"><span class="section-number-4">2.3.3</span> Compute local enregy</h4>
|
||||
<div class="outline-text-4" id="text-2-3-3">
|
||||
<table id="org6eff665" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org92a7181" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1081,12 +1081,12 @@ E_L = KE + PE
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge62a8b8" class="outline-4">
|
||||
<h4 id="orge62a8b8"><span class="section-number-4">2.3.4</span> Test</h4>
|
||||
<div id="outline-container-orgb8f2775" class="outline-4">
|
||||
<h4 id="orgb8f2775"><span class="section-number-4">2.3.4</span> Test</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-org8a6d3f7" class="outline-3">
|
||||
<h3 id="org8a6d3f7"><span class="section-number-3">2.4</span> Drift vector</h3>
|
||||
<div id="outline-container-orgba0a775" class="outline-3">
|
||||
<h3 id="orgba0a775"><span class="section-number-3">2.4</span> Drift vector</h3>
|
||||
<div class="outline-text-3" id="text-2-4">
|
||||
<p>
|
||||
The drift vector is calculated as the ration of the gradient
|
||||
@ -1100,8 +1100,8 @@ with the determinant of the wavefunction.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org1e8439a" class="outline-4">
|
||||
<h4 id="org1e8439a"><span class="section-number-4">2.4.1</span> Get</h4>
|
||||
<div id="outline-container-org4aa1b6f" class="outline-4">
|
||||
<h4 id="org4aa1b6f"><span class="section-number-4">2.4.1</span> Get</h4>
|
||||
<div class="outline-text-4" id="text-2-4-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_drift_vector</span>(<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #228b22;">double</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">drift_vector</span>);
|
||||
@ -1110,14 +1110,14 @@ with the determinant of the wavefunction.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgaeabbe8" class="outline-4">
|
||||
<h4 id="orgaeabbe8"><span class="section-number-4">2.4.2</span> Provide</h4>
|
||||
<div id="outline-container-org43a0f62" class="outline-4">
|
||||
<h4 id="org43a0f62"><span class="section-number-4">2.4.2</span> Provide</h4>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org70b876d" class="outline-4">
|
||||
<h4 id="org70b876d"><span class="section-number-4">2.4.3</span> Compute drift vector</h4>
|
||||
<div id="outline-container-org6eb7a78" class="outline-4">
|
||||
<h4 id="org6eb7a78"><span class="section-number-4">2.4.3</span> Compute drift vector</h4>
|
||||
<div class="outline-text-4" id="text-2-4-3">
|
||||
<table id="org8c73d25" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org067b598" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1338,15 +1338,15 @@ with the determinant of the wavefunction.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgb5d7d8d" class="outline-4">
|
||||
<h4 id="orgb5d7d8d"><span class="section-number-4">2.4.4</span> Test</h4>
|
||||
<div id="outline-container-org133fa5b" class="outline-4">
|
||||
<h4 id="org133fa5b"><span class="section-number-4">2.4.4</span> Test</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2022-01-21 Fri 07:53</p>
|
||||
<p class="date">Created: 2022-01-23 Sun 18:08</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>
|
||||
<!-- 2022-01-21 Fri 07:53 -->
|
||||
<!-- 2022-01-23 Sun 18:08 -->
|
||||
<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="#orgf2b9860">1. Memory data structure for the context</a></li>
|
||||
<li><a href="#org6d3c33c">2. Passing info to allocation routines</a></li>
|
||||
<li><a href="#orgad1d2d6">3. Allocation/deallocation functions</a></li>
|
||||
<li><a href="#org955968f">1. Memory data structure for the context</a></li>
|
||||
<li><a href="#org13214fa">2. Passing info to allocation routines</a></li>
|
||||
<li><a href="#org13844c1">3. Allocation/deallocation functions</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf2b9860" class="outline-2">
|
||||
<h2 id="orgf2b9860"><span class="section-number-2">1</span> Memory data structure for the context</h2>
|
||||
<div id="outline-container-org955968f" class="outline-2">
|
||||
<h2 id="org955968f"><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-org6d3c33c" class="outline-2">
|
||||
<h2 id="org6d3c33c"><span class="section-number-2">2</span> Passing info to allocation routines</h2>
|
||||
<div id="outline-container-org13214fa" class="outline-2">
|
||||
<h2 id="org13214fa"><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-orgad1d2d6" class="outline-2">
|
||||
<h2 id="orgad1d2d6"><span class="section-number-2">3</span> Allocation/deallocation functions</h2>
|
||||
<div id="outline-container-org13844c1" class="outline-2">
|
||||
<h2 id="org13844c1"><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: 2022-01-21 Fri 07:53</p>
|
||||
<p class="date">Created: 2022-01-23 Sun 18:08</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>
|
||||
<!-- 2022-01-21 Fri 07:53 -->
|
||||
<!-- 2022-01-23 Sun 18:08 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Molecular Orbitals</title>
|
||||
@ -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="#org477d06b">1. Context</a>
|
||||
<li><a href="#orgcb3232c">1. Context</a>
|
||||
<ul>
|
||||
<li><a href="#orgd3e5d78">1.1. Data structure</a></li>
|
||||
<li><a href="#org79512bf">1.2. Access functions</a></li>
|
||||
<li><a href="#orgf736025">1.3. Initialization functions</a></li>
|
||||
<li><a href="#orgb10f2a0">1.1. Data structure</a></li>
|
||||
<li><a href="#orgda732d8">1.2. Access functions</a></li>
|
||||
<li><a href="#org0c31611">1.3. Initialization functions</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org0b1019e">2. Computation</a>
|
||||
<li><a href="#org2c4e9a8">2. Computation</a>
|
||||
<ul>
|
||||
<li><a href="#org3a17dd3">2.1. Computation of MOs</a>
|
||||
<li><a href="#org10585aa">2.1. Computation of MOs</a>
|
||||
<ul>
|
||||
<li><a href="#org27bd7af">2.1.1. Get</a></li>
|
||||
<li><a href="#org95ea42c">2.1.2. Provide</a></li>
|
||||
<li><a href="#orgadab0b6">2.1.3. Compute</a></li>
|
||||
<li><a href="#org3633f3d">2.1.4. Test</a></li>
|
||||
<li><a href="#org1287989">2.1.1. Get</a></li>
|
||||
<li><a href="#org4055f3b">2.1.2. Provide</a></li>
|
||||
<li><a href="#org004b809">2.1.3. Compute</a></li>
|
||||
<li><a href="#orgeffb259">2.1.4. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@ -334,8 +334,8 @@ for the JavaScript code in this tag.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org477d06b" class="outline-2">
|
||||
<h2 id="org477d06b"><span class="section-number-2">1</span> Context</h2>
|
||||
<div id="outline-container-orgcb3232c" class="outline-2">
|
||||
<h2 id="orgcb3232c"><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:
|
||||
@ -397,8 +397,8 @@ Computed data:
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd3e5d78" class="outline-3">
|
||||
<h3 id="orgd3e5d78"><span class="section-number-3">1.1</span> Data structure</h3>
|
||||
<div id="outline-container-orgb10f2a0" class="outline-3">
|
||||
<h3 id="orgb10f2a0"><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_mo_basis_struct</span> {
|
||||
@ -447,8 +447,8 @@ this mechanism.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org79512bf" class="outline-3">
|
||||
<h3 id="org79512bf"><span class="section-number-3">1.2</span> Access functions</h3>
|
||||
<div id="outline-container-orgda732d8" class="outline-3">
|
||||
<h3 id="orgda732d8"><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
|
||||
@ -462,8 +462,8 @@ function returns <code>true</code>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf736025" class="outline-3">
|
||||
<h3 id="orgf736025"><span class="section-number-3">1.3</span> Initialization functions</h3>
|
||||
<div id="outline-container-org0c31611" class="outline-3">
|
||||
<h3 id="org0c31611"><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
|
||||
@ -484,16 +484,16 @@ computed to accelerate the calculations.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org0b1019e" class="outline-2">
|
||||
<h2 id="org0b1019e"><span class="section-number-2">2</span> Computation</h2>
|
||||
<div id="outline-container-org2c4e9a8" class="outline-2">
|
||||
<h2 id="org2c4e9a8"><span class="section-number-2">2</span> Computation</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
</div>
|
||||
<div id="outline-container-org3a17dd3" class="outline-3">
|
||||
<h3 id="org3a17dd3"><span class="section-number-3">2.1</span> Computation of MOs</h3>
|
||||
<div id="outline-container-org10585aa" class="outline-3">
|
||||
<h3 id="org10585aa"><span class="section-number-3">2.1</span> Computation of MOs</h3>
|
||||
<div class="outline-text-3" id="text-2-1">
|
||||
</div>
|
||||
<div id="outline-container-org27bd7af" class="outline-4">
|
||||
<h4 id="org27bd7af"><span class="section-number-4">2.1.1</span> Get</h4>
|
||||
<div id="outline-container-org1287989" class="outline-4">
|
||||
<h4 id="org1287989"><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_mo_basis_vgl</span>(<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #228b22;">double</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">mo_vgl</span>);
|
||||
@ -502,14 +502,14 @@ computed to accelerate the calculations.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org95ea42c" class="outline-4">
|
||||
<h4 id="org95ea42c"><span class="section-number-4">2.1.2</span> Provide</h4>
|
||||
<div id="outline-container-org4055f3b" class="outline-4">
|
||||
<h4 id="org4055f3b"><span class="section-number-4">2.1.2</span> Provide</h4>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgadab0b6" class="outline-4">
|
||||
<h4 id="orgadab0b6"><span class="section-number-4">2.1.3</span> Compute</h4>
|
||||
<div id="outline-container-org004b809" class="outline-4">
|
||||
<h4 id="org004b809"><span class="section-number-4">2.1.3</span> Compute</h4>
|
||||
<div class="outline-text-4" id="text-2-1-3">
|
||||
<table id="org5be9ec8" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org6cb8f10" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -667,15 +667,15 @@ computed to accelerate the calculations.
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org3633f3d" class="outline-4">
|
||||
<h4 id="org3633f3d"><span class="section-number-4">2.1.4</span> Test</h4>
|
||||
<div id="outline-container-orgeffb259" class="outline-4">
|
||||
<h4 id="orgeffb259"><span class="section-number-4">2.1.4</span> Test</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2022-01-21 Fri 07:53</p>
|
||||
<p class="date">Created: 2022-01-23 Sun 18:08</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>
|
||||
<!-- 2022-01-21 Fri 07:53 -->
|
||||
<!-- 2022-01-23 Sun 18:09 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Nucleus</title>
|
||||
@ -333,35 +333,35 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org7b68581">1. Context</a>
|
||||
<li><a href="#orgf997c24">1. Context</a>
|
||||
<ul>
|
||||
<li><a href="#orgdc46c60">1.1. Data structure</a></li>
|
||||
<li><a href="#orgaf3b3af">1.2. Access functions</a></li>
|
||||
<li><a href="#org6976ad8">1.3. Initialization functions</a></li>
|
||||
<li><a href="#orge5f0756">1.4. Test</a></li>
|
||||
<li><a href="#org0c4eaf4">1.1. Data structure</a></li>
|
||||
<li><a href="#orgdc3b6d6">1.2. Access functions</a></li>
|
||||
<li><a href="#org806994a">1.3. Initialization functions</a></li>
|
||||
<li><a href="#org7994866">1.4. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org35c496a">2. Computation</a>
|
||||
<li><a href="#org8d81564">2. Computation</a>
|
||||
<ul>
|
||||
<li><a href="#orge836ed8">2.1. Nucleus-nucleus distances</a>
|
||||
<li><a href="#org57c3d58">2.1. Nucleus-nucleus distances</a>
|
||||
<ul>
|
||||
<li><a href="#org03a0380">2.1.1. Get</a></li>
|
||||
<li><a href="#orgb8f0825">2.1.2. Compute</a></li>
|
||||
<li><a href="#org0a8fd60">2.1.3. Test</a></li>
|
||||
<li><a href="#orgd9d262f">2.1.1. Get</a></li>
|
||||
<li><a href="#org92800e9">2.1.2. Compute</a></li>
|
||||
<li><a href="#orgfbb5491">2.1.3. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgcf7790e">2.2. Nucleus-nucleus rescaled distances</a>
|
||||
<li><a href="#org2d9b785">2.2. Nucleus-nucleus rescaled distances</a>
|
||||
<ul>
|
||||
<li><a href="#org30f8d62">2.2.1. Get</a></li>
|
||||
<li><a href="#org3a448f1">2.2.2. Compute</a></li>
|
||||
<li><a href="#org52c3ca4">2.2.3. Test</a></li>
|
||||
<li><a href="#org7129fbc">2.2.1. Get</a></li>
|
||||
<li><a href="#orgbdfa490">2.2.2. Compute</a></li>
|
||||
<li><a href="#org82b203e">2.2.3. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgd91e249">2.3. Nuclear repulsion energy</a>
|
||||
<li><a href="#org29e7616">2.3. Nuclear repulsion energy</a>
|
||||
<ul>
|
||||
<li><a href="#orgc009cbf">2.3.1. Get</a></li>
|
||||
<li><a href="#org4ad06b1">2.3.2. Compute</a></li>
|
||||
<li><a href="#org4361851">2.3.3. Test</a></li>
|
||||
<li><a href="#org906c5ee">2.3.1. Get</a></li>
|
||||
<li><a href="#org3ceb39c">2.3.2. Compute</a></li>
|
||||
<li><a href="#org5434330">2.3.3. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@ -370,8 +370,8 @@ for the JavaScript code in this tag.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org7b68581" class="outline-2">
|
||||
<h2 id="org7b68581"><span class="section-number-2">1</span> Context</h2>
|
||||
<div id="outline-container-orgf997c24" class="outline-2">
|
||||
<h2 id="orgf997c24"><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:
|
||||
@ -408,13 +408,13 @@ The following data stored in the context:
|
||||
|
||||
<tr>
|
||||
<td class="org-left"><code>charge</code></td>
|
||||
<td class="org-left">double[num]</td>
|
||||
<td class="org-left">qmckl<sub>vector</sub></td>
|
||||
<td class="org-left">Nuclear charges</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left"><code>coord</code></td>
|
||||
<td class="org-left">double[3][num]</td>
|
||||
<td class="org-left">qmckl<sub>matrix</sub></td>
|
||||
<td class="org-left">Nuclear coordinates, in transposed format</td>
|
||||
</tr>
|
||||
|
||||
@ -449,7 +449,7 @@ Computed data:
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="org-left"><code>nn_distance</code></td>
|
||||
<td class="org-left">double[num][num]</td>
|
||||
<td class="org-left">qmckl<sub>matrix</sub></td>
|
||||
<td class="org-left">Nucleus-nucleus distances</td>
|
||||
</tr>
|
||||
|
||||
@ -461,7 +461,7 @@ Computed data:
|
||||
|
||||
<tr>
|
||||
<td class="org-left"><code>nn_distance_rescaled</code></td>
|
||||
<td class="org-left">double[num][num]</td>
|
||||
<td class="org-left">qmckl<sub>matrix</sub></td>
|
||||
<td class="org-left">Nucleus-nucleus rescaled distances</td>
|
||||
</tr>
|
||||
|
||||
@ -486,24 +486,24 @@ Computed data:
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgdc46c60" class="outline-3">
|
||||
<h3 id="orgdc46c60"><span class="section-number-3">1.1</span> Data structure</h3>
|
||||
<div id="outline-container-org0c4eaf4" class="outline-3">
|
||||
<h3 id="org0c4eaf4"><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> {
|
||||
<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">num</span>;
|
||||
<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">repulsion_date</span>;
|
||||
<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">nn_distance_date</span>;
|
||||
<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">nn_distance_rescaled_date</span>;
|
||||
<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">coord_date</span>;
|
||||
<span style="color: #228b22;">double</span>* <span style="color: #a0522d;">coord</span>;
|
||||
<span style="color: #228b22;">double</span>* <span style="color: #a0522d;">charge</span>;
|
||||
<span style="color: #228b22;">double</span>* <span style="color: #a0522d;">nn_distance</span>;
|
||||
<span style="color: #228b22;">double</span>* <span style="color: #a0522d;">nn_distance_rescaled</span>;
|
||||
<span style="color: #228b22;">double</span> <span style="color: #a0522d;">repulsion</span>;
|
||||
<span style="color: #228b22;">double</span> <span style="color: #a0522d;">rescale_factor_kappa</span>;
|
||||
<span style="color: #228b22;">int32_t</span> <span style="color: #a0522d;">uninitialized</span>;
|
||||
<span style="color: #228b22;">bool</span> <span style="color: #a0522d;">provided</span>;
|
||||
<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">num</span>;
|
||||
<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">repulsion_date</span>;
|
||||
<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">nn_distance_date</span>;
|
||||
<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">nn_distance_rescaled_date</span>;
|
||||
<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">coord_date</span>;
|
||||
<span style="color: #228b22;">qmckl_vector</span> <span style="color: #a0522d;">charge</span>;
|
||||
<span style="color: #228b22;">qmckl_matrix</span> <span style="color: #a0522d;">coord</span>;
|
||||
<span style="color: #228b22;">qmckl_matrix</span> <span style="color: #a0522d;">nn_distance</span>;
|
||||
<span style="color: #228b22;">qmckl_matrix</span> <span style="color: #a0522d;">nn_distance_rescaled</span>;
|
||||
<span style="color: #228b22;">double</span> <span style="color: #a0522d;">repulsion</span>;
|
||||
<span style="color: #228b22;">double</span> <span style="color: #a0522d;">rescale_factor_kappa</span>;
|
||||
<span style="color: #228b22;">int32_t</span> <span style="color: #a0522d;">uninitialized</span>;
|
||||
<span style="color: #228b22;">bool</span> <span style="color: #a0522d;">provided</span>;
|
||||
} <span style="color: #228b22;">qmckl_nucleus_struct</span>;
|
||||
|
||||
</pre>
|
||||
@ -545,8 +545,8 @@ this mechanism.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgaf3b3af" class="outline-3">
|
||||
<h3 id="orgaf3b3af"><span class="section-number-3">1.2</span> Access functions</h3>
|
||||
<div id="outline-container-orgdc3b6d6" class="outline-3">
|
||||
<h3 id="orgdc3b6d6"><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
|
||||
@ -560,8 +560,8 @@ function returns <code>true</code>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6976ad8" class="outline-3">
|
||||
<h3 id="org6976ad8"><span class="section-number-3">1.3</span> Initialization functions</h3>
|
||||
<div id="outline-container-org806994a" class="outline-3">
|
||||
<h3 id="org806994a"><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
|
||||
@ -569,35 +569,57 @@ following functions need to be called.
|
||||
</p>
|
||||
|
||||
<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;">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>);
|
||||
|
||||
<span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #0000ff;">qmckl_set_nucleus_rescale_factor</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;">rescale_factor_kappa</span>);
|
||||
<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>);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
To set the number of nuclei, use
|
||||
Sets the number of nuclei.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The following function sets the nuclear charges of all the atoms.
|
||||
</p>
|
||||
<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_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: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">size_max</span>);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
The following function sets the rescale parameter for the nuclear distances.
|
||||
Sets the nuclear charges of all the atoms.
|
||||
</p>
|
||||
|
||||
<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_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>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">size_max</span>);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
The following function sets the nuclear coordinates of all the
|
||||
atoms. The coordinates should be given in atomic units.
|
||||
Sets the nuclear coordinates of all the atoms. The coordinates
|
||||
are be given in atomic units.
|
||||
</p>
|
||||
|
||||
<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_rescale_factor</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;">kappa</span>);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Sets the rescale parameter for the nuclear distances.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge5f0756" class="outline-3">
|
||||
<h3 id="orge5f0756"><span class="section-number-3">1.4</span> Test</h3>
|
||||
<div id="outline-container-org7994866" class="outline-3">
|
||||
<h3 id="org7994866"><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: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">nucl_num</span> = chbrclf_nucl_num;
|
||||
@ -639,15 +661,15 @@ rc = qmckl_get_nucleus_rescale_factor (context, &k);
|
||||
|
||||
<span style="color: #228b22;">double</span> <span style="color: #a0522d;">nucl_coord2</span>[3*nucl_num];
|
||||
|
||||
rc = qmckl_get_nucleus_coord (context, <span style="color: #8b2252;">'T'</span>, nucl_coord2);
|
||||
rc = qmckl_get_nucleus_coord (context, <span style="color: #8b2252;">'T'</span>, nucl_coord2, 3*nucl_num);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_NOT_PROVIDED);
|
||||
|
||||
rc = qmckl_set_nucleus_coord (context, <span style="color: #8b2252;">'T'</span>, &(nucl_coord[0]));
|
||||
rc = qmckl_set_nucleus_coord (context, <span style="color: #8b2252;">'T'</span>, &(nucl_coord[0]), 3*nucl_num);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_SUCCESS);
|
||||
|
||||
assert(!qmckl_nucleus_provided(context));
|
||||
|
||||
rc = qmckl_get_nucleus_coord (context, <span style="color: #8b2252;">'N'</span>, nucl_coord2);
|
||||
rc = qmckl_get_nucleus_coord (context, <span style="color: #8b2252;">'N'</span>, nucl_coord2, 3*nucl_num);
|
||||
<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) {
|
||||
@ -655,7 +677,7 @@ rc = qmckl_get_nucleus_coord (context, <span style="color: #8b2252;">'N'</span>,
|
||||
}
|
||||
}
|
||||
|
||||
rc = qmckl_get_nucleus_coord (context, <span style="color: #8b2252;">'T'</span>, nucl_coord2);
|
||||
rc = qmckl_get_nucleus_coord (context, <span style="color: #8b2252;">'T'</span>, nucl_coord2, 3*nucl_num);
|
||||
<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] );
|
||||
@ -663,13 +685,13 @@ rc = qmckl_get_nucleus_coord (context, <span style="color: #8b2252;">'T'</span>,
|
||||
|
||||
<span style="color: #228b22;">double</span> <span style="color: #a0522d;">nucl_charge2</span>[nucl_num];
|
||||
|
||||
rc = qmckl_get_nucleus_charge(context, nucl_charge2);
|
||||
rc = qmckl_get_nucleus_charge(context, nucl_charge2, nucl_num);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_NOT_PROVIDED);
|
||||
|
||||
rc = qmckl_set_nucleus_charge(context, nucl_charge);
|
||||
rc = qmckl_set_nucleus_charge(context, nucl_charge, nucl_num);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_SUCCESS);
|
||||
|
||||
rc = qmckl_get_nucleus_charge(context, nucl_charge2);
|
||||
rc = qmckl_get_nucleus_charge(context, nucl_charge2, nucl_num);
|
||||
<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<nucl_num ; ++i) {
|
||||
assert( nucl_charge[i] == nucl_charge2[i] );
|
||||
@ -681,8 +703,8 @@ rc = qmckl_get_nucleus_charge(context, nucl_charge2);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org35c496a" class="outline-2">
|
||||
<h2 id="org35c496a"><span class="section-number-2">2</span> Computation</h2>
|
||||
<div id="outline-container-org8d81564" class="outline-2">
|
||||
<h2 id="org8d81564"><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
|
||||
@ -695,24 +717,27 @@ current date is stored.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge836ed8" class="outline-3">
|
||||
<h3 id="orge836ed8"><span class="section-number-3">2.1</span> Nucleus-nucleus distances</h3>
|
||||
<div id="outline-container-org57c3d58" class="outline-3">
|
||||
<h3 id="org57c3d58"><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-org03a0380" class="outline-4">
|
||||
<h4 id="org03a0380"><span class="section-number-4">2.1.1</span> Get</h4>
|
||||
<div id="outline-container-orgd9d262f" class="outline-4">
|
||||
<h4 id="orgd9d262f"><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>);
|
||||
<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>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">size_max</span>);
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgb8f0825" class="outline-4">
|
||||
<h4 id="orgb8f0825"><span class="section-number-4">2.1.2</span> Compute</h4>
|
||||
<div id="outline-container-org92800e9" class="outline-4">
|
||||
<h4 id="org92800e9"><span class="section-number-4">2.1.2</span> Compute</h4>
|
||||
<div class="outline-text-4" id="text-2-1-2">
|
||||
<table id="org0513927" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orgf96f282" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -790,8 +815,8 @@ current date is stored.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org0a8fd60" class="outline-4">
|
||||
<h4 id="org0a8fd60"><span class="section-number-4">2.1.3</span> Test</h4>
|
||||
<div id="outline-container-orgfbb5491" class="outline-4">
|
||||
<h4 id="orgfbb5491"><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>*/
|
||||
@ -799,7 +824,7 @@ current date is stored.
|
||||
<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>[nucl_num*nucl_num];
|
||||
rc = qmckl_get_nucleus_nn_distance(context, distance);
|
||||
rc = qmckl_get_nucleus_nn_distance(context, distance, nucl_num*nucl_num);
|
||||
<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[nucl_num]);
|
||||
<span style="color: #0000ff;">assert</span>(fabs(<span style="color: #228b22;">distance</span>[1]-2.070304721365169) < 1.e-12);
|
||||
@ -810,24 +835,27 @@ rc = qmckl_get_nucleus_nn_distance(context, distance);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgcf7790e" class="outline-3">
|
||||
<h3 id="orgcf7790e"><span class="section-number-3">2.2</span> Nucleus-nucleus rescaled distances</h3>
|
||||
<div id="outline-container-org2d9b785" class="outline-3">
|
||||
<h3 id="org2d9b785"><span class="section-number-3">2.2</span> Nucleus-nucleus rescaled distances</h3>
|
||||
<div class="outline-text-3" id="text-2-2">
|
||||
</div>
|
||||
<div id="outline-container-org30f8d62" class="outline-4">
|
||||
<h4 id="org30f8d62"><span class="section-number-4">2.2.1</span> Get</h4>
|
||||
<div id="outline-container-org7129fbc" class="outline-4">
|
||||
<h4 id="org7129fbc"><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_nn_distance_rescaled</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_rescaled</span>);
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span>
|
||||
<span style="color: #0000ff;">qmckl_get_nucleus_nn_distance_rescaled</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_rescaled</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">size_max</span>);
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org3a448f1" class="outline-4">
|
||||
<h4 id="org3a448f1"><span class="section-number-4">2.2.2</span> Compute</h4>
|
||||
<div id="outline-container-orgbdfa490" class="outline-4">
|
||||
<h4 id="orgbdfa490"><span class="section-number-4">2.2.2</span> Compute</h4>
|
||||
<div class="outline-text-4" id="text-2-2-2">
|
||||
<table id="orgca822d3" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org7b6f7a0" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -906,8 +934,8 @@ rc = qmckl_get_nucleus_nn_distance(context, distance);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org52c3ca4" class="outline-4">
|
||||
<h4 id="org52c3ca4"><span class="section-number-4">2.2.3</span> Test</h4>
|
||||
<div id="outline-container-org82b203e" class="outline-4">
|
||||
<h4 id="org82b203e"><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>*/
|
||||
@ -916,7 +944,7 @@ rc = qmckl_get_nucleus_nn_distance(context, distance);
|
||||
//<span style="color: #b22222;">assert(qmckl_nucleus_provided(context));</span>
|
||||
//
|
||||
//<span style="color: #b22222;">double distance[nucl_num*nucl_num];</span>
|
||||
//<span style="color: #b22222;">rc = qmckl_get_nucleus_nn_distance(context, distance);</span>
|
||||
//<span style="color: #b22222;">rc = qmckl_get_nucleus_nn_distance(context, distance, nucl_num*nucl_num);</span>
|
||||
//<span style="color: #b22222;">assert(distance[0] == 0.);</span>
|
||||
//<span style="color: #b22222;">assert(distance[1] == distance[nucl_num]);</span>
|
||||
//<span style="color: #b22222;">assert(fabs(distance[1]-2.070304721365169) < 1.e-12);</span>
|
||||
@ -927,8 +955,8 @@ rc = qmckl_get_nucleus_nn_distance(context, distance);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd91e249" class="outline-3">
|
||||
<h3 id="orgd91e249"><span class="section-number-3">2.3</span> Nuclear repulsion energy</h3>
|
||||
<div id="outline-container-org29e7616" class="outline-3">
|
||||
<h3 id="org29e7616"><span class="section-number-3">2.3</span> Nuclear repulsion energy</h3>
|
||||
<div class="outline-text-3" id="text-2-3">
|
||||
<p>
|
||||
\[
|
||||
@ -937,20 +965,20 @@ rc = qmckl_get_nucleus_nn_distance(context, distance);
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgc009cbf" class="outline-4">
|
||||
<h4 id="orgc009cbf"><span class="section-number-4">2.3.1</span> Get</h4>
|
||||
<div id="outline-container-org906c5ee" class="outline-4">
|
||||
<h4 id="org906c5ee"><span class="section-number-4">2.3.1</span> Get</h4>
|
||||
<div class="outline-text-4" id="text-2-3-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>);
|
||||
<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: #a020f0;">const</span> <span style="color: #a0522d;">energy</span>);
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org4ad06b1" class="outline-4">
|
||||
<h4 id="org4ad06b1"><span class="section-number-4">2.3.2</span> Compute</h4>
|
||||
<div id="outline-container-org3ceb39c" class="outline-4">
|
||||
<h4 id="org3ceb39c"><span class="section-number-4">2.3.2</span> Compute</h4>
|
||||
<div class="outline-text-4" id="text-2-3-2">
|
||||
<table id="orgf44abef" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org094b161" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1040,8 +1068,8 @@ rc = qmckl_get_nucleus_nn_distance(context, distance);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org4361851" class="outline-4">
|
||||
<h4 id="org4361851"><span class="section-number-4">2.3.3</span> Test</h4>
|
||||
<div id="outline-container-org5434330" class="outline-4">
|
||||
<h4 id="org5434330"><span class="section-number-4">2.3.3</span> Test</h4>
|
||||
<div class="outline-text-4" id="text-2-3-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">/* <span style="color: #b22222;">Reference input data </span>*/
|
||||
@ -1061,7 +1089,7 @@ rc = qmckl_get_nucleus_repulsion(context, &rep);
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2022-01-21 Fri 07:53</p>
|
||||
<p class="date">Created: 2022-01-23 Sun 18:09</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>
|
||||
<!-- 2022-01-21 Fri 07:53 -->
|
||||
<!-- 2022-01-23 Sun 18:08 -->
|
||||
<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="#orge54a132">1. Control of the numerical precision</a></li>
|
||||
<li><a href="#org6e376bc">2. Precision</a></li>
|
||||
<li><a href="#org525114f">3. Range</a></li>
|
||||
<li><a href="#orge1ce0e7">4. Helper functions</a></li>
|
||||
<li><a href="#org1843543">1. Control of the numerical precision</a></li>
|
||||
<li><a href="#orgdfe808c">2. Precision</a></li>
|
||||
<li><a href="#orgab76075">3. Range</a></li>
|
||||
<li><a href="#orgb4dfedb">4. Helper functions</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge54a132" class="outline-2">
|
||||
<h2 id="orge54a132"><span class="section-number-2">1</span> Control of the numerical precision</h2>
|
||||
<div id="outline-container-org1843543" class="outline-2">
|
||||
<h2 id="org1843543"><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="org34b00f0" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orgc86e7bd" 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-org6e376bc" class="outline-2">
|
||||
<h2 id="org6e376bc"><span class="section-number-2">2</span> Precision</h2>
|
||||
<div id="outline-container-orgdfe808c" class="outline-2">
|
||||
<h2 id="orgdfe808c"><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-org525114f" class="outline-2">
|
||||
<h2 id="org525114f"><span class="section-number-2">3</span> Range</h2>
|
||||
<div id="outline-container-orgab76075" class="outline-2">
|
||||
<h2 id="orgab76075"><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-orge1ce0e7" class="outline-2">
|
||||
<h2 id="orge1ce0e7"><span class="section-number-2">4</span> Helper functions</h2>
|
||||
<div id="outline-container-orgb4dfedb" class="outline-2">
|
||||
<h2 id="orgb4dfedb"><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: 2022-01-21 Fri 07:53</p>
|
||||
<p class="date">Created: 2022-01-23 Sun 18:08</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
351
qmckl_point.html
351
qmckl_point.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>
|
||||
<!-- 2022-01-21 Fri 07:53 -->
|
||||
<!-- 2022-01-23 Sun 18:08 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Point</title>
|
||||
@ -311,25 +311,25 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org427bbc9">1. Context</a>
|
||||
<li><a href="#org2aebd9e">1. Context</a>
|
||||
<ul>
|
||||
<li><a href="#orgec13eb2">1.1. Data structure</a></li>
|
||||
<li><a href="#org3c1fa96">1.2. Access functions</a>
|
||||
<li><a href="#org6ab2f9f">1.1. Data structure</a></li>
|
||||
<li><a href="#org67bfabc">1.2. Access functions</a>
|
||||
<ul>
|
||||
<li><a href="#orgdd67aab">1.2.1. Number of points</a></li>
|
||||
<li><a href="#orgd5db36f">1.2.2. Point coordinates</a></li>
|
||||
<li><a href="#org322bea8">1.2.1. Number of points</a></li>
|
||||
<li><a href="#org961d818">1.2.2. Point coordinates</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org06dbc7d">1.3. Initialization functions</a></li>
|
||||
<li><a href="#org64379bd">1.4. Test</a></li>
|
||||
<li><a href="#org3fda1b3">1.3. Initialization functions</a></li>
|
||||
<li><a href="#orge982be6">1.4. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org427bbc9" class="outline-2">
|
||||
<h2 id="org427bbc9"><span class="section-number-2">1</span> Context</h2>
|
||||
<div id="outline-container-org2aebd9e" class="outline-2">
|
||||
<h2 id="org2aebd9e"><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:
|
||||
@ -360,71 +360,26 @@ The following data stored in the context:
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left"><code>coord_x</code></td>
|
||||
<td class="org-left"><code>double[num]</code></td>
|
||||
<td class="org-left">X coordinates</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left"><code>coord_y</code></td>
|
||||
<td class="org-left"><code>double[num]</code></td>
|
||||
<td class="org-left">Y coordinates</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left"><code>coord_z</code></td>
|
||||
<td class="org-left"><code>double[num]</code></td>
|
||||
<td class="org-left">Z coordinates</td>
|
||||
<td class="org-left"><code>coord</code></td>
|
||||
<td class="org-left"><code>qmckl_matrix</code></td>
|
||||
<td class="org-left"><code>num</code> × 3 matrix3</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p>
|
||||
We consider that 'transposed' and 'normal' storage follows the convention:
|
||||
We consider that the matrix is stored 'transposed' and 'normal'
|
||||
corresponds to the 3 × <code>num</code> matrix.
|
||||
</p>
|
||||
|
||||
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
<col class="org-left" />
|
||||
|
||||
<col class="org-left" />
|
||||
|
||||
<col class="org-left" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="org-left"> </th>
|
||||
<th scope="col" class="org-left">Normal</th>
|
||||
<th scope="col" class="org-left">Transposed</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="org-left">C</td>
|
||||
<td class="org-left"><code>[point_num][3]</code></td>
|
||||
<td class="org-left"><code>[3][point_num]</code></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left">Fortran</td>
|
||||
<td class="org-left"><code>(3,point_num)</code></td>
|
||||
<td class="org-left"><code>(point_num,3)</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgec13eb2" class="outline-3">
|
||||
<h3 id="orgec13eb2"><span class="section-number-3">1.1</span> Data structure</h3>
|
||||
<div id="outline-container-org6ab2f9f" class="outline-3">
|
||||
<h3 id="org6ab2f9f"><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_point_struct</span> {
|
||||
<span style="color: #228b22;">double</span>* <span style="color: #a0522d;">coord_x</span>;
|
||||
<span style="color: #228b22;">double</span>* <span style="color: #a0522d;">coord_y</span>;
|
||||
<span style="color: #228b22;">double</span>* <span style="color: #a0522d;">coord_z</span>;
|
||||
<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">num</span>;
|
||||
<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">num</span>;
|
||||
<span style="color: #228b22;">qmckl_matrix</span> <span style="color: #a0522d;">coord</span>;
|
||||
} <span style="color: #228b22;">qmckl_point_struct</span>;
|
||||
|
||||
</pre>
|
||||
@ -463,8 +418,8 @@ We consider that 'transposed' and 'normal' storage follows the convention:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org3c1fa96" class="outline-3">
|
||||
<h3 id="org3c1fa96"><span class="section-number-3">1.2</span> Access functions</h3>
|
||||
<div id="outline-container-org67bfabc" class="outline-3">
|
||||
<h3 id="org67bfabc"><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
|
||||
@ -475,8 +430,8 @@ contains the requested data. Otherwise, this variable is untouched.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgdd67aab" class="outline-4">
|
||||
<h4 id="orgdd67aab"><span class="section-number-4">1.2.1</span> Number of points</h4>
|
||||
<div id="outline-container-org322bea8" class="outline-4">
|
||||
<h4 id="org322bea8"><span class="section-number-4">1.2.1</span> Number of points</h4>
|
||||
<div class="outline-text-4" id="text-1-2-1">
|
||||
<p>
|
||||
Returns the number of points stored in the context.
|
||||
@ -498,8 +453,8 @@ Returns the number of points stored in the context.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd5db36f" class="outline-4">
|
||||
<h4 id="orgd5db36f"><span class="section-number-4">1.2.2</span> Point coordinates</h4>
|
||||
<div id="outline-container-org961d818" class="outline-4">
|
||||
<h4 id="org961d818"><span class="section-number-4">1.2.2</span> Point coordinates</h4>
|
||||
<div class="outline-text-4" id="text-1-2-2">
|
||||
<p>
|
||||
Returns the point coordinates as sequences of (x,y,z).
|
||||
@ -509,50 +464,26 @@ The pointer is assumed to point on a memory block of size
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90"><span style="color: #a020f0;">interface</span>
|
||||
<span style="color: #228b22;">integer</span>(<span style="color: #008b8b;">c_int32_t</span>) <span style="color: #a020f0;">function</span> <span style="color: #0000ff;">qmckl_get_point</span>(context, coord, size_max) <span style="color: #a020f0;">bind</span>(C)
|
||||
<span style="color: #228b22;">integer</span>(<span style="color: #008b8b;">c_int32_t</span>) <span style="color: #a020f0;">function</span> <span style="color: #0000ff;">qmckl_get_point</span>(context, transp, coord, size_max) <span style="color: #a020f0;">bind</span>(C)
|
||||
<span style="color: #a020f0;">use</span>, <span style="color: #a020f0;">intrinsic</span> :: <span style="color: #0000ff;">iso_c_binding</span>
|
||||
<span style="color: #a020f0;">import</span>
|
||||
<span style="color: #a020f0;">implicit</span> <span style="color: #228b22;">none</span>
|
||||
|
||||
<span style="color: #228b22;">integer</span> (<span style="color: #008b8b;">c_int64_t</span>) , <span style="color: #a020f0;">intent</span>(in) , <span style="color: #a020f0;">value</span> ::<span style="color: #a0522d;"> context</span>
|
||||
<span style="color: #228b22;">character</span>(<span style="color: #008b8b;">c_char</span>) , <span style="color: #a020f0;">intent</span>(in) , <span style="color: #a020f0;">value</span> ::<span style="color: #a0522d;"> transp</span>
|
||||
<span style="color: #228b22;">real</span> (<span style="color: #008b8b;">c_double</span> ) , <span style="color: #a020f0;">intent</span>(out) ::<span style="color: #a0522d;"> coord(*)</span>
|
||||
<span style="color: #228b22;">integer</span> (<span style="color: #008b8b;">c_int64_t</span>) , <span style="color: #a020f0;">intent</span>(in) ::<span style="color: #a0522d;"> size_max</span>
|
||||
<span style="color: #a020f0;">end function</span>
|
||||
<span style="color: #a020f0;">end interface</span>
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
<p>
|
||||
Returns the point coordinates in three different arrays, one for
|
||||
each component x,y,z.
|
||||
The pointers are assumed to point on a memory block of size
|
||||
<code>size_max</code> ≥ <code>point_num</code>.
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90"><span style="color: #a020f0;">interface</span>
|
||||
<span style="color: #228b22;">integer</span>(<span style="color: #008b8b;">c_int32_t</span>)<span style="color: #a0522d;"> function qmckl_get_point_xyz(context, </span><span style="color: #a020f0;">&</span>
|
||||
coord_x, coord_y, coord_z, size_max) <span style="color: #a020f0;">bind</span>(C)
|
||||
<span style="color: #a020f0;">use</span>, <span style="color: #a020f0;">intrinsic</span> :: <span style="color: #0000ff;">iso_c_binding</span>
|
||||
<span style="color: #a020f0;">import</span>
|
||||
<span style="color: #a020f0;">implicit</span> <span style="color: #228b22;">none</span>
|
||||
|
||||
<span style="color: #228b22;">integer</span> (<span style="color: #008b8b;">c_int64_t</span>) , <span style="color: #a020f0;">intent</span>(in) , <span style="color: #a020f0;">value</span> ::<span style="color: #a0522d;"> context</span>
|
||||
<span style="color: #228b22;">real</span> (<span style="color: #008b8b;">c_double</span> ) , <span style="color: #a020f0;">intent</span>(out) ::<span style="color: #a0522d;"> coord_x(*)</span>
|
||||
<span style="color: #228b22;">real</span> (<span style="color: #008b8b;">c_double</span> ) , <span style="color: #a020f0;">intent</span>(out) ::<span style="color: #a0522d;"> coord_y(*)</span>
|
||||
<span style="color: #228b22;">real</span> (<span style="color: #008b8b;">c_double</span> ) , <span style="color: #a020f0;">intent</span>(out) ::<span style="color: #a0522d;"> coord_z(*)</span>
|
||||
<span style="color: #228b22;">integer</span> (<span style="color: #008b8b;">c_int64_t</span>) , <span style="color: #a020f0;">intent</span>(in) ::<span style="color: #a0522d;"> size_max</span>
|
||||
<span style="color: #a020f0;">end function</span>
|
||||
<span style="color: #a020f0;">end interface</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org06dbc7d" class="outline-3">
|
||||
<h3 id="org06dbc7d"><span class="section-number-3">1.3</span> Initialization functions</h3>
|
||||
|
||||
<div id="outline-container-org3fda1b3" class="outline-3">
|
||||
<h3 id="org3fda1b3"><span class="section-number-3">1.3</span> Initialization functions</h3>
|
||||
<div class="outline-text-3" id="text-1-3">
|
||||
<p>
|
||||
When the data is set in the context, if the arrays are large
|
||||
@ -566,8 +497,9 @@ 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_point</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>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">num</span>);
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">size_max</span>);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
@ -578,6 +510,7 @@ Copy a sequence of (x,y,z) into the context.
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span>
|
||||
<span style="color: #0000ff;">qmckl_set_point</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>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">num</span>)
|
||||
{
|
||||
@ -586,61 +519,52 @@ Copy a sequence of (x,y,z) into the context.
|
||||
<span style="color: #a020f0;">return</span> QMCKL_NULL_CONTEXT;
|
||||
}
|
||||
|
||||
<span style="color: #a020f0;">if</span> (transp != <span style="color: #8b2252;">'N'</span> && transp != <span style="color: #8b2252;">'T'</span>) {
|
||||
<span style="color: #a020f0;">return</span> qmckl_failwith( context,
|
||||
QMCKL_INVALID_ARG_2,
|
||||
<span style="color: #8b2252;">"qmckl_set_point"</span>,
|
||||
<span style="color: #8b2252;">"transp should be 'N' or 'T'"</span>);
|
||||
}
|
||||
|
||||
<span style="color: #a020f0;">if</span> (coord == <span style="color: #008b8b;">NULL</span>) {
|
||||
<span style="color: #a020f0;">return</span> qmckl_failwith( context,
|
||||
QMCKL_INVALID_ARG_3,
|
||||
<span style="color: #8b2252;">"qmckl_set_point"</span>,
|
||||
<span style="color: #8b2252;">"coord is a NULL pointer"</span>);
|
||||
}
|
||||
|
||||
<span style="color: #228b22;">qmckl_context_struct</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">ctx</span> = (<span style="color: #228b22;">qmckl_context_struct</span>* <span style="color: #a020f0;">const</span>) context;
|
||||
assert (ctx != <span style="color: #008b8b;">NULL</span>);
|
||||
assert (ctx->point != <span style="color: #008b8b;">NULL</span>);
|
||||
|
||||
<span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #a0522d;">rc</span>;
|
||||
<span style="color: #a020f0;">if</span> (ctx->point->num < num) {
|
||||
|
||||
<span style="color: #a020f0;">if</span> (ctx->point->coord_x != <span style="color: #008b8b;">NULL</span>) {
|
||||
qmckl_free(context, ctx->point->coord_x);
|
||||
ctx->point->coord_x = <span style="color: #008b8b;">NULL</span>;
|
||||
<span style="color: #a020f0;">if</span> (ctx->point->coord.data != <span style="color: #008b8b;">NULL</span>) {
|
||||
rc = qmckl_matrix_free(context, ctx->point->coord);
|
||||
<span style="color: #a020f0;">return</span> rc;
|
||||
}
|
||||
|
||||
<span style="color: #a020f0;">if</span> (ctx->point->coord_y != <span style="color: #008b8b;">NULL</span>) {
|
||||
qmckl_free(context, ctx->point->coord_y);
|
||||
ctx->point->coord_y = <span style="color: #008b8b;">NULL</span>;
|
||||
}
|
||||
|
||||
<span style="color: #a020f0;">if</span> (ctx->point->coord_z != <span style="color: #008b8b;">NULL</span>) {
|
||||
qmckl_free(context, ctx->point->coord_z);
|
||||
ctx->point->coord_z = <span style="color: #008b8b;">NULL</span>;
|
||||
}
|
||||
|
||||
<span style="color: #228b22;">qmckl_memory_info_struct</span> <span style="color: #a0522d;">mem_info</span> = qmckl_memory_info_struct_zero;
|
||||
mem_info.size = num*<span style="color: #a020f0;">sizeof</span>(<span style="color: #228b22;">double</span>);
|
||||
|
||||
ctx->point->coord_x = (<span style="color: #228b22;">double</span>*) qmckl_malloc(context, mem_info);
|
||||
<span style="color: #a020f0;">if</span> (ctx->point->coord_x == <span style="color: #008b8b;">NULL</span>) {
|
||||
ctx->point->coord = qmckl_matrix_alloc(context, num, 3);
|
||||
<span style="color: #a020f0;">if</span> (ctx->point->coord.data == <span style="color: #008b8b;">NULL</span>) {
|
||||
<span style="color: #a020f0;">return</span> qmckl_failwith( context,
|
||||
QMCKL_ALLOCATION_FAILED,
|
||||
<span style="color: #8b2252;">"qmckl_set_point"</span>,
|
||||
<span style="color: #008b8b;">NULL</span>);
|
||||
}
|
||||
|
||||
ctx->point->coord_y = (<span style="color: #228b22;">double</span>*) qmckl_malloc(context, mem_info);
|
||||
<span style="color: #a020f0;">if</span> (ctx->point->coord_y == <span style="color: #008b8b;">NULL</span>) {
|
||||
<span style="color: #a020f0;">return</span> qmckl_failwith( context,
|
||||
QMCKL_ALLOCATION_FAILED,
|
||||
<span style="color: #8b2252;">"qmckl_set_point"</span>,
|
||||
<span style="color: #008b8b;">NULL</span>);
|
||||
}
|
||||
|
||||
ctx->point->coord_z = (<span style="color: #228b22;">double</span>*) qmckl_malloc(context, mem_info);
|
||||
<span style="color: #a020f0;">if</span> (ctx->point->coord_z == <span style="color: #008b8b;">NULL</span>) {
|
||||
<span style="color: #a020f0;">return</span> qmckl_failwith( context,
|
||||
QMCKL_ALLOCATION_FAILED,
|
||||
<span style="color: #8b2252;">"qmckl_set_point"</span>,
|
||||
<span style="color: #008b8b;">NULL</span>);
|
||||
}
|
||||
};
|
||||
|
||||
ctx->point->num = num;
|
||||
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">i</span>=0 ; i<num ; ++i) {
|
||||
ctx->point->coord_x[i] = coord[3*i ];
|
||||
ctx->point->coord_y[i] = coord[3*i+1];
|
||||
ctx->point->coord_z[i] = coord[3*i+2];
|
||||
<span style="color: #a020f0;">if</span> (transp == <span style="color: #8b2252;">'T'</span>) {
|
||||
memcpy(ctx->point->coord.data, coord, 3*num*<span style="color: #a020f0;">sizeof</span>(<span style="color: #228b22;">double</span>));
|
||||
} <span style="color: #a020f0;">else</span> {
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">i</span>=0 ; i<num ; ++i) {
|
||||
qmckl_mat(ctx->point->coord, i, 0) = coord[3*i ];
|
||||
qmckl_mat(ctx->point->coord, i, 1) = coord[3*i+1];
|
||||
qmckl_mat(ctx->point->coord, i, 2) = coord[3*i+2];
|
||||
}
|
||||
}
|
||||
|
||||
<span style="color: #a020f0;">return</span> QMCKL_SUCCESS;
|
||||
@ -652,115 +576,14 @@ Copy a sequence of (x,y,z) into the context.
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90"><span style="color: #a020f0;">interface</span>
|
||||
<span style="color: #228b22;">integer</span>(<span style="color: #008b8b;">c_int32_t</span>)<span style="color: #a0522d;"> function qmckl_set_point(context, </span><span style="color: #a020f0;">&</span>
|
||||
coord_x, coord_y, coord_z, size_max) <span style="color: #a020f0;">bind</span>(C)
|
||||
transp, coord, size_max) <span style="color: #a020f0;">bind</span>(C)
|
||||
<span style="color: #a020f0;">use</span>, <span style="color: #a020f0;">intrinsic</span> :: <span style="color: #0000ff;">iso_c_binding</span>
|
||||
<span style="color: #a020f0;">import</span>
|
||||
<span style="color: #a020f0;">implicit</span> <span style="color: #228b22;">none</span>
|
||||
|
||||
<span style="color: #228b22;">integer</span> (<span style="color: #008b8b;">c_int64_t</span>) , <span style="color: #a020f0;">intent</span>(in) , <span style="color: #a020f0;">value</span> ::<span style="color: #a0522d;"> context</span>
|
||||
<span style="color: #228b22;">real</span> (<span style="color: #008b8b;">c_double</span> ) , <span style="color: #a020f0;">intent</span>(in) ::<span style="color: #a0522d;"> coord_x(*)</span>
|
||||
<span style="color: #228b22;">real</span> (<span style="color: #008b8b;">c_double</span> ) , <span style="color: #a020f0;">intent</span>(in) ::<span style="color: #a0522d;"> coord_y(*)</span>
|
||||
<span style="color: #228b22;">real</span> (<span style="color: #008b8b;">c_double</span> ) , <span style="color: #a020f0;">intent</span>(in) ::<span style="color: #a0522d;"> coord_z(*)</span>
|
||||
<span style="color: #228b22;">integer</span> (<span style="color: #008b8b;">c_int64_t</span>) , <span style="color: #a020f0;">intent</span>(in) , <span style="color: #a020f0;">value</span> ::<span style="color: #a0522d;"> size_max</span>
|
||||
<span style="color: #a020f0;">end function</span>
|
||||
<span style="color: #a020f0;">end interface</span>
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #0000ff;">qmckl_set_point_xyz</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_x</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">double</span>* <span style="color: #a0522d;">coord_y</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">double</span>* <span style="color: #a0522d;">coord_z</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">num</span>);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span>
|
||||
<span style="color: #0000ff;">qmckl_set_point_xyz</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_x</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">double</span>* <span style="color: #a0522d;">coord_y</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">double</span>* <span style="color: #a0522d;">coord_z</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">num</span>)
|
||||
{
|
||||
|
||||
<span style="color: #a020f0;">if</span> (qmckl_context_check(context) == QMCKL_NULL_CONTEXT) {
|
||||
<span style="color: #a020f0;">return</span> QMCKL_NULL_CONTEXT;
|
||||
}
|
||||
|
||||
<span style="color: #228b22;">qmckl_context_struct</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">ctx</span> = (<span style="color: #228b22;">qmckl_context_struct</span>* <span style="color: #a020f0;">const</span>) context;
|
||||
assert (ctx != <span style="color: #008b8b;">NULL</span>);
|
||||
assert (ctx->point != <span style="color: #008b8b;">NULL</span>);
|
||||
|
||||
<span style="color: #a020f0;">if</span> (ctx->point->num < num) {
|
||||
|
||||
<span style="color: #a020f0;">if</span> (ctx->point->coord_x != <span style="color: #008b8b;">NULL</span>) {
|
||||
qmckl_free(context, ctx->point->coord_x);
|
||||
ctx->point->coord_x = <span style="color: #008b8b;">NULL</span>;
|
||||
}
|
||||
|
||||
<span style="color: #a020f0;">if</span> (ctx->point->coord_y != <span style="color: #008b8b;">NULL</span>) {
|
||||
qmckl_free(context, ctx->point->coord_y);
|
||||
ctx->point->coord_y = <span style="color: #008b8b;">NULL</span>;
|
||||
}
|
||||
|
||||
<span style="color: #a020f0;">if</span> (ctx->point->coord_z != <span style="color: #008b8b;">NULL</span>) {
|
||||
qmckl_free(context, ctx->point->coord_z);
|
||||
ctx->point->coord_z = <span style="color: #008b8b;">NULL</span>;
|
||||
}
|
||||
|
||||
<span style="color: #228b22;">qmckl_memory_info_struct</span> <span style="color: #a0522d;">mem_info</span> = qmckl_memory_info_struct_zero;
|
||||
mem_info.size = num*<span style="color: #a020f0;">sizeof</span>(<span style="color: #228b22;">double</span>);
|
||||
|
||||
ctx->point->coord_x = (<span style="color: #228b22;">double</span>*) qmckl_malloc(context, mem_info);
|
||||
<span style="color: #a020f0;">if</span> (ctx->point->coord_x == <span style="color: #008b8b;">NULL</span>) {
|
||||
<span style="color: #a020f0;">return</span> qmckl_failwith( context,
|
||||
QMCKL_ALLOCATION_FAILED,
|
||||
<span style="color: #8b2252;">"qmckl_set_point"</span>,
|
||||
<span style="color: #008b8b;">NULL</span>);
|
||||
}
|
||||
|
||||
ctx->point->coord_y = (<span style="color: #228b22;">double</span>*) qmckl_malloc(context, mem_info);
|
||||
<span style="color: #a020f0;">if</span> (ctx->point->coord_y == <span style="color: #008b8b;">NULL</span>) {
|
||||
<span style="color: #a020f0;">return</span> qmckl_failwith( context,
|
||||
QMCKL_ALLOCATION_FAILED,
|
||||
<span style="color: #8b2252;">"qmckl_set_point"</span>,
|
||||
<span style="color: #008b8b;">NULL</span>);
|
||||
}
|
||||
|
||||
ctx->point->coord_z = (<span style="color: #228b22;">double</span>*) qmckl_malloc(context, mem_info);
|
||||
<span style="color: #a020f0;">if</span> (ctx->point->coord_z == <span style="color: #008b8b;">NULL</span>) {
|
||||
<span style="color: #a020f0;">return</span> qmckl_failwith( context,
|
||||
QMCKL_ALLOCATION_FAILED,
|
||||
<span style="color: #8b2252;">"qmckl_set_point"</span>,
|
||||
<span style="color: #008b8b;">NULL</span>);
|
||||
}
|
||||
};
|
||||
|
||||
ctx->point->num = num;
|
||||
|
||||
memcpy(ctx->point->coord_x, coord_x, <span style="color: #228b22;">num</span>*<span style="color: #a020f0;">sizeof</span>(<span style="color: #228b22;">double</span>));
|
||||
memcpy(ctx->point->coord_y, coord_y, <span style="color: #228b22;">num</span>*<span style="color: #a020f0;">sizeof</span>(<span style="color: #228b22;">double</span>));
|
||||
memcpy(ctx->point->coord_z, coord_z, <span style="color: #228b22;">num</span>*<span style="color: #a020f0;">sizeof</span>(<span style="color: #228b22;">double</span>));
|
||||
|
||||
<span style="color: #a020f0;">return</span> QMCKL_SUCCESS;
|
||||
}
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90"><span style="color: #a020f0;">interface</span>
|
||||
<span style="color: #228b22;">integer</span>(<span style="color: #008b8b;">c_int32_t</span>)<span style="color: #a0522d;"> function qmckl_set_point_xyz(context, </span><span style="color: #a020f0;">&</span>
|
||||
coord_x, coord_y, coord_z, size_max) <span style="color: #a020f0;">bind</span>(C)
|
||||
<span style="color: #a020f0;">use</span>, <span style="color: #a020f0;">intrinsic</span> :: <span style="color: #0000ff;">iso_c_binding</span>
|
||||
<span style="color: #a020f0;">import</span>
|
||||
<span style="color: #a020f0;">implicit</span> <span style="color: #228b22;">none</span>
|
||||
|
||||
<span style="color: #228b22;">integer</span> (<span style="color: #008b8b;">c_int64_t</span>) , <span style="color: #a020f0;">intent</span>(in) , <span style="color: #a020f0;">value</span> ::<span style="color: #a0522d;"> context</span>
|
||||
<span style="color: #228b22;">real</span> (<span style="color: #008b8b;">c_double</span> ) , <span style="color: #a020f0;">intent</span>(in) ::<span style="color: #a0522d;"> coord_x(*)</span>
|
||||
<span style="color: #228b22;">real</span> (<span style="color: #008b8b;">c_double</span> ) , <span style="color: #a020f0;">intent</span>(in) ::<span style="color: #a0522d;"> coord_y(*)</span>
|
||||
<span style="color: #228b22;">real</span> (<span style="color: #008b8b;">c_double</span> ) , <span style="color: #a020f0;">intent</span>(in) ::<span style="color: #a0522d;"> coord_z(*)</span>
|
||||
<span style="color: #228b22;">character</span>(<span style="color: #008b8b;">c_char</span>) , <span style="color: #a020f0;">intent</span>(in) , <span style="color: #a020f0;">value</span> ::<span style="color: #a0522d;"> transp</span>
|
||||
<span style="color: #228b22;">real</span> (<span style="color: #008b8b;">c_double</span> ) , <span style="color: #a020f0;">intent</span>(in) ::<span style="color: #a0522d;"> coord(*)</span>
|
||||
<span style="color: #228b22;">integer</span> (<span style="color: #008b8b;">c_int64_t</span>) , <span style="color: #a020f0;">intent</span>(in) , <span style="color: #a020f0;">value</span> ::<span style="color: #a0522d;"> size_max</span>
|
||||
<span style="color: #a020f0;">end function</span>
|
||||
<span style="color: #a020f0;">end interface</span>
|
||||
@ -769,19 +592,26 @@ Copy a sequence of (x,y,z) into the context.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org64379bd" class="outline-3">
|
||||
<h3 id="org64379bd"><span class="section-number-3">1.4</span> Test</h3>
|
||||
|
||||
<div id="outline-container-orge982be6" class="outline-3">
|
||||
<h3 id="orge982be6"><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: #228b22;">int64_t</span> <span style="color: #a0522d;">point_num</span> = chbrclf_elec_num;
|
||||
<span style="color: #228b22;">double</span>* <span style="color: #a0522d;">coord</span> = &(chbrclf_elec_coord[0][0][0]);
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">double</span>* <span style="color: #a0522d;">coord</span> = &(chbrclf_elec_coord[0][0][0]);
|
||||
|
||||
/* <span style="color: #b22222;">--- </span>*/
|
||||
|
||||
<span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #a0522d;">rc</span>;
|
||||
<span style="color: #228b22;">double</span> <span style="color: #a0522d;">coord2</span>[point_num*3];
|
||||
<span style="color: #228b22;">double</span> <span style="color: #a0522d;">coord3</span>[point_num*3];
|
||||
|
||||
rc = qmckl_set_point (context, coord, point_num);
|
||||
|
||||
rc = qmckl_get_point (context, <span style="color: #8b2252;">'N'</span>, coord2, (point_num*3));
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_NOT_PROVIDED);
|
||||
|
||||
rc = qmckl_set_point (context, <span style="color: #8b2252;">'N'</span>, coord, point_num);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_SUCCESS);
|
||||
|
||||
<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">n</span>;
|
||||
@ -789,25 +619,30 @@ rc = qmckl_get_point_num (context, &n);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_SUCCESS);
|
||||
<span style="color: #0000ff;">assert</span>(n == point_num);
|
||||
|
||||
<span style="color: #228b22;">double</span> <span style="color: #a0522d;">coord2</span>[point_num*3];
|
||||
<span style="color: #228b22;">double</span> <span style="color: #a0522d;">coord_x</span>[point_num];
|
||||
<span style="color: #228b22;">double</span> <span style="color: #a0522d;">coord_y</span>[point_num];
|
||||
<span style="color: #228b22;">double</span> <span style="color: #a0522d;">coord_z</span>[point_num];
|
||||
|
||||
rc = qmckl_get_point_xyz (context, coord_x, coord_y, coord_z, point_num);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_SUCCESS);
|
||||
|
||||
rc = qmckl_get_point (context, coord2, (point_num*3));
|
||||
rc = qmckl_get_point (context, <span style="color: #8b2252;">'N'</span>, coord2, (point_num*3));
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_SUCCESS);
|
||||
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">i</span>=0 ; i<3*point_num ; ++i) {
|
||||
assert( coord[i] == coord2[i] );
|
||||
}
|
||||
|
||||
rc = qmckl_get_point (context, <span style="color: #8b2252;">'T'</span>, coord2, (point_num*3));
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_SUCCESS);
|
||||
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">i</span>=0 ; i<point_num ; ++i) {
|
||||
assert( coord[3*i+0] == coord_x[i] );
|
||||
assert( coord[3*i+1] == coord_y[i] );
|
||||
assert( coord[3*i+2] == coord_z[i] );
|
||||
assert( coord[3*i+0] == coord2[i] );
|
||||
assert( coord[3*i+1] == coord2[i+point_num] );
|
||||
assert( coord[3*i+2] == coord2[i+point_num*2] );
|
||||
}
|
||||
|
||||
rc = qmckl_set_point (context, <span style="color: #8b2252;">'T'</span>, coord2, point_num);
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_SUCCESS);
|
||||
|
||||
rc = qmckl_get_point (context, <span style="color: #8b2252;">'N'</span>, coord3, (point_num*3));
|
||||
<span style="color: #0000ff;">assert</span>(rc == QMCKL_SUCCESS);
|
||||
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">i</span>=0 ; i<3*point_num ; ++i) {
|
||||
assert( coord[i] == coord3[i] );
|
||||
}
|
||||
|
||||
</pre>
|
||||
@ -818,7 +653,7 @@ rc = qmckl_get_point (context, coord2, (point_num*3));
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2022-01-21 Fri 07:53</p>
|
||||
<p class="date">Created: 2022-01-23 Sun 18:08</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>
|
||||
<!-- 2022-01-21 Fri 07:53 -->
|
||||
<!-- 2022-01-23 Sun 18:09 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Sherman-Morrison-Woodbury</title>
|
||||
@ -333,86 +333,86 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org61ec25b">1. Headers</a></li>
|
||||
<li><a href="#orga011c0e">2. Naïve Sherman-Morrison</a>
|
||||
<li><a href="#org92a46e8">1. Headers</a></li>
|
||||
<li><a href="#org0832817">2. Naïve Sherman-Morrison</a>
|
||||
<ul>
|
||||
<li><a href="#org0e45265">2.1. <code>qmckl_sherman_morrison</code></a>
|
||||
<li><a href="#orgac18e44">2.1. <code>qmckl_sherman_morrison</code></a>
|
||||
<ul>
|
||||
<li><a href="#org3fb74b4">2.1.1. Requirements</a></li>
|
||||
<li><a href="#orgcaf53d9">2.1.2. C header</a></li>
|
||||
<li><a href="#org222f629">2.1.3. C source</a></li>
|
||||
<li><a href="#org21e3cb5">2.1.4. Performance</a></li>
|
||||
<li><a href="#org467c190">2.1.1. Requirements</a></li>
|
||||
<li><a href="#org1580ddb">2.1.2. C header</a></li>
|
||||
<li><a href="#orgbe79177">2.1.3. C source</a></li>
|
||||
<li><a href="#orgc5988cd">2.1.4. Performance</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org7fe4efd">3. Woodbury 2x2</a>
|
||||
<li><a href="#org4149035">3. Woodbury 2x2</a>
|
||||
<ul>
|
||||
<li><a href="#org4d5320c">3.1. <code>qmckl_woodbury_2</code></a>
|
||||
<li><a href="#org84340a7">3.1. <code>qmckl_woodbury_2</code></a>
|
||||
<ul>
|
||||
<li><a href="#org7e4adef">3.1.1. Requirements</a></li>
|
||||
<li><a href="#org550909d">3.1.2. C header</a></li>
|
||||
<li><a href="#orgcf7a838">3.1.3. C source</a></li>
|
||||
<li><a href="#orgc7fe4e3">3.1.4. Performance</a></li>
|
||||
<li><a href="#org85c3265">3.1.1. Requirements</a></li>
|
||||
<li><a href="#org97012e0">3.1.2. C header</a></li>
|
||||
<li><a href="#orge58d675">3.1.3. C source</a></li>
|
||||
<li><a href="#org2e18d13">3.1.4. Performance</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgd2e7bcc">4. Woodbury 3x3</a>
|
||||
<li><a href="#orgc849234">4. Woodbury 3x3</a>
|
||||
<ul>
|
||||
<li><a href="#org23c0427">4.1. <code>qmckl_woodbury_3</code></a>
|
||||
<li><a href="#orgc73adc7">4.1. <code>qmckl_woodbury_3</code></a>
|
||||
<ul>
|
||||
<li><a href="#org28a9de3">4.1.1. Requirements</a></li>
|
||||
<li><a href="#org7e1eac9">4.1.2. C header</a></li>
|
||||
<li><a href="#org5b0fede">4.1.3. C source</a></li>
|
||||
<li><a href="#org75602bd">4.1.4. Performance…</a></li>
|
||||
<li><a href="#orgd4a113c">4.1.1. Requirements</a></li>
|
||||
<li><a href="#orgc7cc26a">4.1.2. C header</a></li>
|
||||
<li><a href="#org40cc527">4.1.3. C source</a></li>
|
||||
<li><a href="#orga4839da">4.1.4. Performance…</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org4e18230">5. Sherman-Morrison with update splitting</a>
|
||||
<li><a href="#org0c84c42">5. Sherman-Morrison with update splitting</a>
|
||||
<ul>
|
||||
<li><a href="#org1df082c">5.1. <code>qmckl_sherman_morrison_splitting</code></a>
|
||||
<li><a href="#org3aa02b6">5.1. <code>qmckl_sherman_morrison_splitting</code></a>
|
||||
<ul>
|
||||
<li><a href="#org16a64b1">5.1.1. Requirements</a></li>
|
||||
<li><a href="#org2d1026f">5.1.2. C header</a></li>
|
||||
<li><a href="#org10e47f1">5.1.3. C source</a></li>
|
||||
<li><a href="#orgde2e7bf">5.1.4. Performance…</a></li>
|
||||
<li><a href="#org484b451">5.1.1. Requirements</a></li>
|
||||
<li><a href="#orgfc9c84a">5.1.2. C header</a></li>
|
||||
<li><a href="#org97627b3">5.1.3. C source</a></li>
|
||||
<li><a href="#orgac3bf0e">5.1.4. Performance…</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgb426df3">6. Woodbury 3x3 and 2x2 with Sherman-Morrison and update splitting</a>
|
||||
<li><a href="#org6fcf314">6. Woodbury 3x3 and 2x2 with Sherman-Morrison and update splitting</a>
|
||||
<ul>
|
||||
<li><a href="#orgfcaec54">6.1. <code>qmckl_sherman_morrison_smw32s</code></a>
|
||||
<li><a href="#orgb5a6b54">6.1. <code>qmckl_sherman_morrison_smw32s</code></a>
|
||||
<ul>
|
||||
<li><a href="#org8c559ea">6.1.1. Requirements</a></li>
|
||||
<li><a href="#orgb97ddf0">6.1.2. C header</a></li>
|
||||
<li><a href="#org2034619">6.1.3. C source</a></li>
|
||||
<li><a href="#orga030270">6.1.4. Performance…</a></li>
|
||||
<li><a href="#org5abb3e5">6.1.1. Requirements</a></li>
|
||||
<li><a href="#org106e693">6.1.2. C header</a></li>
|
||||
<li><a href="#orge4b8fb5">6.1.3. C source</a></li>
|
||||
<li><a href="#org75fd3cd">6.1.4. Performance…</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org6681df4">7. Helper Functions</a>
|
||||
<li><a href="#org7fe9e44">7. Helper Functions</a>
|
||||
<ul>
|
||||
<li><a href="#org3624a58">7.1. <code>qmckl_slagel_splitting</code></a>
|
||||
<li><a href="#org6f53a9e">7.1. <code>qmckl_slagel_splitting</code></a>
|
||||
<ul>
|
||||
<li><a href="#orgf521ebe">7.1.1. Requirements</a></li>
|
||||
<li><a href="#orgf13d1e7">7.1.2. C header</a></li>
|
||||
<li><a href="#org8c8219a">7.1.3. C source</a></li>
|
||||
<li><a href="#org042e638">7.1.4. Performance</a></li>
|
||||
<li><a href="#org8c68573">7.1.1. Requirements</a></li>
|
||||
<li><a href="#org51f8bc1">7.1.2. C header</a></li>
|
||||
<li><a href="#orgaabba6f">7.1.3. C source</a></li>
|
||||
<li><a href="#org8e0fa31">7.1.4. Performance</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org5543f20">8. End of files</a></li>
|
||||
<li><a href="#orgbc1a134">8. End of files</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org61ec25b" class="outline-2">
|
||||
<h2 id="org61ec25b"><span class="section-number-2">1</span> Headers</h2>
|
||||
<div id="outline-container-org92a46e8" class="outline-2">
|
||||
<h2 id="org92a46e8"><span class="section-number-2">1</span> Headers</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #483d8b;">#include</span> <span style="color: #8b2252;">"qmckl.h"</span>
|
||||
@ -431,12 +431,12 @@ for the JavaScript code in this tag.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orga011c0e" class="outline-2">
|
||||
<h2 id="orga011c0e"><span class="section-number-2">2</span> Naïve Sherman-Morrison</h2>
|
||||
<div id="outline-container-org0832817" class="outline-2">
|
||||
<h2 id="org0832817"><span class="section-number-2">2</span> Naïve Sherman-Morrison</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
</div>
|
||||
<div id="outline-container-org0e45265" class="outline-3">
|
||||
<h3 id="org0e45265"><span class="section-number-3">2.1</span> <code>qmckl_sherman_morrison</code></h3>
|
||||
<div id="outline-container-orgac18e44" class="outline-3">
|
||||
<h3 id="orgac18e44"><span class="section-number-3">2.1</span> <code>qmckl_sherman_morrison</code></h3>
|
||||
<div class="outline-text-3" id="text-2-1">
|
||||
<p>
|
||||
This is the simplest of the available Sherman-Morrison-Woodbury kernels. It applies rank-1 updates one by one in
|
||||
@ -478,7 +478,7 @@ If the determinant of the Slater-matrix is passed, it will be updated to the det
|
||||
from applying the updates to the original matrix.
|
||||
</p>
|
||||
|
||||
<table id="orgb451672" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org4b2248a" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -557,8 +557,8 @@ from applying the updates to the original matrix.
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org3fb74b4" class="outline-4">
|
||||
<h4 id="org3fb74b4"><span class="section-number-4">2.1.1</span> Requirements</h4>
|
||||
<div id="outline-container-org467c190" class="outline-4">
|
||||
<h4 id="org467c190"><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>
|
||||
@ -573,8 +573,8 @@ from applying the updates to the original matrix.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgcaf53d9" class="outline-4">
|
||||
<h4 id="orgcaf53d9"><span class="section-number-4">2.1.2</span> C header</h4>
|
||||
<div id="outline-container-org1580ddb" class="outline-4">
|
||||
<h4 id="org1580ddb"><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_sherman_morrison</span> (
|
||||
@ -592,8 +592,8 @@ from applying the updates to the original matrix.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org222f629" class="outline-4">
|
||||
<h4 id="org222f629"><span class="section-number-4">2.1.3</span> C source</h4>
|
||||
<div id="outline-container-orgbe79177" class="outline-4">
|
||||
<h4 id="orgbe79177"><span class="section-number-4">2.1.3</span> C source</h4>
|
||||
<div class="outline-text-4" id="text-2-1-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #483d8b;">#include</span> <span style="color: #8b2252;"><stdbool.h></span>
|
||||
@ -663,8 +663,8 @@ from applying the updates to the original matrix.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org21e3cb5" class="outline-4">
|
||||
<h4 id="org21e3cb5"><span class="section-number-4">2.1.4</span> Performance</h4>
|
||||
<div id="outline-container-orgc5988cd" class="outline-4">
|
||||
<h4 id="orgc5988cd"><span class="section-number-4">2.1.4</span> Performance</h4>
|
||||
<div class="outline-text-4" id="text-2-1-4">
|
||||
<p>
|
||||
This function performs best when there is only 1 rank-1 update in the update cycle. It is not useful to
|
||||
@ -676,12 +676,12 @@ where applying the update causes singular behaviour.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org7fe4efd" class="outline-2">
|
||||
<h2 id="org7fe4efd"><span class="section-number-2">3</span> Woodbury 2x2</h2>
|
||||
<div id="outline-container-org4149035" class="outline-2">
|
||||
<h2 id="org4149035"><span class="section-number-2">3</span> Woodbury 2x2</h2>
|
||||
<div class="outline-text-2" id="text-3">
|
||||
</div>
|
||||
<div id="outline-container-org4d5320c" class="outline-3">
|
||||
<h3 id="org4d5320c"><span class="section-number-3">3.1</span> <code>qmckl_woodbury_2</code></h3>
|
||||
<div id="outline-container-org84340a7" class="outline-3">
|
||||
<h3 id="org84340a7"><span class="section-number-3">3.1</span> <code>qmckl_woodbury_2</code></h3>
|
||||
<div class="outline-text-3" id="text-3-1">
|
||||
<p>
|
||||
The Woodbury 2x2 kernel. It is used to apply two rank-1 updates at once. The formula used in
|
||||
@ -705,7 +705,7 @@ from applying the updates to the original matrix.
|
||||
|
||||
|
||||
|
||||
<table id="org605603e" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org159b24b" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -777,8 +777,8 @@ from applying the updates to the original matrix.
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org7e4adef" class="outline-4">
|
||||
<h4 id="org7e4adef"><span class="section-number-4">3.1.1</span> Requirements</h4>
|
||||
<div id="outline-container-org85c3265" class="outline-4">
|
||||
<h4 id="org85c3265"><span class="section-number-4">3.1.1</span> Requirements</h4>
|
||||
<div class="outline-text-4" id="text-3-1-1">
|
||||
<ul class="org-ul">
|
||||
<li><code>context</code> is not <code>qmckl_null_context</code></li>
|
||||
@ -792,8 +792,8 @@ from applying the updates to the original matrix.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org550909d" class="outline-4">
|
||||
<h4 id="org550909d"><span class="section-number-4">3.1.2</span> C header</h4>
|
||||
<div id="outline-container-org97012e0" class="outline-4">
|
||||
<h4 id="org97012e0"><span class="section-number-4">3.1.2</span> C header</h4>
|
||||
<div class="outline-text-4" id="text-3-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_woodbury_2</span> (
|
||||
@ -810,8 +810,8 @@ from applying the updates to the original matrix.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgcf7a838" class="outline-4">
|
||||
<h4 id="orgcf7a838"><span class="section-number-4">3.1.3</span> C source</h4>
|
||||
<div id="outline-container-orge58d675" class="outline-4">
|
||||
<h4 id="orge58d675"><span class="section-number-4">3.1.3</span> C source</h4>
|
||||
<div class="outline-text-4" id="text-3-1-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #483d8b;">#include</span> <span style="color: #8b2252;"><stdbool.h></span>
|
||||
@ -898,8 +898,8 @@ from applying the updates to the original matrix.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgc7fe4e3" class="outline-4">
|
||||
<h4 id="orgc7fe4e3"><span class="section-number-4">3.1.4</span> Performance</h4>
|
||||
<div id="outline-container-org2e18d13" class="outline-4">
|
||||
<h4 id="org2e18d13"><span class="section-number-4">3.1.4</span> Performance</h4>
|
||||
<div class="outline-text-4" id="text-3-1-4">
|
||||
<p>
|
||||
This function is most efficient when used in cases where there are only 2 rank-1 updates and
|
||||
@ -910,12 +910,12 @@ it is sure they will not result in a singular matrix.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd2e7bcc" class="outline-2">
|
||||
<h2 id="orgd2e7bcc"><span class="section-number-2">4</span> Woodbury 3x3</h2>
|
||||
<div id="outline-container-orgc849234" class="outline-2">
|
||||
<h2 id="orgc849234"><span class="section-number-2">4</span> Woodbury 3x3</h2>
|
||||
<div class="outline-text-2" id="text-4">
|
||||
</div>
|
||||
<div id="outline-container-org23c0427" class="outline-3">
|
||||
<h3 id="org23c0427"><span class="section-number-3">4.1</span> <code>qmckl_woodbury_3</code></h3>
|
||||
<div id="outline-container-orgc73adc7" class="outline-3">
|
||||
<h3 id="orgc73adc7"><span class="section-number-3">4.1</span> <code>qmckl_woodbury_3</code></h3>
|
||||
<div class="outline-text-3" id="text-4-1">
|
||||
<p>
|
||||
The 3x3 version of the Woodbury 2x2 kernel. It is used to apply three
|
||||
@ -936,7 +936,7 @@ from applying the updates to the original matrix.
|
||||
|
||||
|
||||
|
||||
<table id="org7de071e" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org6e9cd55" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1008,8 +1008,8 @@ from applying the updates to the original matrix.
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org28a9de3" class="outline-4">
|
||||
<h4 id="org28a9de3"><span class="section-number-4">4.1.1</span> Requirements</h4>
|
||||
<div id="outline-container-orgd4a113c" class="outline-4">
|
||||
<h4 id="orgd4a113c"><span class="section-number-4">4.1.1</span> Requirements</h4>
|
||||
<div class="outline-text-4" id="text-4-1-1">
|
||||
<ul class="org-ul">
|
||||
<li><code>context</code> is not <code>qmckl_null_context</code></li>
|
||||
@ -1023,8 +1023,8 @@ from applying the updates to the original matrix.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org7e1eac9" class="outline-4">
|
||||
<h4 id="org7e1eac9"><span class="section-number-4">4.1.2</span> C header</h4>
|
||||
<div id="outline-container-orgc7cc26a" class="outline-4">
|
||||
<h4 id="orgc7cc26a"><span class="section-number-4">4.1.2</span> C header</h4>
|
||||
<div class="outline-text-4" id="text-4-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_woodbury_3</span> (
|
||||
@ -1041,8 +1041,8 @@ from applying the updates to the original matrix.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org5b0fede" class="outline-4">
|
||||
<h4 id="org5b0fede"><span class="section-number-4">4.1.3</span> C source</h4>
|
||||
<div id="outline-container-org40cc527" class="outline-4">
|
||||
<h4 id="org40cc527"><span class="section-number-4">4.1.3</span> C source</h4>
|
||||
<div class="outline-text-4" id="text-4-1-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #483d8b;">#include</span> <span style="color: #8b2252;"><stdbool.h></span>
|
||||
@ -1144,8 +1144,8 @@ from applying the updates to the original matrix.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org75602bd" class="outline-4">
|
||||
<h4 id="org75602bd"><span class="section-number-4">4.1.4</span> Performance…</h4>
|
||||
<div id="outline-container-orga4839da" class="outline-4">
|
||||
<h4 id="orga4839da"><span class="section-number-4">4.1.4</span> Performance…</h4>
|
||||
<div class="outline-text-4" id="text-4-1-4">
|
||||
<p>
|
||||
This function is most efficient when used in cases where there are only 3 rank-1 updates and
|
||||
@ -1156,12 +1156,12 @@ it is sure they will not result in a singular matrix.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org4e18230" class="outline-2">
|
||||
<h2 id="org4e18230"><span class="section-number-2">5</span> Sherman-Morrison with update splitting</h2>
|
||||
<div id="outline-container-org0c84c42" class="outline-2">
|
||||
<h2 id="org0c84c42"><span class="section-number-2">5</span> Sherman-Morrison with update splitting</h2>
|
||||
<div class="outline-text-2" id="text-5">
|
||||
</div>
|
||||
<div id="outline-container-org1df082c" class="outline-3">
|
||||
<h3 id="org1df082c"><span class="section-number-3">5.1</span> <code>qmckl_sherman_morrison_splitting</code></h3>
|
||||
<div id="outline-container-org3aa02b6" class="outline-3">
|
||||
<h3 id="org3aa02b6"><span class="section-number-3">5.1</span> <code>qmckl_sherman_morrison_splitting</code></h3>
|
||||
<div class="outline-text-3" id="text-5-1">
|
||||
<p>
|
||||
This is a variation on the 'Naive' Sherman-Morrison kernel. Whenever the denominator \(1+v_j^T S^{-1} u_j\) in
|
||||
@ -1183,7 +1183,7 @@ If the determinant of the Slater-matrix is passed, it will be updated to the det
|
||||
from applying the updates to the original matrix.
|
||||
</p>
|
||||
|
||||
<table id="orga700b4e" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org56f74c9" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1267,8 +1267,8 @@ from applying the updates to the original matrix.
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org16a64b1" class="outline-4">
|
||||
<h4 id="org16a64b1"><span class="section-number-4">5.1.1</span> Requirements</h4>
|
||||
<div id="outline-container-org484b451" class="outline-4">
|
||||
<h4 id="org484b451"><span class="section-number-4">5.1.1</span> Requirements</h4>
|
||||
<div class="outline-text-4" id="text-5-1-1">
|
||||
<ul class="org-ul">
|
||||
<li><code>context</code> is not <code>QMCKL_NULL_CONTEXT</code></li>
|
||||
@ -1283,8 +1283,8 @@ from applying the updates to the original matrix.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org2d1026f" class="outline-4">
|
||||
<h4 id="org2d1026f"><span class="section-number-4">5.1.2</span> C header</h4>
|
||||
<div id="outline-container-orgfc9c84a" class="outline-4">
|
||||
<h4 id="orgfc9c84a"><span class="section-number-4">5.1.2</span> C header</h4>
|
||||
<div class="outline-text-4" id="text-5-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_sherman_morrison_splitting</span> (
|
||||
@ -1302,8 +1302,8 @@ from applying the updates to the original matrix.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org10e47f1" class="outline-4">
|
||||
<h4 id="org10e47f1"><span class="section-number-4">5.1.3</span> C source</h4>
|
||||
<div id="outline-container-org97627b3" class="outline-4">
|
||||
<h4 id="org97627b3"><span class="section-number-4">5.1.3</span> C source</h4>
|
||||
<div class="outline-text-4" id="text-5-1-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #483d8b;">#include</span> <span style="color: #8b2252;"><stdbool.h></span>
|
||||
@ -1343,8 +1343,8 @@ from applying the updates to the original matrix.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgde2e7bf" class="outline-4">
|
||||
<h4 id="orgde2e7bf"><span class="section-number-4">5.1.4</span> Performance…</h4>
|
||||
<div id="outline-container-orgac3bf0e" class="outline-4">
|
||||
<h4 id="orgac3bf0e"><span class="section-number-4">5.1.4</span> Performance…</h4>
|
||||
<div class="outline-text-4" id="text-5-1-4">
|
||||
<p>
|
||||
This kernel performs best when there are 2 or more rank-1 update cycles and fail-rate is high.
|
||||
@ -1354,12 +1354,12 @@ This kernel performs best when there are 2 or more rank-1 update cycles and fail
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgb426df3" class="outline-2">
|
||||
<h2 id="orgb426df3"><span class="section-number-2">6</span> Woodbury 3x3 and 2x2 with Sherman-Morrison and update splitting</h2>
|
||||
<div id="outline-container-org6fcf314" class="outline-2">
|
||||
<h2 id="org6fcf314"><span class="section-number-2">6</span> Woodbury 3x3 and 2x2 with Sherman-Morrison and update splitting</h2>
|
||||
<div class="outline-text-2" id="text-6">
|
||||
</div>
|
||||
<div id="outline-container-orgfcaec54" class="outline-3">
|
||||
<h3 id="orgfcaec54"><span class="section-number-3">6.1</span> <code>qmckl_sherman_morrison_smw32s</code></h3>
|
||||
<div id="outline-container-orgb5a6b54" class="outline-3">
|
||||
<h3 id="orgb5a6b54"><span class="section-number-3">6.1</span> <code>qmckl_sherman_morrison_smw32s</code></h3>
|
||||
<div class="outline-text-3" id="text-6-1">
|
||||
<p>
|
||||
The Woodbury 3x3 and 2x2 kernel with Sherman-Morrison and update splitting combines the low-level Woodbury 3x3 kernel,
|
||||
@ -1374,7 +1374,7 @@ If the determinant of the Slater-matrix is passed, it will be updated to the det
|
||||
from applying the updates to the original matrix.
|
||||
</p>
|
||||
|
||||
<table id="org4d47b9f" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org94c3196" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1454,8 +1454,8 @@ from applying the updates to the original matrix.
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org8c559ea" class="outline-4">
|
||||
<h4 id="org8c559ea"><span class="section-number-4">6.1.1</span> Requirements</h4>
|
||||
<div id="outline-container-org5abb3e5" class="outline-4">
|
||||
<h4 id="org5abb3e5"><span class="section-number-4">6.1.1</span> Requirements</h4>
|
||||
<div class="outline-text-4" id="text-6-1-1">
|
||||
<ul class="org-ul">
|
||||
<li><code>context</code> is not <code>QMCKL_NULL_CONTEXT</code></li>
|
||||
@ -1470,8 +1470,8 @@ from applying the updates to the original matrix.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgb97ddf0" class="outline-4">
|
||||
<h4 id="orgb97ddf0"><span class="section-number-4">6.1.2</span> C header</h4>
|
||||
<div id="outline-container-org106e693" class="outline-4">
|
||||
<h4 id="org106e693"><span class="section-number-4">6.1.2</span> C header</h4>
|
||||
<div class="outline-text-4" id="text-6-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_sherman_morrison_smw32s</span> (
|
||||
@ -1489,8 +1489,8 @@ from applying the updates to the original matrix.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org2034619" class="outline-4">
|
||||
<h4 id="org2034619"><span class="section-number-4">6.1.3</span> C source</h4>
|
||||
<div id="outline-container-orge4b8fb5" class="outline-4">
|
||||
<h4 id="orge4b8fb5"><span class="section-number-4">6.1.3</span> C source</h4>
|
||||
<div class="outline-text-4" id="text-6-1-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #483d8b;">#include</span> <span style="color: #8b2252;"><stdbool.h></span>
|
||||
@ -1568,8 +1568,8 @@ from applying the updates to the original matrix.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orga030270" class="outline-4">
|
||||
<h4 id="orga030270"><span class="section-number-4">6.1.4</span> Performance…</h4>
|
||||
<div id="outline-container-org75fd3cd" class="outline-4">
|
||||
<h4 id="org75fd3cd"><span class="section-number-4">6.1.4</span> Performance…</h4>
|
||||
<div class="outline-text-4" id="text-6-1-4">
|
||||
<p>
|
||||
This kernel performs best for update cycles with 2 or more rank-1 updates and the fail-rate is low.
|
||||
@ -1579,8 +1579,8 @@ This kernel performs best for update cycles with 2 or more rank-1 updates and th
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6681df4" class="outline-2">
|
||||
<h2 id="org6681df4"><span class="section-number-2">7</span> Helper Functions</h2>
|
||||
<div id="outline-container-org7fe9e44" class="outline-2">
|
||||
<h2 id="org7fe9e44"><span class="section-number-2">7</span> Helper Functions</h2>
|
||||
<div class="outline-text-2" id="text-7">
|
||||
<p>
|
||||
Private helper-functions that are used by the Sherman-Morrison-Woodbury kernels.
|
||||
@ -1588,8 +1588,8 @@ These functions can only be used internally by the kernels in this module.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org3624a58" class="outline-3">
|
||||
<h3 id="org3624a58"><span class="section-number-3">7.1</span> <code>qmckl_slagel_splitting</code></h3>
|
||||
<div id="outline-container-org6f53a9e" class="outline-3">
|
||||
<h3 id="org6f53a9e"><span class="section-number-3">7.1</span> <code>qmckl_slagel_splitting</code></h3>
|
||||
<div class="outline-text-3" id="text-7-1">
|
||||
<p>
|
||||
<code>qmckl_slagel_splitting</code> is the non-recursive, inner part of the 'Sherman-Morrison with update splitting'-kernel.
|
||||
@ -1609,7 +1609,7 @@ If the determinant of the Slater-matrix is passed, it will be updated to the det
|
||||
from applying the updates to the original matrix.
|
||||
</p>
|
||||
|
||||
<table id="org69b0d35" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orge8ce4b4" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1703,8 +1703,8 @@ from applying the updates to the original matrix.
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-orgf521ebe" class="outline-4">
|
||||
<h4 id="orgf521ebe"><span class="section-number-4">7.1.1</span> Requirements</h4>
|
||||
<div id="outline-container-org8c68573" class="outline-4">
|
||||
<h4 id="org8c68573"><span class="section-number-4">7.1.1</span> Requirements</h4>
|
||||
<div class="outline-text-4" id="text-7-1-1">
|
||||
<ul class="org-ul">
|
||||
<li><code>LDS >= 2</code></li>
|
||||
@ -1721,8 +1721,8 @@ from applying the updates to the original matrix.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf13d1e7" class="outline-4">
|
||||
<h4 id="orgf13d1e7"><span class="section-number-4">7.1.2</span> C header</h4>
|
||||
<div id="outline-container-org51f8bc1" class="outline-4">
|
||||
<h4 id="org51f8bc1"><span class="section-number-4">7.1.2</span> C header</h4>
|
||||
<div class="outline-text-4" id="text-7-1-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">double</span> <span style="color: #0000ff;">qmckl_slagel_splitting</span> (
|
||||
@ -1742,8 +1742,8 @@ from applying the updates to the original matrix.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org8c8219a" class="outline-4">
|
||||
<h4 id="org8c8219a"><span class="section-number-4">7.1.3</span> C source</h4>
|
||||
<div id="outline-container-orgaabba6f" class="outline-4">
|
||||
<h4 id="orgaabba6f"><span class="section-number-4">7.1.3</span> C source</h4>
|
||||
<div class="outline-text-4" id="text-7-1-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #483d8b;">#include</span> <span style="color: #8b2252;"><stdbool.h></span>
|
||||
@ -1821,8 +1821,8 @@ from applying the updates to the original matrix.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org042e638" class="outline-4">
|
||||
<h4 id="org042e638"><span class="section-number-4">7.1.4</span> Performance</h4>
|
||||
<div id="outline-container-org8e0fa31" class="outline-4">
|
||||
<h4 id="org8e0fa31"><span class="section-number-4">7.1.4</span> Performance</h4>
|
||||
<div class="outline-text-4" id="text-7-1-4">
|
||||
<p>
|
||||
This function cannot be used by itself and is used in Sherman-Morrison with update splitting and Woodbury 3x3 and 2x2
|
||||
@ -1833,8 +1833,8 @@ with Sherman-Morrison and update splitting. Please look at the performance recco
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org5543f20" class="outline-2">
|
||||
<h2 id="org5543f20"><span class="section-number-2">8</span> End of files</h2>
|
||||
<div id="outline-container-orgbc1a134" class="outline-2">
|
||||
<h2 id="orgbc1a134"><span class="section-number-2">8</span> End of files</h2>
|
||||
<div class="outline-text-2" id="text-8">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"> <span style="color: #0000ff;">assert</span> (<span style="color: #228b22;">qmckl_context_destroy</span>(<span style="color: #a0522d;">context</span>) == QMCKL_SUCCESS);
|
||||
@ -1848,7 +1848,7 @@ with Sherman-Morrison and update splitting. Please look at the performance recco
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2022-01-21 Fri 07:53</p>
|
||||
<p class="date">Created: 2022-01-23 Sun 18:09</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>
|
||||
<!-- 2022-01-21 Fri 07:53 -->
|
||||
<!-- 2022-01-23 Sun 18:09 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Data for Tests</title>
|
||||
@ -233,27 +233,27 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org1ded2a5">1. CHBrClF</a>
|
||||
<li><a href="#org6bf88b8">1. CHBrClF</a>
|
||||
<ul>
|
||||
<li><a href="#org4e01f71">1.1. XYZ coordinates</a></li>
|
||||
<li><a href="#org3619862">1.2. Atomic basis set</a></li>
|
||||
<li><a href="#org38fcdde">1.3. Molecular orbitals</a></li>
|
||||
<li><a href="#org121ad59">1.4. Electron coordinates</a></li>
|
||||
<li><a href="#org52c0988">1.1. XYZ coordinates</a></li>
|
||||
<li><a href="#orgac1cf04">1.2. Atomic basis set</a></li>
|
||||
<li><a href="#org89f5754">1.3. Molecular orbitals</a></li>
|
||||
<li><a href="#orgdee187f">1.4. Electron coordinates</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org4fe53a6">2. N2</a>
|
||||
<li><a href="#org25e8dff">2. N2</a>
|
||||
<ul>
|
||||
<li><a href="#org71f97f3">2.1. XYZ coordinates</a></li>
|
||||
<li><a href="#org5b654b6">2.2. Electron coordinates</a></li>
|
||||
<li><a href="#org8e11ec3">2.3. Jastrow related data</a></li>
|
||||
<li><a href="#orgee48f66">2.1. XYZ coordinates</a></li>
|
||||
<li><a href="#org0af100a">2.2. Electron coordinates</a></li>
|
||||
<li><a href="#org4dfdd2c">2.3. Jastrow related data</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org1ded2a5" class="outline-2">
|
||||
<h2 id="org1ded2a5"><span class="section-number-2">1</span> CHBrClF</h2>
|
||||
<div id="outline-container-org6bf88b8" class="outline-2">
|
||||
<h2 id="org6bf88b8"><span class="section-number-2">1</span> CHBrClF</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
<p>
|
||||
This test is the all-electron Hartree-Fock wave function of CHClBr,
|
||||
@ -337,8 +337,8 @@ and with a high maximum angular momentum.
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org4e01f71" class="outline-3">
|
||||
<h3 id="org4e01f71"><span class="section-number-3">1.1</span> XYZ coordinates</h3>
|
||||
<div id="outline-container-org52c0988" class="outline-3">
|
||||
<h3 id="org52c0988"><span class="section-number-3">1.1</span> XYZ coordinates</h3>
|
||||
<div class="outline-text-3" id="text-1-1">
|
||||
<pre class="example">
|
||||
5
|
||||
@ -368,8 +368,8 @@ Nuclear coordinates are stored in atomic units in transposed format.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org3619862" class="outline-3">
|
||||
<h3 id="org3619862"><span class="section-number-3">1.2</span> Atomic basis set</h3>
|
||||
<div id="outline-container-orgac1cf04" class="outline-3">
|
||||
<h3 id="orgac1cf04"><span class="section-number-3">1.2</span> Atomic basis set</h3>
|
||||
<div class="outline-text-3" id="text-1-2">
|
||||
<pre class="example">
|
||||
HYDROGEN
|
||||
@ -1288,8 +1288,8 @@ F 1
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org38fcdde" class="outline-3">
|
||||
<h3 id="org38fcdde"><span class="section-number-3">1.3</span> Molecular orbitals</h3>
|
||||
<div id="outline-container-org89f5754" class="outline-3">
|
||||
<h3 id="org89f5754"><span class="section-number-3">1.3</span> Molecular orbitals</h3>
|
||||
<div class="outline-text-3" id="text-1-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #483d8b;">#define</span> <span style="color: #a0522d;">chbrclf_mo_num</span> ((<span style="color: #228b22;">int64_t</span>) 224)
|
||||
@ -60213,8 +60213,8 @@ F 1
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org121ad59" class="outline-3">
|
||||
<h3 id="org121ad59"><span class="section-number-3">1.4</span> Electron coordinates</h3>
|
||||
<div id="outline-container-orgdee187f" class="outline-3">
|
||||
<h3 id="orgdee187f"><span class="section-number-3">1.4</span> Electron coordinates</h3>
|
||||
<div class="outline-text-3" id="text-1-4">
|
||||
<p>
|
||||
Electron coordinates are stored in atomic units in normal format.
|
||||
@ -60373,8 +60373,8 @@ Electron coordinates are stored in atomic units in normal format.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org4fe53a6" class="outline-2">
|
||||
<h2 id="org4fe53a6"><span class="section-number-2">2</span> N2</h2>
|
||||
<div id="outline-container-org25e8dff" class="outline-2">
|
||||
<h2 id="org25e8dff"><span class="section-number-2">2</span> N2</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
<p>
|
||||
This test is mainly for the Jastrow factor and was supplied by
|
||||
@ -60415,8 +60415,8 @@ treated by pseudopotentials thus excluded from the actual calculation.
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org71f97f3" class="outline-3">
|
||||
<h3 id="org71f97f3"><span class="section-number-3">2.1</span> XYZ coordinates</h3>
|
||||
<div id="outline-container-orgee48f66" class="outline-3">
|
||||
<h3 id="orgee48f66"><span class="section-number-3">2.1</span> XYZ coordinates</h3>
|
||||
<div class="outline-text-3" id="text-2-1">
|
||||
<pre class="example">
|
||||
2
|
||||
@ -60443,8 +60443,8 @@ Nuclear coordinates are stored in atomic units in transposed format.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org5b654b6" class="outline-3">
|
||||
<h3 id="org5b654b6"><span class="section-number-3">2.2</span> Electron coordinates</h3>
|
||||
<div id="outline-container-org0af100a" class="outline-3">
|
||||
<h3 id="org0af100a"><span class="section-number-3">2.2</span> Electron coordinates</h3>
|
||||
<div class="outline-text-3" id="text-2-2">
|
||||
<p>
|
||||
Electron coordinates are stored in atomic units in normal format.
|
||||
@ -60473,8 +60473,8 @@ Electron coordinates are stored in atomic units in normal format.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org8e11ec3" class="outline-3">
|
||||
<h3 id="org8e11ec3"><span class="section-number-3">2.3</span> Jastrow related data</h3>
|
||||
<div id="outline-container-org4dfdd2c" class="outline-3">
|
||||
<h3 id="org4dfdd2c"><span class="section-number-3">2.3</span> Jastrow related data</h3>
|
||||
<div class="outline-text-3" id="text-2-3">
|
||||
<p>
|
||||
This test is mainly for the Jastrow factor and was supplied by
|
||||
@ -60573,7 +60573,7 @@ Ramon Panades Baruetta.
|
||||
</div>
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="date">Created: 2022-01-21 Fri 07:53</p>
|
||||
<p class="date">Created: 2022-01-23 Sun 18:09</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>
|
||||
<!-- 2022-01-21 Fri 07:53 -->
|
||||
<!-- 2022-01-23 Sun 18:08 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>TREXIO I/O library</title>
|
||||
@ -311,53 +311,53 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org2493f3d">1. Local functions</a>
|
||||
<li><a href="#orga7ccac9">1. Local functions</a>
|
||||
<ul>
|
||||
<li><a href="#org78d3354">1.1. Open file</a></li>
|
||||
<li><a href="#orgf136ced">1.2. Electron</a></li>
|
||||
<li><a href="#org0f55550">1.3. Nucleus</a>
|
||||
<li><a href="#orge57f37f">1.1. Open file</a></li>
|
||||
<li><a href="#org9fc9cd2">1.2. Electron</a></li>
|
||||
<li><a href="#org301ad50">1.3. Nucleus</a>
|
||||
<ul>
|
||||
<li><a href="#org1789ee5">1.3.1. Number of nuclei</a></li>
|
||||
<li><a href="#org6cb3415">1.3.2. Nuclear charges</a></li>
|
||||
<li><a href="#org72bdc97">1.3.3. Nuclear coordinates</a></li>
|
||||
<li><a href="#org2bbdf27">1.3.1. Number of nuclei</a></li>
|
||||
<li><a href="#orgc60f951">1.3.2. Nuclear charges</a></li>
|
||||
<li><a href="#org8f5cb15">1.3.3. Nuclear coordinates</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgcc7bfc3">1.4. Basis set and AOs</a>
|
||||
<li><a href="#org48cb60a">1.4. Basis set and AOs</a>
|
||||
<ul>
|
||||
<li><a href="#org38aed6b">1.4.1. Basis set type</a></li>
|
||||
<li><a href="#org1bc79f1">1.4.2. Number of shells</a></li>
|
||||
<li><a href="#org2b19c0e">1.4.3. Number of primitives</a></li>
|
||||
<li><a href="#org48c9d4b">1.4.4. Number of atomic orbitals</a></li>
|
||||
<li><a href="#org8a94a10">1.4.5. Nucleus<sub>index</sub> array</a></li>
|
||||
<li><a href="#org8e4da29">1.4.6. Number of shells per nucleus</a></li>
|
||||
<li><a href="#org5ea5670">1.4.7. Angular momentum</a></li>
|
||||
<li><a href="#orgb3136e2">1.4.8. Number of primitives per shell</a></li>
|
||||
<li><a href="#orgc379a8b">1.4.9. Indices of the primitives</a></li>
|
||||
<li><a href="#org5d23b29">1.4.10. Normalization of the shells</a></li>
|
||||
<li><a href="#orgab23f7b">1.4.11. Exponents</a></li>
|
||||
<li><a href="#org3960b49">1.4.12. Coefficients</a></li>
|
||||
<li><a href="#orgabd7f17">1.4.13. Normalization of the primitivies</a></li>
|
||||
<li><a href="#orgb2386eb">1.4.14. AO Normalization</a></li>
|
||||
<li><a href="#org23d8c52">1.4.1. Basis set type</a></li>
|
||||
<li><a href="#orgf0f0299">1.4.2. Number of shells</a></li>
|
||||
<li><a href="#orgc0e0678">1.4.3. Number of primitives</a></li>
|
||||
<li><a href="#org98a2990">1.4.4. Number of atomic orbitals</a></li>
|
||||
<li><a href="#org37735ae">1.4.5. Nucleus<sub>index</sub> array</a></li>
|
||||
<li><a href="#orgbc9dea6">1.4.6. Number of shells per nucleus</a></li>
|
||||
<li><a href="#org58e6523">1.4.7. Angular momentum</a></li>
|
||||
<li><a href="#org3892767">1.4.8. Number of primitives per shell</a></li>
|
||||
<li><a href="#org8ed309e">1.4.9. Indices of the primitives</a></li>
|
||||
<li><a href="#org0ab2904">1.4.10. Normalization of the shells</a></li>
|
||||
<li><a href="#org0248204">1.4.11. Exponents</a></li>
|
||||
<li><a href="#orgd90c714">1.4.12. Coefficients</a></li>
|
||||
<li><a href="#orgb165bb4">1.4.13. Normalization of the primitivies</a></li>
|
||||
<li><a href="#org91d7529">1.4.14. AO Normalization</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org549b614">1.5. Molecular orbitals</a>
|
||||
<li><a href="#orgd25b902">1.5. Molecular orbitals</a>
|
||||
<ul>
|
||||
<li><a href="#org40f956e">1.5.1. Number of MOs</a></li>
|
||||
<li><a href="#orge213045">1.5.2. MO coefficients</a></li>
|
||||
<li><a href="#org4b3f977">1.5.1. Number of MOs</a></li>
|
||||
<li><a href="#orgc3e11ce">1.5.2. MO coefficients</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org903729d">1.6. <span class="todo TODO">TODO</span> ECP</a></li>
|
||||
<li><a href="#org23deae5">1.6. <span class="todo TODO">TODO</span> ECP</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgfc297fd">2. Read everything</a></li>
|
||||
<li><a href="#org3f1f471">3. Test</a>
|
||||
<li><a href="#orgc9ad893">2. Read everything</a></li>
|
||||
<li><a href="#orge3f632b">3. Test</a>
|
||||
<ul>
|
||||
<li>
|
||||
<ul>
|
||||
<li><a href="#org5e2ef9f">3.0.1. Electrons</a></li>
|
||||
<li><a href="#org3d6f0b4">3.0.2. Nuclei</a></li>
|
||||
<li><a href="#orgfc97c34">3.0.3. Atomic basis</a></li>
|
||||
<li><a href="#org3bdb0b4">3.0.4. MO Basis</a></li>
|
||||
<li><a href="#orgbf3decf">3.0.1. Electrons</a></li>
|
||||
<li><a href="#org1c8d7ea">3.0.2. Nuclei</a></li>
|
||||
<li><a href="#org7a4e88c">3.0.3. Atomic basis</a></li>
|
||||
<li><a href="#org8a5a499">3.0.4. MO Basis</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@ -366,8 +366,8 @@ for the JavaScript code in this tag.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org2493f3d" class="outline-2">
|
||||
<h2 id="org2493f3d"><span class="section-number-2">1</span> Local functions</h2>
|
||||
<div id="outline-container-orga7ccac9" class="outline-2">
|
||||
<h2 id="orga7ccac9"><span class="section-number-2">1</span> Local functions</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
<p>
|
||||
Functions defined in this section are all local: they should not be
|
||||
@ -390,8 +390,8 @@ In the functions defined in this section, we use as local variables
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org78d3354" class="outline-3">
|
||||
<h3 id="org78d3354"><span class="section-number-3">1.1</span> Open file</h3>
|
||||
<div id="outline-container-orge57f37f" class="outline-3">
|
||||
<h3 id="orge57f37f"><span class="section-number-3">1.1</span> Open file</h3>
|
||||
<div class="outline-text-3" id="text-1-1">
|
||||
<p>
|
||||
We first define a helper function to open a file by first trying to
|
||||
@ -423,8 +423,8 @@ groups of data by passing the <code>trexio_t</code> handle.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf136ced" class="outline-3">
|
||||
<h3 id="orgf136ced"><span class="section-number-3">1.2</span> Electron</h3>
|
||||
<div id="outline-container-org9fc9cd2" class="outline-3">
|
||||
<h3 id="org9fc9cd2"><span class="section-number-3">1.2</span> Electron</h3>
|
||||
<div class="outline-text-3" id="text-1-2">
|
||||
<p>
|
||||
In this section we read all the data into the electron data structure.
|
||||
@ -475,8 +475,8 @@ We read the number of up-spin and down-spin electrons.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org0f55550" class="outline-3">
|
||||
<h3 id="org0f55550"><span class="section-number-3">1.3</span> Nucleus</h3>
|
||||
<div id="outline-container-org301ad50" class="outline-3">
|
||||
<h3 id="org301ad50"><span class="section-number-3">1.3</span> Nucleus</h3>
|
||||
<div class="outline-text-3" id="text-1-3">
|
||||
<p>
|
||||
In this section we read the number of nuclei, the molecular geometry and nuclear charges.
|
||||
@ -496,8 +496,8 @@ In this section we read the number of nuclei, the molecular geometry and nuclear
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org1789ee5" class="outline-4">
|
||||
<h4 id="org1789ee5"><span class="section-number-4">1.3.1</span> Number of nuclei</h4>
|
||||
<div id="outline-container-org2bbdf27" class="outline-4">
|
||||
<h4 id="org2bbdf27"><span class="section-number-4">1.3.1</span> Number of nuclei</h4>
|
||||
<div class="outline-text-4" id="text-1-3-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">nucleus_num</span> = 0L;
|
||||
@ -520,8 +520,8 @@ rc = qmckl_set_nucleus_num(context, nucleus_num);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6cb3415" class="outline-4">
|
||||
<h4 id="org6cb3415"><span class="section-number-4">1.3.2</span> Nuclear charges</h4>
|
||||
<div id="outline-container-orgc60f951" class="outline-4">
|
||||
<h4 id="orgc60f951"><span class="section-number-4">1.3.2</span> Nuclear charges</h4>
|
||||
<div class="outline-text-4" id="text-1-3-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">{
|
||||
@ -547,8 +547,7 @@ rc = qmckl_set_nucleus_num(context, nucleus_num);
|
||||
trexio_string_of_error(rcio));
|
||||
}
|
||||
|
||||
//<span style="color: #b22222;">rc = qmckl_set_nucleus_charge(context, nucl_charge, nucleus_num);</span>
|
||||
rc = qmckl_set_nucleus_charge(context, nucl_charge);
|
||||
rc = qmckl_set_nucleus_charge(context, nucl_charge, nucleus_num);
|
||||
|
||||
qmckl_free(context, nucl_charge);
|
||||
nucl_charge = <span style="color: #008b8b;">NULL</span>;
|
||||
@ -562,8 +561,8 @@ rc = qmckl_set_nucleus_num(context, nucleus_num);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org72bdc97" class="outline-4">
|
||||
<h4 id="org72bdc97"><span class="section-number-4">1.3.3</span> Nuclear coordinates</h4>
|
||||
<div id="outline-container-org8f5cb15" class="outline-4">
|
||||
<h4 id="org8f5cb15"><span class="section-number-4">1.3.3</span> Nuclear coordinates</h4>
|
||||
<div class="outline-text-4" id="text-1-3-3">
|
||||
<p>
|
||||
Now, we read the molecular geometry. It is stored in normal format
|
||||
@ -594,8 +593,7 @@ in the TREXIO file (<code>'N'</code>), so it will be automatically transposed in
|
||||
trexio_string_of_error(rcio));
|
||||
}
|
||||
|
||||
//<span style="color: #b22222;">rc = qmckl_set_nucleus_coord(context, 'N', nucl_coord, 3*nucleus_num);</span>
|
||||
rc = qmckl_set_nucleus_coord(context, <span style="color: #8b2252;">'N'</span>, nucl_coord);
|
||||
rc = qmckl_set_nucleus_coord(context, <span style="color: #8b2252;">'N'</span>, nucl_coord, 3*nucleus_num);
|
||||
|
||||
qmckl_free(context, nucl_coord);
|
||||
nucl_coord = <span style="color: #008b8b;">NULL</span>;
|
||||
@ -619,8 +617,8 @@ in the TREXIO file (<code>'N'</code>), so it will be automatically transposed in
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgcc7bfc3" class="outline-3">
|
||||
<h3 id="orgcc7bfc3"><span class="section-number-3">1.4</span> Basis set and AOs</h3>
|
||||
<div id="outline-container-org48cb60a" class="outline-3">
|
||||
<h3 id="org48cb60a"><span class="section-number-3">1.4</span> Basis set and AOs</h3>
|
||||
<div class="outline-text-3" id="text-1-4">
|
||||
<p>
|
||||
In this section we read the atomic basis set and atomic orbitals.
|
||||
@ -646,8 +644,8 @@ In this section we read the atomic basis set and atomic orbitals.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org38aed6b" class="outline-4">
|
||||
<h4 id="org38aed6b"><span class="section-number-4">1.4.1</span> Basis set type</h4>
|
||||
<div id="outline-container-org23d8c52" class="outline-4">
|
||||
<h4 id="org23d8c52"><span class="section-number-4">1.4.1</span> Basis set type</h4>
|
||||
<div class="outline-text-4" id="text-1-4-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #483d8b;">#define</span> <span style="color: #a0522d;">MAX_STR_LEN</span> 1024
|
||||
@ -678,8 +676,8 @@ In this section we read the atomic basis set and atomic orbitals.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org1bc79f1" class="outline-4">
|
||||
<h4 id="org1bc79f1"><span class="section-number-4">1.4.2</span> Number of shells</h4>
|
||||
<div id="outline-container-orgf0f0299" class="outline-4">
|
||||
<h4 id="orgf0f0299"><span class="section-number-4">1.4.2</span> Number of shells</h4>
|
||||
<div class="outline-text-4" id="text-1-4-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">shell_num</span> = 0L;
|
||||
@ -703,8 +701,8 @@ rc = qmckl_set_ao_basis_shell_num(context, shell_num);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org2b19c0e" class="outline-4">
|
||||
<h4 id="org2b19c0e"><span class="section-number-4">1.4.3</span> Number of primitives</h4>
|
||||
<div id="outline-container-orgc0e0678" class="outline-4">
|
||||
<h4 id="orgc0e0678"><span class="section-number-4">1.4.3</span> Number of primitives</h4>
|
||||
<div class="outline-text-4" id="text-1-4-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">prim_num</span> = 0L;
|
||||
@ -728,8 +726,8 @@ rc = qmckl_set_ao_basis_prim_num(context, prim_num);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org48c9d4b" class="outline-4">
|
||||
<h4 id="org48c9d4b"><span class="section-number-4">1.4.4</span> Number of atomic orbitals</h4>
|
||||
<div id="outline-container-org98a2990" class="outline-4">
|
||||
<h4 id="org98a2990"><span class="section-number-4">1.4.4</span> Number of atomic orbitals</h4>
|
||||
<div class="outline-text-4" id="text-1-4-4">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">ao_num</span> = 0LL;
|
||||
@ -753,8 +751,8 @@ rc = qmckl_set_ao_basis_ao_num(context, ao_num);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org8a94a10" class="outline-4">
|
||||
<h4 id="org8a94a10"><span class="section-number-4">1.4.5</span> Nucleus<sub>index</sub> array</h4>
|
||||
<div id="outline-container-org37735ae" class="outline-4">
|
||||
<h4 id="org37735ae"><span class="section-number-4">1.4.5</span> Nucleus<sub>index</sub> array</h4>
|
||||
<div class="outline-text-4" id="text-1-4-5">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">{
|
||||
@ -836,8 +834,8 @@ rc = qmckl_set_ao_basis_ao_num(context, ao_num);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org8e4da29" class="outline-4">
|
||||
<h4 id="org8e4da29"><span class="section-number-4">1.4.6</span> Number of shells per nucleus</h4>
|
||||
<div id="outline-container-orgbc9dea6" class="outline-4">
|
||||
<h4 id="orgbc9dea6"><span class="section-number-4">1.4.6</span> Number of shells per nucleus</h4>
|
||||
<div class="outline-text-4" id="text-1-4-6">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">{
|
||||
@ -922,8 +920,8 @@ rc = qmckl_set_ao_basis_ao_num(context, ao_num);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org5ea5670" class="outline-4">
|
||||
<h4 id="org5ea5670"><span class="section-number-4">1.4.7</span> Angular momentum</h4>
|
||||
<div id="outline-container-org58e6523" class="outline-4">
|
||||
<h4 id="org58e6523"><span class="section-number-4">1.4.7</span> Angular momentum</h4>
|
||||
<div class="outline-text-4" id="text-1-4-7">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">{
|
||||
@ -968,8 +966,8 @@ rc = qmckl_set_ao_basis_ao_num(context, ao_num);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgb3136e2" class="outline-4">
|
||||
<h4 id="orgb3136e2"><span class="section-number-4">1.4.8</span> Number of primitives per shell</h4>
|
||||
<div id="outline-container-org3892767" class="outline-4">
|
||||
<h4 id="org3892767"><span class="section-number-4">1.4.8</span> Number of primitives per shell</h4>
|
||||
<div class="outline-text-4" id="text-1-4-8">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">{
|
||||
@ -1053,8 +1051,8 @@ rc = qmckl_set_ao_basis_ao_num(context, ao_num);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgc379a8b" class="outline-4">
|
||||
<h4 id="orgc379a8b"><span class="section-number-4">1.4.9</span> Indices of the primitives</h4>
|
||||
<div id="outline-container-org8ed309e" class="outline-4">
|
||||
<h4 id="org8ed309e"><span class="section-number-4">1.4.9</span> Indices of the primitives</h4>
|
||||
<div class="outline-text-4" id="text-1-4-9">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">{
|
||||
@ -1134,8 +1132,8 @@ rc = qmckl_set_ao_basis_ao_num(context, ao_num);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org5d23b29" class="outline-4">
|
||||
<h4 id="org5d23b29"><span class="section-number-4">1.4.10</span> Normalization of the shells</h4>
|
||||
<div id="outline-container-org0ab2904" class="outline-4">
|
||||
<h4 id="org0ab2904"><span class="section-number-4">1.4.10</span> Normalization of the shells</h4>
|
||||
<div class="outline-text-4" id="text-1-4-10">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">{
|
||||
@ -1180,8 +1178,8 @@ rc = qmckl_set_ao_basis_ao_num(context, ao_num);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgab23f7b" class="outline-4">
|
||||
<h4 id="orgab23f7b"><span class="section-number-4">1.4.11</span> Exponents</h4>
|
||||
<div id="outline-container-org0248204" class="outline-4">
|
||||
<h4 id="org0248204"><span class="section-number-4">1.4.11</span> Exponents</h4>
|
||||
<div class="outline-text-4" id="text-1-4-11">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">{
|
||||
@ -1226,8 +1224,8 @@ rc = qmckl_set_ao_basis_ao_num(context, ao_num);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org3960b49" class="outline-4">
|
||||
<h4 id="org3960b49"><span class="section-number-4">1.4.12</span> Coefficients</h4>
|
||||
<div id="outline-container-orgd90c714" class="outline-4">
|
||||
<h4 id="orgd90c714"><span class="section-number-4">1.4.12</span> Coefficients</h4>
|
||||
<div class="outline-text-4" id="text-1-4-12">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">{
|
||||
@ -1272,8 +1270,8 @@ rc = qmckl_set_ao_basis_ao_num(context, ao_num);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgabd7f17" class="outline-4">
|
||||
<h4 id="orgabd7f17"><span class="section-number-4">1.4.13</span> Normalization of the primitivies</h4>
|
||||
<div id="outline-container-orgb165bb4" class="outline-4">
|
||||
<h4 id="orgb165bb4"><span class="section-number-4">1.4.13</span> Normalization of the primitivies</h4>
|
||||
<div class="outline-text-4" id="text-1-4-13">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">{
|
||||
@ -1318,8 +1316,8 @@ rc = qmckl_set_ao_basis_ao_num(context, ao_num);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgb2386eb" class="outline-4">
|
||||
<h4 id="orgb2386eb"><span class="section-number-4">1.4.14</span> AO Normalization</h4>
|
||||
<div id="outline-container-org91d7529" class="outline-4">
|
||||
<h4 id="org91d7529"><span class="section-number-4">1.4.14</span> AO Normalization</h4>
|
||||
<div class="outline-text-4" id="text-1-4-14">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">{
|
||||
@ -1374,8 +1372,8 @@ rc = qmckl_set_ao_basis_ao_num(context, ao_num);
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-org549b614" class="outline-3">
|
||||
<h3 id="org549b614"><span class="section-number-3">1.5</span> Molecular orbitals</h3>
|
||||
<div id="outline-container-orgd25b902" class="outline-3">
|
||||
<h3 id="orgd25b902"><span class="section-number-3">1.5</span> Molecular orbitals</h3>
|
||||
<div class="outline-text-3" id="text-1-5">
|
||||
<p>
|
||||
In this section we read the MO coefficients.
|
||||
@ -1401,8 +1399,8 @@ In this section we read the MO coefficients.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org40f956e" class="outline-4">
|
||||
<h4 id="org40f956e"><span class="section-number-4">1.5.1</span> Number of MOs</h4>
|
||||
<div id="outline-container-org4b3f977" class="outline-4">
|
||||
<h4 id="org4b3f977"><span class="section-number-4">1.5.1</span> Number of MOs</h4>
|
||||
<div class="outline-text-4" id="text-1-5-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">mo_num</span> = 0L;
|
||||
@ -1425,8 +1423,8 @@ rc = qmckl_set_mo_basis_mo_num(context, mo_num);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge213045" class="outline-4">
|
||||
<h4 id="orge213045"><span class="section-number-4">1.5.2</span> MO coefficients</h4>
|
||||
<div id="outline-container-orgc3e11ce" class="outline-4">
|
||||
<h4 id="orgc3e11ce"><span class="section-number-4">1.5.2</span> MO coefficients</h4>
|
||||
<div class="outline-text-4" id="text-1-5-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">{
|
||||
@ -1475,12 +1473,12 @@ rc = qmckl_set_mo_basis_mo_num(context, mo_num);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org903729d" class="outline-3">
|
||||
<h3 id="org903729d"><span class="section-number-3">1.6</span> <span class="todo TODO">TODO</span> ECP</h3>
|
||||
<div id="outline-container-org23deae5" class="outline-3">
|
||||
<h3 id="org23deae5"><span class="section-number-3">1.6</span> <span class="todo TODO">TODO</span> ECP</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-orgfc297fd" class="outline-2">
|
||||
<h2 id="orgfc297fd"><span class="section-number-2">2</span> Read everything</h2>
|
||||
<div id="outline-container-orgc9ad893" class="outline-2">
|
||||
<h2 id="orgc9ad893"><span class="section-number-2">2</span> Read everything</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #0000ff;">qmckl_trexio_read</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;">char</span>* <span style="color: #a0522d;">file_name</span>);
|
||||
@ -1561,8 +1559,8 @@ rc = qmckl_set_mo_basis_mo_num(context, mo_num);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org3f1f471" class="outline-2">
|
||||
<h2 id="org3f1f471"><span class="section-number-2">3</span> Test</h2>
|
||||
<div id="outline-container-orge3f632b" class="outline-2">
|
||||
<h2 id="orge3f632b"><span class="section-number-2">3</span> Test</h2>
|
||||
<div class="outline-text-2" id="text-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #483d8b;">#ifdef</span> HAVE_TREXIO
|
||||
@ -1596,8 +1594,8 @@ rc = qmckl_trexio_read(context, fname);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org5e2ef9f" class="outline-4">
|
||||
<h4 id="org5e2ef9f"><span class="section-number-4">3.0.1</span> Electrons</h4>
|
||||
<div id="outline-container-orgbf3decf" class="outline-4">
|
||||
<h4 id="orgbf3decf"><span class="section-number-4">3.0.1</span> Electrons</h4>
|
||||
<div class="outline-text-4" id="text-3-0-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">printf(<span style="color: #8b2252;">"Electrons\n"</span>);
|
||||
@ -1615,8 +1613,8 @@ rc = qmckl_get_electron_down_num(context, &dn_num);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org3d6f0b4" class="outline-4">
|
||||
<h4 id="org3d6f0b4"><span class="section-number-4">3.0.2</span> Nuclei</h4>
|
||||
<div id="outline-container-org1c8d7ea" class="outline-4">
|
||||
<h4 id="org1c8d7ea"><span class="section-number-4">3.0.2</span> Nuclei</h4>
|
||||
<div class="outline-text-4" id="text-3-0-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">printf(<span style="color: #8b2252;">"Nuclei\n"</span>);
|
||||
@ -1628,7 +1626,7 @@ rc = qmckl_get_nucleus_num(context, &nucl_num);
|
||||
|
||||
printf(<span style="color: #8b2252;">"Nuclear charges\n"</span>);
|
||||
<span style="color: #228b22;">double</span> * <span style="color: #a0522d;">charge</span> = (<span style="color: #228b22;">double</span>*) <span style="color: #0000ff;">malloc</span> (<span style="color: #228b22;">nucl_num</span> * <span style="color: #a020f0;">sizeof</span>(<span style="color: #228b22;">double</span>));
|
||||
rc = qmckl_get_nucleus_charge(context, charge);
|
||||
rc = qmckl_get_nucleus_charge(context, charge, nucl_num);
|
||||
<span style="color: #0000ff;">assert</span> (rc == QMCKL_SUCCESS);
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">int</span> <span style="color: #a0522d;">i</span>=0 ; i<nucl_num ; i++) {
|
||||
assert (charge[i] == chbrclf_charge[i]);
|
||||
@ -1638,7 +1636,7 @@ charge = <span style="color: #008b8b;">NULL</span>;
|
||||
|
||||
printf(<span style="color: #8b2252;">"Nuclear coordinates\n"</span>);
|
||||
<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;">nucl_num</span> * 3 * <span style="color: #a020f0;">sizeof</span>(<span style="color: #228b22;">double</span>));
|
||||
rc = qmckl_get_nucleus_coord(context, <span style="color: #8b2252;">'T'</span>, coord);
|
||||
rc = qmckl_get_nucleus_coord(context, <span style="color: #8b2252;">'T'</span>, coord, 3*nucl_num);
|
||||
<span style="color: #0000ff;">assert</span> (rc == QMCKL_SUCCESS);
|
||||
<span style="color: #228b22;">int</span> <span style="color: #a0522d;">k</span>=0;
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">int</span> <span style="color: #a0522d;">j</span>=0 ; j<3 ; ++j) {
|
||||
@ -1656,8 +1654,8 @@ coord = <span style="color: #008b8b;">NULL</span>;
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgfc97c34" class="outline-4">
|
||||
<h4 id="orgfc97c34"><span class="section-number-4">3.0.3</span> Atomic basis</h4>
|
||||
<div id="outline-container-org7a4e88c" class="outline-4">
|
||||
<h4 id="org7a4e88c"><span class="section-number-4">3.0.3</span> Atomic basis</h4>
|
||||
<div class="outline-text-4" id="text-3-0-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">printf(<span style="color: #8b2252;">"Atomic basis\n"</span>);
|
||||
@ -1765,8 +1763,8 @@ prim_factor = <span style="color: #008b8b;">NULL</span>;
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org3bdb0b4" class="outline-4">
|
||||
<h4 id="org3bdb0b4"><span class="section-number-4">3.0.4</span> MO Basis</h4>
|
||||
<div id="outline-container-org8a5a499" class="outline-4">
|
||||
<h4 id="org8a5a499"><span class="section-number-4">3.0.4</span> MO Basis</h4>
|
||||
<div class="outline-text-4" id="text-3-0-4">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">printf(<span style="color: #8b2252;">"MOs\n"</span>);
|
||||
@ -1796,7 +1794,7 @@ charge = <span style="color: #008b8b;">NULL</span>;
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2022-01-21 Fri 07:53</p>
|
||||
<p class="date">Created: 2022-01-23 Sun 18:08</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
523
qmckl_utils.html
523
qmckl_utils.html
@ -1,523 +0,0 @@
|
||||
<?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>
|
||||
<!-- 2022-01-21 Fri 07:53 -->
|
||||
<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="#org390320c">1. Matrix operations</a>
|
||||
<ul>
|
||||
<li><a href="#org04d873f">1.1. <code>qmckl_transpose</code></a>
|
||||
<ul>
|
||||
<li><a href="#org2c948b2">1.1.1. Requirements</a></li>
|
||||
<li><a href="#orgc4b62ee">1.1.2. C header</a></li>
|
||||
<li><a href="#org02ff125">1.1.3. Source</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org390320c" class="outline-2">
|
||||
<h2 id="org390320c"><span class="section-number-2">1</span> Matrix operations</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
</div>
|
||||
<div id="outline-container-org04d873f" class="outline-3">
|
||||
<h3 id="org04d873f"><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="orge94cdb2" 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-org2c948b2" class="outline-4">
|
||||
<h4 id="org2c948b2"><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-orgc4b62ee" class="outline-4">
|
||||
<h4 id="orgc4b62ee"><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;">context</span> <span style="color: #a0522d;">qmckl_context</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">m</span> <span style="color: #a0522d;">int64_t</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">n</span> <span style="color: #a0522d;">int64_t</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">A</span>* <span style="color: #228b22;">double</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">lda</span> <span style="color: #a0522d;">int64_t</span>,
|
||||
<span style="color: #228b22;">B</span>* <span style="color: #a020f0;">const</span> <span style="color: #228b22;">double</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">ldb</span> <span style="color: #a0522d;">int64_t</span> );
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org02ff125" class="outline-4">
|
||||
<h4 id="org02ff125"><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: 2022-01-21 Fri 07:53</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
</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>
|
||||
<!-- 2022-01-21 Fri 07:53 -->
|
||||
<!-- 2022-01-23 Sun 18:08 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Verificarlo CI</title>
|
||||
@ -311,22 +311,22 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#orgfb8e7be">1. Verificarlo probes</a>
|
||||
<li><a href="#org5076b6e">1. Verificarlo probes</a>
|
||||
<ul>
|
||||
<li><a href="#orgcd06422">1.1. Automatically initialize the <code>vfc_probe</code> object if <code>VFC_CI</code> is defined</a></li>
|
||||
<li><a href="#orgbfa3a49">1.2. Standard probe, without check</a></li>
|
||||
<li><a href="#orgedd011b">1.3. Probe with absolute check</a></li>
|
||||
<li><a href="#org4101e1c">1.4. Probe with relative check</a></li>
|
||||
<li><a href="#orga9d892d">1.5. Automatically delete and dump the vfc<sub>probe</sub> object if <code>VFC_CI</code> is defined</a></li>
|
||||
<li><a href="#orgbc66e7d">1.1. Automatically initialize the <code>vfc_probe</code> object if <code>VFC_CI</code> is defined</a></li>
|
||||
<li><a href="#org4308c6f">1.2. Standard probe, without check</a></li>
|
||||
<li><a href="#org1334729">1.3. Probe with absolute check</a></li>
|
||||
<li><a href="#org1061b04">1.4. Probe with relative check</a></li>
|
||||
<li><a href="#org3aaa333">1.5. Automatically delete and dump the vfc<sub>probe</sub> object if <code>VFC_CI</code> is defined</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orge282822">2. Fortran wrappers</a></li>
|
||||
<li><a href="#org42c34d6">2. Fortran wrappers</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgfb8e7be" class="outline-2">
|
||||
<h2 id="orgfb8e7be"><span class="section-number-2">1</span> Verificarlo probes</h2>
|
||||
<div id="outline-container-org5076b6e" class="outline-2">
|
||||
<h2 id="org5076b6e"><span class="section-number-2">1</span> Verificarlo probes</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
<p>
|
||||
This file contains utility functions to enable the Verificarlo
|
||||
@ -377,8 +377,8 @@ To learn more about Verificarlo CI :
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-orgcd06422" class="outline-3">
|
||||
<h3 id="orgcd06422"><span class="section-number-3">1.1</span> Automatically initialize the <code>vfc_probe</code> object if <code>VFC_CI</code> is defined</h3>
|
||||
<div id="outline-container-orgbc66e7d" class="outline-3">
|
||||
<h3 id="orgbc66e7d"><span class="section-number-3">1.1</span> Automatically initialize the <code>vfc_probe</code> object if <code>VFC_CI</code> is defined</h3>
|
||||
<div class="outline-text-3" id="text-1-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #483d8b;">#ifdef</span> VFC_CI
|
||||
@ -398,8 +398,8 @@ To learn more about Verificarlo CI :
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgbfa3a49" class="outline-3">
|
||||
<h3 id="orgbfa3a49"><span class="section-number-3">1.2</span> Standard probe, without check</h3>
|
||||
<div id="outline-container-org4308c6f" class="outline-3">
|
||||
<h3 id="org4308c6f"><span class="section-number-3">1.2</span> Standard probe, without check</h3>
|
||||
<div class="outline-text-3" id="text-1-2">
|
||||
<ul class="org-ul">
|
||||
<li>if <code>VFC_CI</code> is defined, place a standard probe</li>
|
||||
@ -434,8 +434,8 @@ if <code>VFC_CI</code> is undefined, return <code>false</code> (no error)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgedd011b" class="outline-3">
|
||||
<h3 id="orgedd011b"><span class="section-number-3">1.3</span> Probe with absolute check</h3>
|
||||
<div id="outline-container-org1334729" class="outline-3">
|
||||
<h3 id="org1334729"><span class="section-number-3">1.3</span> Probe with absolute check</h3>
|
||||
<div class="outline-text-3" id="text-1-3">
|
||||
<ul class="org-ul">
|
||||
<li>if <code>VFC_CI</code> is defined, place a probe with an absolute check</li>
|
||||
@ -475,8 +475,8 @@ and accuracy
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org4101e1c" class="outline-3">
|
||||
<h3 id="org4101e1c"><span class="section-number-3">1.4</span> Probe with relative check</h3>
|
||||
<div id="outline-container-org1061b04" class="outline-3">
|
||||
<h3 id="org1061b04"><span class="section-number-3">1.4</span> Probe with relative check</h3>
|
||||
<div class="outline-text-3" id="text-1-4">
|
||||
<ul class="org-ul">
|
||||
<li>if <code>VFC_CI</code> is defined, place a probe with a relative check</li>
|
||||
@ -516,8 +516,8 @@ and accuracy
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orga9d892d" class="outline-3">
|
||||
<h3 id="orga9d892d"><span class="section-number-3">1.5</span> Automatically delete and dump the vfc<sub>probe</sub> object if <code>VFC_CI</code> is defined</h3>
|
||||
<div id="outline-container-org3aaa333" class="outline-3">
|
||||
<h3 id="org3aaa333"><span class="section-number-3">1.5</span> Automatically delete and dump the vfc<sub>probe</sub> object if <code>VFC_CI</code> is defined</h3>
|
||||
<div class="outline-text-3" id="text-1-5">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #483d8b;">#ifdef</span> VFC_CI
|
||||
@ -538,8 +538,8 @@ and accuracy
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge282822" class="outline-2">
|
||||
<h2 id="orge282822"><span class="section-number-2">2</span> Fortran wrappers</h2>
|
||||
<div id="outline-container-org42c34d6" class="outline-2">
|
||||
<h2 id="org42c34d6"><span class="section-number-2">2</span> Fortran wrappers</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">bool</span> <span style="color: #0000ff;">qmckl_probe_f</span>(
|
||||
@ -663,7 +663,7 @@ and accuracy
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2022-01-21 Fri 07:53</p>
|
||||
<p class="date">Created: 2022-01-23 Sun 18:08</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
Loading…
Reference in New Issue
Block a user