mirror of
https://github.com/TREX-CoE/trexio.git
synced 2024-12-24 13:23:44 +01:00
Deploying to gh-pages from @ TREX-CoE/trexio@9a6eb9a0f1 🚀
This commit is contained in:
parent
cc963c019c
commit
2a6e752f7d
@ -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-07 Fri 18:41 -->
|
||||
<!-- 2022-01-10 Mon 09:28 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>TREXIO source code documentation</title>
|
||||
@ -347,7 +347,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-07 Fri 18:41</p>
|
||||
<p class="date">Created: 2022-01-10 Mon 09:28</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
110
examples.html
110
examples.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-07 Fri 18:41 -->
|
||||
<!-- 2022-01-10 Mon 09:28 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Examples</title>
|
||||
@ -333,24 +333,24 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#orgaafbe10">1. Accessing sparse quantities</a>
|
||||
<li><a href="#org57a9729">1. Accessing sparse quantities</a>
|
||||
<ul>
|
||||
<li><a href="#org95fcbf4">1.1. Fortran</a>
|
||||
<li><a href="#org62eaa47">1.1. Fortran</a>
|
||||
<ul>
|
||||
<li><a href="#org7a738d5">1.1.1. Declare Temporary variables</a></li>
|
||||
<li><a href="#org31f6867">1.1.2. Obtain the name of the TREXIO file from the command line, and open it for reading</a></li>
|
||||
<li><a href="#org2ffe1e6">1.1.3. Read the nuclear repulsion energy</a></li>
|
||||
<li><a href="#orgf836c70">1.1.4. Read the number of molecular orbitals</a></li>
|
||||
<li><a href="#org0a54b8a">1.1.5. Allocate memory</a></li>
|
||||
<li><a href="#org634663f">1.1.6. Read one-electron quantities</a></li>
|
||||
<li><a href="#orgadfa0ec">1.1.7. Read two-electron quantities</a>
|
||||
<li><a href="#org9e00b20">1.1.1. Declare Temporary variables</a></li>
|
||||
<li><a href="#org5475759">1.1.2. Obtain the name of the TREXIO file from the command line, and open it for reading</a></li>
|
||||
<li><a href="#org6cca1e8">1.1.3. Read the nuclear repulsion energy</a></li>
|
||||
<li><a href="#org254a250">1.1.4. Read the number of molecular orbitals</a></li>
|
||||
<li><a href="#org60edb66">1.1.5. Allocate memory</a></li>
|
||||
<li><a href="#org788d0f3">1.1.6. Read one-electron quantities</a></li>
|
||||
<li><a href="#orgce2e21a">1.1.7. Read two-electron quantities</a>
|
||||
<ul>
|
||||
<li><a href="#org6fa01c3">1.1.7.1. Electron repulsion integrals</a></li>
|
||||
<li><a href="#org2bb55c9">1.1.7.2. Reduced density matrix</a></li>
|
||||
<li><a href="#orgdef46f2">1.1.7.1. Electron repulsion integrals</a></li>
|
||||
<li><a href="#orgf6677a7">1.1.7.2. Reduced density matrix</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org46fe1a8">1.1.8. Compute the energy</a></li>
|
||||
<li><a href="#org5bd1227">1.1.9. Terminate</a></li>
|
||||
<li><a href="#orgeb30191">1.1.8. Compute the energy</a></li>
|
||||
<li><a href="#org835f222">1.1.9. Terminate</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@ -360,12 +360,12 @@ for the JavaScript code in this tag.
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-orgaafbe10" class="outline-2">
|
||||
<h2 id="orgaafbe10"><span class="section-number-2">1</span> Accessing sparse quantities</h2>
|
||||
<div id="outline-container-org57a9729" class="outline-2">
|
||||
<h2 id="org57a9729"><span class="section-number-2">1</span> Accessing sparse quantities</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
</div>
|
||||
<div id="outline-container-org95fcbf4" class="outline-3">
|
||||
<h3 id="org95fcbf4"><span class="section-number-3">1.1</span> Fortran</h3>
|
||||
<div id="outline-container-org62eaa47" class="outline-3">
|
||||
<h3 id="org62eaa47"><span class="section-number-3">1.1</span> Fortran</h3>
|
||||
<div class="outline-text-3" id="text-1-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90"><span style="color: #a020f0;">program</span> <span style="color: #0000ff;">print_energy</span>
|
||||
@ -385,25 +385,23 @@ This program computes the energy as:
|
||||
|
||||
<p>
|
||||
\[
|
||||
E = E_{\text{NN}} + \sum_{ij} D_{ij}\, \langle i | h | j \rangle\,
|
||||
+\, \frac{1}{2} \sum_{ijkl} \Gamma_{ijkl}\, \langle i j | k l
|
||||
E = E_{\text{NN}} + \sum_{ij} \gamma_{ij}\, \langle j | h | i \rangle\,
|
||||
+\, \frac{1}{2} \sum_{ijkl} \Gamma_{ijkl}\, \langle k l | i j
|
||||
\rangle\; \textrm{ with } \; 0 < i,j,k,l \le n
|
||||
\]
|
||||
</p>
|
||||
|
||||
<p>
|
||||
One needs to read from the TREXIO file:
|
||||
</p>
|
||||
|
||||
<dl class="org-dl">
|
||||
<dt>\(n\)</dt><dd>The number of molecular orbitals</dd>
|
||||
<dt>\(E_{\text{NN}}\)</dt><dd>The nuclear repulsion energy</dd>
|
||||
<dt>\(D_{ij}\)</dt><dd>The one-body reduced density matrix</dd>
|
||||
<dt>\(\langle i |h| j \rangle\)</dt><dd>The one-electron Hamiltonian integrals</dd>
|
||||
<dt>\(\gamma_{ij}\)</dt><dd>The one-body reduced density matrix</dd>
|
||||
<dt>\(\langle j |h| i \rangle\)</dt><dd>The one-electron Hamiltonian integrals</dd>
|
||||
<dt>\(\Gamma_{ijkl}\)</dt><dd>The two-body reduced density matrix</dd>
|
||||
<dt>\(\langle i j | k l \rangle\)</dt><dd>The electron repulsion integrals</dd>
|
||||
<dt>\(\langle k l | i j \rangle\)</dt><dd>The electron repulsion integrals</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90"><span style="color: #228b22;">integer</span> ::<span style="color: #a0522d;"> n</span>
|
||||
<span style="color: #228b22;">double precision</span> ::<span style="color: #a0522d;"> E, E_nn</span>
|
||||
@ -413,8 +411,8 @@ One needs to read from the TREXIO file:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org7a738d5" class="outline-4">
|
||||
<h4 id="org7a738d5"><span class="section-number-4">1.1.1</span> Declare Temporary variables</h4>
|
||||
<div id="outline-container-org9e00b20" class="outline-4">
|
||||
<h4 id="org9e00b20"><span class="section-number-4">1.1.1</span> Declare Temporary variables</h4>
|
||||
<div class="outline-text-4" id="text-1-1-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90"><span style="color: #228b22;">integer</span> ::<span style="color: #a0522d;"> i, j, k, l, m</span>
|
||||
@ -429,8 +427,8 @@ One needs to read from the TREXIO file:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org31f6867" class="outline-4">
|
||||
<h4 id="org31f6867"><span class="section-number-4">1.1.2</span> Obtain the name of the TREXIO file from the command line, and open it for reading</h4>
|
||||
<div id="outline-container-org5475759" class="outline-4">
|
||||
<h4 id="org5475759"><span class="section-number-4">1.1.2</span> Obtain the name of the TREXIO file from the command line, and open it for reading</h4>
|
||||
<div class="outline-text-4" id="text-1-1-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90"><span style="color: #a020f0;">call</span> <span style="color: #0000ff;">getarg</span>(1, filename)
|
||||
@ -446,8 +444,8 @@ f = trexio_open (filename, <span style="color: #8b2252;">'r'</span>, TREXIO_HDF5
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org2ffe1e6" class="outline-4">
|
||||
<h4 id="org2ffe1e6"><span class="section-number-4">1.1.3</span> Read the nuclear repulsion energy</h4>
|
||||
<div id="outline-container-org6cca1e8" class="outline-4">
|
||||
<h4 id="org6cca1e8"><span class="section-number-4">1.1.3</span> Read the nuclear repulsion energy</h4>
|
||||
<div class="outline-text-4" id="text-1-1-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90">rc = trexio_read_nucleus_repulsion(f, E_nn)
|
||||
@ -461,8 +459,8 @@ f = trexio_open (filename, <span style="color: #8b2252;">'r'</span>, TREXIO_HDF5
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf836c70" class="outline-4">
|
||||
<h4 id="orgf836c70"><span class="section-number-4">1.1.4</span> Read the number of molecular orbitals</h4>
|
||||
<div id="outline-container-org254a250" class="outline-4">
|
||||
<h4 id="org254a250"><span class="section-number-4">1.1.4</span> Read the number of molecular orbitals</h4>
|
||||
<div class="outline-text-4" id="text-1-1-4">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90">rc = trexio_read_mo_num(f, n)
|
||||
@ -476,8 +474,8 @@ f = trexio_open (filename, <span style="color: #8b2252;">'r'</span>, TREXIO_HDF5
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org0a54b8a" class="outline-4">
|
||||
<h4 id="org0a54b8a"><span class="section-number-4">1.1.5</span> Allocate memory</h4>
|
||||
<div id="outline-container-org60edb66" class="outline-4">
|
||||
<h4 id="org60edb66"><span class="section-number-4">1.1.5</span> Allocate memory</h4>
|
||||
<div class="outline-text-4" id="text-1-1-5">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90"><span style="color: #a020f0;">allocate</span>( D(n,n), h0(n,n) )
|
||||
@ -489,8 +487,8 @@ W(:,:,:,:) = 0.d0
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org634663f" class="outline-4">
|
||||
<h4 id="org634663f"><span class="section-number-4">1.1.6</span> Read one-electron quantities</h4>
|
||||
<div id="outline-container-org788d0f3" class="outline-4">
|
||||
<h4 id="org788d0f3"><span class="section-number-4">1.1.6</span> Read one-electron quantities</h4>
|
||||
<div class="outline-text-4" id="text-1-1-6">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90">rc = trexio_has_mo_1e_int_core_hamiltonian(f)
|
||||
@ -522,8 +520,8 @@ rc = trexio_read_rdm_1e(f, D)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgadfa0ec" class="outline-4">
|
||||
<h4 id="orgadfa0ec"><span class="section-number-4">1.1.7</span> Read two-electron quantities</h4>
|
||||
<div id="outline-container-orgce2e21a" class="outline-4">
|
||||
<h4 id="orgce2e21a"><span class="section-number-4">1.1.7</span> Read two-electron quantities</h4>
|
||||
<div class="outline-text-4" id="text-1-1-7">
|
||||
<p>
|
||||
Reading is done with OpenMP. Each thread reads its own buffer, and
|
||||
@ -539,8 +537,8 @@ to be protected in the critical section when modified.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6fa01c3" class="outline-5">
|
||||
<h5 id="org6fa01c3"><span class="section-number-5">1.1.7.1</span> Electron repulsion integrals</h5>
|
||||
<div id="outline-container-orgdef46f2" class="outline-5">
|
||||
<h5 id="orgdef46f2"><span class="section-number-5">1.1.7.1</span> Electron repulsion integrals</h5>
|
||||
<div class="outline-text-5" id="text-1-1-7-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90">rc = trexio_has_mo_2e_int_eri(f)
|
||||
@ -589,8 +587,8 @@ icount = BUFSIZE
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org2bb55c9" class="outline-5">
|
||||
<h5 id="org2bb55c9"><span class="section-number-5">1.1.7.2</span> Reduced density matrix</h5>
|
||||
<div id="outline-container-orgf6677a7" class="outline-5">
|
||||
<h5 id="orgf6677a7"><span class="section-number-5">1.1.7.2</span> Reduced density matrix</h5>
|
||||
<div class="outline-text-5" id="text-1-1-7-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90">rc = trexio_has_rdm_2e(f)
|
||||
@ -634,11 +632,23 @@ icount = bufsize
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org46fe1a8" class="outline-4">
|
||||
<h4 id="org46fe1a8"><span class="section-number-4">1.1.8</span> Compute the energy</h4>
|
||||
<div id="outline-container-orgeb30191" class="outline-4">
|
||||
<h4 id="orgeb30191"><span class="section-number-4">1.1.8</span> Compute the energy</h4>
|
||||
<div class="outline-text-4" id="text-1-1-8">
|
||||
<p>
|
||||
As \((n,m)\) 2D arrays are stored in memory as \((\n times m)\) 1D
|
||||
When the orbitals are real, we can use
|
||||
</p>
|
||||
\begin{eqnarray*}
|
||||
E &=& E_{\text{NN}} + \sum_{ij} \gamma_{ij}\, \langle j | h | i \rangle\,
|
||||
+\, \frac{1}{2} \sum_{ijkl} \Gamma_{ijkl}\, \langle k l | i j
|
||||
\rangle \\
|
||||
&=& E_{\text{NN}} + \sum_{ij} \gamma_{ij}\, \langle i | h | j \rangle\,
|
||||
+\, \frac{1}{2} \sum_{ijkl} \Gamma_{ijkl}\, \langle i j | k l
|
||||
\rangle \\
|
||||
\end{eqnarray*}
|
||||
|
||||
<p>
|
||||
As \((n,m)\) 2D arrays are stored in memory as \((n \times m)\) 1D
|
||||
arrays, we could pass the matrices to the <code>ddot</code> BLAS function to
|
||||
perform the summations in a single call for the 1-electron quantities.
|
||||
Instead, we prefer to interleave the 1-electron (negative) and
|
||||
@ -669,8 +679,8 @@ E = E + E_nn
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org5bd1227" class="outline-4">
|
||||
<h4 id="org5bd1227"><span class="section-number-4">1.1.9</span> Terminate</h4>
|
||||
<div id="outline-container-org835f222" class="outline-4">
|
||||
<h4 id="org835f222"><span class="section-number-4">1.1.9</span> Terminate</h4>
|
||||
<div class="outline-text-4" id="text-1-1-9">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90"> <span style="color: #a020f0;">deallocate</span>( D, h0, G, W )
|
||||
@ -685,7 +695,7 @@ E = E + E_nn
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX-CoE</p>
|
||||
<p class="date">Created: 2022-01-07 Fri 18:41</p>
|
||||
<p class="date">Created: 2022-01-10 Mon 09:28</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-07 Fri 18:41 -->
|
||||
<!-- 2022-01-10 Mon 09:28 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>TREXIO source code documentation</title>
|
||||
@ -347,7 +347,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-07 Fri 18:41</p>
|
||||
<p class="date">Created: 2022-01-10 Mon 09:28</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-07 Fri 18:41 -->
|
||||
<!-- 2022-01-10 Mon 09:28 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Front end API</title>
|
||||
@ -333,131 +333,131 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org76fb7de">1. Coding conventions</a>
|
||||
<li><a href="#orge276cc0">1. Coding conventions</a>
|
||||
<ul>
|
||||
<li><a href="#org31cf5d9">1.1. Memory allocation</a></li>
|
||||
<li><a href="#orgd45d9f3">1.1. Memory allocation</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org700a3ed">2. Front end</a>
|
||||
<li><a href="#org870defb">2. Front end</a>
|
||||
<ul>
|
||||
<li><a href="#orgd3f97d6">2.1. Error handling</a>
|
||||
<li><a href="#org5b4b79a">2.1. Error handling</a>
|
||||
<ul>
|
||||
<li><a href="#org61f6247">2.1.1. Decoding errors</a>
|
||||
<li><a href="#orge16fb4b">2.1.1. Decoding errors</a>
|
||||
<ul>
|
||||
<li><a href="#org494e9c5">2.1.1.1. C source code</a></li>
|
||||
<li><a href="#org6133135">2.1.1.2. Fortran interface</a></li>
|
||||
<li><a href="#orge1aa616">2.1.1.3. Python interface</a></li>
|
||||
<li><a href="#orgcf65be8">2.1.1.1. C source code</a></li>
|
||||
<li><a href="#org9ead6ca">2.1.1.2. Fortran interface</a></li>
|
||||
<li><a href="#orgab7ade9">2.1.1.3. Python interface</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgd57618c">2.2. Back ends</a>
|
||||
<li><a href="#org7c4615f">2.2. Back ends</a>
|
||||
<ul>
|
||||
<li><a href="#orga08a657">2.2.1. C</a></li>
|
||||
<li><a href="#org28bd3f0">2.2.2. Fortran</a></li>
|
||||
<li><a href="#org0093e98">2.2.3. Python</a></li>
|
||||
<li><a href="#orgcb7e063">2.2.1. C</a></li>
|
||||
<li><a href="#org5ffa6a0">2.2.2. Fortran</a></li>
|
||||
<li><a href="#org529796e">2.2.3. Python</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org1ec1de2">2.3. Read/write behavior</a></li>
|
||||
<li><a href="#org429171a">2.4. TREXIO file type</a>
|
||||
<li><a href="#org0ea1aa7">2.3. Read/write behavior</a></li>
|
||||
<li><a href="#org06379f8">2.4. TREXIO file type</a>
|
||||
<ul>
|
||||
<li><a href="#orgbb00169">2.4.1. TREXIO<sub>File</sub> Python class</a></li>
|
||||
<li><a href="#org00c4bec">2.4.1. TREXIO<sub>File</sub> Python class</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org1c97f5e">2.5. Polymorphism of the file handle</a></li>
|
||||
<li><a href="#orgf9b8bb6">2.6. File opening</a>
|
||||
<li><a href="#org00a2b2f">2.5. Polymorphism of the file handle</a></li>
|
||||
<li><a href="#org8b6940d">2.6. File opening</a>
|
||||
<ul>
|
||||
<li><a href="#orge3f0c72">2.6.1. C</a></li>
|
||||
<li><a href="#orgff4dd01">2.6.2. Fortran</a></li>
|
||||
<li><a href="#orga0f3ae4">2.6.3. Python</a></li>
|
||||
<li><a href="#org5c7c83b">2.6.4. Zero-based versus one-based arrays of indices</a></li>
|
||||
<li><a href="#org2a4a5ea">2.6.1. C</a></li>
|
||||
<li><a href="#org7f641f6">2.6.2. Fortran</a></li>
|
||||
<li><a href="#org18c2104">2.6.3. Python</a></li>
|
||||
<li><a href="#org90ec2d2">2.6.4. Zero-based versus one-based arrays of indices</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org43bd550">2.7. File closing</a>
|
||||
<li><a href="#org6e57d7e">2.7. File closing</a>
|
||||
<ul>
|
||||
<li><a href="#orge2fb150">2.7.1. C</a></li>
|
||||
<li><a href="#org6dc2f0d">2.7.2. Fortran</a></li>
|
||||
<li><a href="#org0c153b8">2.7.3. Python</a></li>
|
||||
<li><a href="#org13dabab">2.7.1. C</a></li>
|
||||
<li><a href="#org2bd874b">2.7.2. Fortran</a></li>
|
||||
<li><a href="#org05b940c">2.7.3. Python</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgf797750">3. Templates for front end</a>
|
||||
<li><a href="#org7276b9c">3. Templates for front end</a>
|
||||
<ul>
|
||||
<li><a href="#org3bf8b9a">3.1. Description</a></li>
|
||||
<li><a href="#org41b8d3b">3.2. Templates for front end has/read/write a single numerical attribute</a>
|
||||
<li><a href="#org2510137">3.1. Description</a></li>
|
||||
<li><a href="#org83a52eb">3.2. Templates for front end has/read/write a single numerical attribute</a>
|
||||
<ul>
|
||||
<li><a href="#orgc6518bc">3.2.1. Introduction</a></li>
|
||||
<li><a href="#org616c9d0">3.2.2. C templates for front end</a>
|
||||
<li><a href="#org0cfb6ad">3.2.1. Introduction</a></li>
|
||||
<li><a href="#org38de214">3.2.2. C templates for front end</a>
|
||||
<ul>
|
||||
<li><a href="#org1aa3d95">3.2.2.1. Function declarations</a></li>
|
||||
<li><a href="#org3e614b3">3.2.2.2. Source code for double precision functions</a></li>
|
||||
<li><a href="#org0d22f81">3.2.2.3. Source code for single precision functions</a></li>
|
||||
<li><a href="#orgcdc66ce">3.2.2.4. Source code for default functions</a></li>
|
||||
<li><a href="#org26ec6aa">3.2.2.1. Function declarations</a></li>
|
||||
<li><a href="#org9eed01e">3.2.2.2. Source code for double precision functions</a></li>
|
||||
<li><a href="#orgae45d18">3.2.2.3. Source code for single precision functions</a></li>
|
||||
<li><a href="#org939ecbd">3.2.2.4. Source code for default functions</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgad34a0e">3.2.3. Fortran templates for front end</a></li>
|
||||
<li><a href="#org9f1300c">3.2.4. Python templates for front end</a></li>
|
||||
<li><a href="#org2bb9dbb">3.2.3. Fortran templates for front end</a></li>
|
||||
<li><a href="#orgf09b06a">3.2.4. Python templates for front end</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org9e8e4c4">3.3. Templates for front end has/read/write a dataset of numerical data</a>
|
||||
<li><a href="#orga8e3927">3.3. Templates for front end has/read/write a dataset of numerical data</a>
|
||||
<ul>
|
||||
<li><a href="#orgad5b82f">3.3.1. Introduction</a></li>
|
||||
<li><a href="#org7deacac">3.3.2. C templates for front end</a>
|
||||
<li><a href="#orgb51e6ab">3.3.1. Introduction</a></li>
|
||||
<li><a href="#orgbc32007">3.3.2. C templates for front end</a>
|
||||
<ul>
|
||||
<li><a href="#org745b967">3.3.2.1. Function declarations</a></li>
|
||||
<li><a href="#org6c24765">3.3.2.2. Source code for double precision functions</a></li>
|
||||
<li><a href="#org4c4dcb8">3.3.2.3. Source code for single precision functions</a></li>
|
||||
<li><a href="#org5d21e27">3.3.2.4. Source code for memory-safe functions</a></li>
|
||||
<li><a href="#orgb89fd51">3.3.2.5. Source code for default functions</a></li>
|
||||
<li><a href="#orge31f396">3.3.2.1. Function declarations</a></li>
|
||||
<li><a href="#org8e10cc6">3.3.2.2. Source code for double precision functions</a></li>
|
||||
<li><a href="#org8150852">3.3.2.3. Source code for single precision functions</a></li>
|
||||
<li><a href="#org9435c55">3.3.2.4. Source code for memory-safe functions</a></li>
|
||||
<li><a href="#orgbd7a4f4">3.3.2.5. Source code for default functions</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org2f81896">3.3.3. Fortran templates for front end</a></li>
|
||||
<li><a href="#orgbb40d60">3.3.4. Python templates for front end</a></li>
|
||||
<li><a href="#org8da78cf">3.3.3. Fortran templates for front end</a></li>
|
||||
<li><a href="#org77b3b1b">3.3.4. Python templates for front end</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org574f84f">3.4. Templates for front end has/read/write a dataset of sparse data</a>
|
||||
<li><a href="#orge6a8779">3.4. Templates for front end has/read/write a dataset of sparse data</a>
|
||||
<ul>
|
||||
<li><a href="#org869789d">3.4.1. Introduction</a></li>
|
||||
<li><a href="#orgb02bdbd">3.4.2. C templates for front end</a>
|
||||
<li><a href="#orgc47178b">3.4.1. Introduction</a></li>
|
||||
<li><a href="#orga5fde88">3.4.2. C templates for front end</a>
|
||||
<ul>
|
||||
<li><a href="#org2119dac">3.4.2.1. Function declarations</a></li>
|
||||
<li><a href="#org7f70e41">3.4.2.2. Source code for default functions</a></li>
|
||||
<li><a href="#org2ee5787">3.4.2.1. Function declarations</a></li>
|
||||
<li><a href="#orge369406">3.4.2.2. Source code for default functions</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orge68776a">3.4.3. Fortran templates for front end</a></li>
|
||||
<li><a href="#org44fbc8c">3.4.4. Python templates for front end</a></li>
|
||||
<li><a href="#org4ed4aed">3.4.3. Fortran templates for front end</a></li>
|
||||
<li><a href="#orgd0f821c">3.4.4. Python templates for front end</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org43a07de">3.5. Templates for front end has/read/write a dataset of strings</a>
|
||||
<li><a href="#org41c3f03">3.5. Templates for front end has/read/write a dataset of strings</a>
|
||||
<ul>
|
||||
<li><a href="#orgdb65774">3.5.1. Introduction</a></li>
|
||||
<li><a href="#orgadd5205">3.5.2. C templates for front end</a>
|
||||
<li><a href="#orgbdcded4">3.5.1. Introduction</a></li>
|
||||
<li><a href="#org0748303">3.5.2. C templates for front end</a>
|
||||
<ul>
|
||||
<li><a href="#org3ccf91e">3.5.2.1. Function declarations</a></li>
|
||||
<li><a href="#org055e0a4">3.5.2.2. Source code for default functions</a></li>
|
||||
<li><a href="#orgc12d5ee">3.5.2.1. Function declarations</a></li>
|
||||
<li><a href="#org2a44b8a">3.5.2.2. Source code for default functions</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org10ddf73">3.5.3. Fortran templates for front end</a></li>
|
||||
<li><a href="#orgdc02db8">3.5.4. Python templates for front end</a></li>
|
||||
<li><a href="#orgfd65bee">3.5.3. Fortran templates for front end</a></li>
|
||||
<li><a href="#org764588b">3.5.4. Python templates for front end</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org68d7779">3.6. Templates for front end has/read/write a single string attribute</a>
|
||||
<li><a href="#org3692f9e">3.6. Templates for front end has/read/write a single string attribute</a>
|
||||
<ul>
|
||||
<li><a href="#orgf6a3e8c">3.6.1. Introduction</a></li>
|
||||
<li><a href="#org35d439c">3.6.2. C templates for front end</a>
|
||||
<li><a href="#orgd5da7ca">3.6.1. Introduction</a></li>
|
||||
<li><a href="#org6f6160b">3.6.2. C templates for front end</a>
|
||||
<ul>
|
||||
<li><a href="#org444340d">3.6.2.1. Function declarations</a></li>
|
||||
<li><a href="#orgb72138a">3.6.2.2. Source code for default functions</a></li>
|
||||
<li><a href="#orgab2f5c2">3.6.2.1. Function declarations</a></li>
|
||||
<li><a href="#org5b42fc8">3.6.2.2. Source code for default functions</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org3fa2b59">3.6.3. Fortran templates for front end</a></li>
|
||||
<li><a href="#orgc81af02">3.6.4. Python templates for front end</a></li>
|
||||
<li><a href="#orgeb461a7">3.6.3. Fortran templates for front end</a></li>
|
||||
<li><a href="#org08b5a2f">3.6.4. Python templates for front end</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org3447dea">4. Fortran helper/wrapper functions</a></li>
|
||||
<li><a href="#org51dc908">4. Fortran helper/wrapper functions</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@ -465,8 +465,8 @@ for the JavaScript code in this tag.
|
||||
break;
|
||||
</p>
|
||||
|
||||
<div id="outline-container-org76fb7de" class="outline-2">
|
||||
<h2 id="org76fb7de"><span class="section-number-2">1</span> Coding conventions</h2>
|
||||
<div id="outline-container-orge276cc0" class="outline-2">
|
||||
<h2 id="orge276cc0"><span class="section-number-2">1</span> Coding conventions</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
<ul class="org-ul">
|
||||
<li>integer types will be defined using types given in <code>stdint.h</code></li>
|
||||
@ -481,8 +481,8 @@ break;
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org31cf5d9" class="outline-3">
|
||||
<h3 id="org31cf5d9"><span class="section-number-3">1.1</span> Memory allocation</h3>
|
||||
<div id="outline-container-orgd45d9f3" class="outline-3">
|
||||
<h3 id="orgd45d9f3"><span class="section-number-3">1.1</span> Memory allocation</h3>
|
||||
<div class="outline-text-3" id="text-1-1">
|
||||
<p>
|
||||
Memory allocation of structures can be facilitated by using the
|
||||
@ -517,8 +517,8 @@ The maximum string size for the filenames is 4096 characters.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org700a3ed" class="outline-2">
|
||||
<h2 id="org700a3ed"><span class="section-number-2">2</span> Front end</h2>
|
||||
<div id="outline-container-org870defb" class="outline-2">
|
||||
<h2 id="org870defb"><span class="section-number-2">2</span> Front end</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
<p>
|
||||
All calls to TREXIO are thread-safe.
|
||||
@ -526,10 +526,10 @@ TREXIO front end is modular, which simplifies implementation of new back ends.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd3f97d6" class="outline-3">
|
||||
<h3 id="orgd3f97d6"><span class="section-number-3">2.1</span> Error handling</h3>
|
||||
<div id="outline-container-org5b4b79a" class="outline-3">
|
||||
<h3 id="org5b4b79a"><span class="section-number-3">2.1</span> Error handling</h3>
|
||||
<div class="outline-text-3" id="text-2-1">
|
||||
<table id="orge87a7bd" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orgd218f02" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -770,8 +770,8 @@ and the corresponding message are not propagated to the source code.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org61f6247" class="outline-4">
|
||||
<h4 id="org61f6247"><span class="section-number-4">2.1.1</span> Decoding errors</h4>
|
||||
<div id="outline-container-orge16fb4b" class="outline-4">
|
||||
<h4 id="orge16fb4b"><span class="section-number-4">2.1.1</span> Decoding errors</h4>
|
||||
<div class="outline-text-4" id="text-2-1-1">
|
||||
<p>
|
||||
The <code>trexio_string_of_error</code> converts an exit code into a string. The
|
||||
@ -797,8 +797,8 @@ and the corresponding message are not propagated to the source code.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org494e9c5" class="outline-5">
|
||||
<h5 id="org494e9c5"><span class="section-number-5">2.1.1.1</span> C source code</h5>
|
||||
<div id="outline-container-orgcf65be8" class="outline-5">
|
||||
<h5 id="orgcf65be8"><span class="section-number-5">2.1.1.1</span> C source code</h5>
|
||||
<div class="outline-text-5" id="text-2-1-1-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #a020f0;">const</span> <span style="color: #228b22;">char</span>*
|
||||
@ -909,8 +909,8 @@ and the corresponding message are not propagated to the source code.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6133135" class="outline-5">
|
||||
<h5 id="org6133135"><span class="section-number-5">2.1.1.2</span> Fortran interface</h5>
|
||||
<div id="outline-container-org9ead6ca" class="outline-5">
|
||||
<h5 id="org9ead6ca"><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>
|
||||
@ -926,8 +926,8 @@ and the corresponding message are not propagated to the source code.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge1aa616" class="outline-5">
|
||||
<h5 id="orge1aa616"><span class="section-number-5">2.1.1.3</span> Python interface</h5>
|
||||
<div id="outline-container-orgab7ade9" class="outline-5">
|
||||
<h5 id="orgab7ade9"><span class="section-number-5">2.1.1.3</span> Python interface</h5>
|
||||
<div class="outline-text-5" id="text-2-1-1-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-python"><span style="color: #a020f0;">class</span> <span style="color: #228b22;">Error</span>(<span style="color: #228b22;">Exception</span>):
|
||||
@ -966,8 +966,8 @@ and the corresponding message are not propagated to the source code.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd57618c" class="outline-3">
|
||||
<h3 id="orgd57618c"><span class="section-number-3">2.2</span> Back ends</h3>
|
||||
<div id="outline-container-org7c4615f" class="outline-3">
|
||||
<h3 id="org7c4615f"><span class="section-number-3">2.2</span> Back ends</h3>
|
||||
<div class="outline-text-3" id="text-2-2">
|
||||
<p>
|
||||
TREXIO has several back ends:
|
||||
@ -991,8 +991,8 @@ lines that correspond to the <code>TREXIO_JSON</code> back end (not implemented
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orga08a657" class="outline-4">
|
||||
<h4 id="orga08a657"><span class="section-number-4">2.2.1</span> C</h4>
|
||||
<div id="outline-container-orgcb7e063" class="outline-4">
|
||||
<h4 id="orgcb7e063"><span class="section-number-4">2.2.1</span> C</h4>
|
||||
<div class="outline-text-4" id="text-2-2-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #a020f0;">typedef</span> <span style="color: #228b22;">int32_t</span> <span style="color: #228b22;">back_end_t</span>;
|
||||
@ -1035,8 +1035,8 @@ This is useful due to the fact that HDF5 back end can be disabled at configure s
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org28bd3f0" class="outline-4">
|
||||
<h4 id="org28bd3f0"><span class="section-number-4">2.2.2</span> Fortran</h4>
|
||||
<div id="outline-container-org5ffa6a0" class="outline-4">
|
||||
<h4 id="org5ffa6a0"><span class="section-number-4">2.2.2</span> Fortran</h4>
|
||||
<div class="outline-text-4" id="text-2-2-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90"> <span style="color: #228b22;">integer</span>(trexio_backend), <span style="color: #a020f0;">parameter</span> ::<span style="color: #a0522d;"> TREXIO_HDF5 = 0</span>
|
||||
@ -1062,8 +1062,8 @@ The function below is a Fortran interface for the aforementioned C-compatible <c
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org0093e98" class="outline-4">
|
||||
<h4 id="org0093e98"><span class="section-number-4">2.2.3</span> Python</h4>
|
||||
<div id="outline-container-org529796e" class="outline-4">
|
||||
<h4 id="org529796e"><span class="section-number-4">2.2.3</span> Python</h4>
|
||||
<div class="outline-text-4" id="text-2-2-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-python"># <span style="color: #b22222;">define TREXIO back ends</span>
|
||||
@ -1077,8 +1077,8 @@ The function below is a Fortran interface for the aforementioned C-compatible <c
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org1ec1de2" class="outline-3">
|
||||
<h3 id="org1ec1de2"><span class="section-number-3">2.3</span> Read/write behavior</h3>
|
||||
<div id="outline-container-org0ea1aa7" class="outline-3">
|
||||
<h3 id="org0ea1aa7"><span class="section-number-3">2.3</span> Read/write behavior</h3>
|
||||
<div class="outline-text-3" id="text-2-3">
|
||||
<p>
|
||||
Every time a reading function is called, the data is read from the
|
||||
@ -1106,8 +1106,8 @@ concurrent programs, the behavior is not specified.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-org429171a" class="outline-3">
|
||||
<h3 id="org429171a"><span class="section-number-3">2.4</span> TREXIO file type</h3>
|
||||
<div id="outline-container-org06379f8" class="outline-3">
|
||||
<h3 id="org06379f8"><span class="section-number-3">2.4</span> TREXIO file type</h3>
|
||||
<div class="outline-text-3" id="text-2-4">
|
||||
<p>
|
||||
<code>trexio_s</code> is the the main type for TREXIO files, visible to the users
|
||||
@ -1141,8 +1141,8 @@ TREXIO files will have as a first argument the TREXIO file handle.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgbb00169" class="outline-4">
|
||||
<h4 id="orgbb00169"><span class="section-number-4">2.4.1</span> TREXIO<sub>File</sub> Python class</h4>
|
||||
<div id="outline-container-org00c4bec" class="outline-4">
|
||||
<h4 id="org00c4bec"><span class="section-number-4">2.4.1</span> TREXIO<sub>File</sub> Python class</h4>
|
||||
<div class="outline-text-4" id="text-2-4-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-python"><span style="color: #a020f0;">class</span> <span style="color: #228b22;">File</span>:
|
||||
@ -1215,8 +1215,8 @@ TREXIO files will have as a first argument the TREXIO file handle.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org1c97f5e" class="outline-3">
|
||||
<h3 id="org1c97f5e"><span class="section-number-3">2.5</span> Polymorphism of the file handle</h3>
|
||||
<div id="outline-container-org00a2b2f" class="outline-3">
|
||||
<h3 id="org00a2b2f"><span class="section-number-3">2.5</span> Polymorphism of the file handle</h3>
|
||||
<div class="outline-text-3" id="text-2-5">
|
||||
<p>
|
||||
Polymorphism of the <code>trexio_t</code> type is handled by ensuring that the
|
||||
@ -1235,8 +1235,8 @@ corresponding types for all back ends can be safely casted to
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf9b8bb6" class="outline-3">
|
||||
<h3 id="orgf9b8bb6"><span class="section-number-3">2.6</span> File opening</h3>
|
||||
<div id="outline-container-org8b6940d" class="outline-3">
|
||||
<h3 id="org8b6940d"><span class="section-number-3">2.6</span> File opening</h3>
|
||||
<div class="outline-text-3" id="text-2-6">
|
||||
<p>
|
||||
<code>trexio_open</code> creates a new TREXIO file or opens existing one.
|
||||
@ -1275,8 +1275,8 @@ renaming the <code>.txt</code> data files.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge3f0c72" class="outline-4">
|
||||
<h4 id="orge3f0c72"><span class="section-number-4">2.6.1</span> C</h4>
|
||||
<div id="outline-container-org2a4a5ea" class="outline-4">
|
||||
<h4 id="org2a4a5ea"><span class="section-number-4">2.6.1</span> C</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;">trexio_t</span>*
|
||||
@ -1463,8 +1463,8 @@ renaming the <code>.txt</code> data files.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgff4dd01" class="outline-4">
|
||||
<h4 id="orgff4dd01"><span class="section-number-4">2.6.2</span> Fortran</h4>
|
||||
<div id="outline-container-org7f641f6" class="outline-4">
|
||||
<h4 id="org7f641f6"><span class="section-number-4">2.6.2</span> Fortran</h4>
|
||||
<div class="outline-text-4" id="text-2-6-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90"><span style="color: #a020f0;">interface</span>
|
||||
@ -1482,8 +1482,8 @@ renaming the <code>.txt</code> data files.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orga0f3ae4" class="outline-4">
|
||||
<h4 id="orga0f3ae4"><span class="section-number-4">2.6.3</span> Python</h4>
|
||||
<div id="outline-container-org18c2104" class="outline-4">
|
||||
<h4 id="org18c2104"><span class="section-number-4">2.6.3</span> Python</h4>
|
||||
<div class="outline-text-4" id="text-2-6-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-python"><span style="color: #a020f0;">def</span> <span style="color: #0000ff;">open</span>(file_name: <span style="color: #483d8b;">str</span>, mode: <span style="color: #483d8b;">str</span>, back_end: <span style="color: #483d8b;">int</span>):
|
||||
@ -1531,8 +1531,8 @@ renaming the <code>.txt</code> data files.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org5c7c83b" class="outline-4">
|
||||
<h4 id="org5c7c83b"><span class="section-number-4">2.6.4</span> Zero-based versus one-based arrays of indices</h4>
|
||||
<div id="outline-container-org90ec2d2" class="outline-4">
|
||||
<h4 id="org90ec2d2"><span class="section-number-4">2.6.4</span> Zero-based versus one-based arrays of indices</h4>
|
||||
<div class="outline-text-4" id="text-2-6-4">
|
||||
<p>
|
||||
Because arrays are zero-based in Fortran, we need to set a flag to
|
||||
@ -1565,8 +1565,8 @@ know if we need to shift by 1 arrays of indices.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org43bd550" class="outline-3">
|
||||
<h3 id="org43bd550"><span class="section-number-3">2.7</span> File closing</h3>
|
||||
<div id="outline-container-org6e57d7e" class="outline-3">
|
||||
<h3 id="org6e57d7e"><span class="section-number-3">2.7</span> File closing</h3>
|
||||
<div class="outline-text-3" id="text-2-7">
|
||||
<p>
|
||||
<code>trexio_close</code> closes an existing <code>trexio_t</code> file.
|
||||
@ -1583,8 +1583,8 @@ output:
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge2fb150" class="outline-4">
|
||||
<h4 id="orge2fb150"><span class="section-number-4">2.7.1</span> C</h4>
|
||||
<div id="outline-container-org13dabab" class="outline-4">
|
||||
<h4 id="org13dabab"><span class="section-number-4">2.7.1</span> C</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;">trexio_exit_code</span>
|
||||
@ -1665,8 +1665,8 @@ output:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6dc2f0d" class="outline-4">
|
||||
<h4 id="org6dc2f0d"><span class="section-number-4">2.7.2</span> Fortran</h4>
|
||||
<div id="outline-container-org2bd874b" class="outline-4">
|
||||
<h4 id="org2bd874b"><span class="section-number-4">2.7.2</span> Fortran</h4>
|
||||
<div class="outline-text-4" id="text-2-7-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90"><span style="color: #a020f0;">interface</span>
|
||||
@ -1680,8 +1680,8 @@ output:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org0c153b8" class="outline-4">
|
||||
<h4 id="org0c153b8"><span class="section-number-4">2.7.3</span> Python</h4>
|
||||
<div id="outline-container-org05b940c" class="outline-4">
|
||||
<h4 id="org05b940c"><span class="section-number-4">2.7.3</span> Python</h4>
|
||||
<div class="outline-text-4" id="text-2-7-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-python"><span style="color: #a020f0;">def</span> <span style="color: #0000ff;">close</span>(trexio_file):
|
||||
@ -1703,12 +1703,12 @@ output:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf797750" class="outline-2">
|
||||
<h2 id="orgf797750"><span class="section-number-2">3</span> Templates for front end</h2>
|
||||
<div id="outline-container-org7276b9c" class="outline-2">
|
||||
<h2 id="org7276b9c"><span class="section-number-2">3</span> Templates for front end</h2>
|
||||
<div class="outline-text-2" id="text-3">
|
||||
</div>
|
||||
<div id="outline-container-org3bf8b9a" class="outline-3">
|
||||
<h3 id="org3bf8b9a"><span class="section-number-3">3.1</span> Description</h3>
|
||||
<div id="outline-container-org2510137" class="outline-3">
|
||||
<h3 id="org2510137"><span class="section-number-3">3.1</span> Description</h3>
|
||||
<div class="outline-text-3" id="text-3-1">
|
||||
<p>
|
||||
Consider the following block of <code>trex.json</code>:
|
||||
@ -1929,12 +1929,12 @@ value will result in <code>TREXIO_INVALID_ARG_2</code> exit code.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org41b8d3b" class="outline-3">
|
||||
<h3 id="org41b8d3b"><span class="section-number-3">3.2</span> Templates for front end has/read/write a single numerical attribute</h3>
|
||||
<div id="outline-container-org83a52eb" class="outline-3">
|
||||
<h3 id="org83a52eb"><span class="section-number-3">3.2</span> Templates for front end has/read/write a single numerical attribute</h3>
|
||||
<div class="outline-text-3" id="text-3-2">
|
||||
</div>
|
||||
<div id="outline-container-orgc6518bc" class="outline-4">
|
||||
<h4 id="orgc6518bc"><span class="section-number-4">3.2.1</span> Introduction</h4>
|
||||
<div id="outline-container-org0cfb6ad" class="outline-4">
|
||||
<h4 id="org0cfb6ad"><span class="section-number-4">3.2.1</span> Introduction</h4>
|
||||
<div class="outline-text-4" id="text-3-2-1">
|
||||
<p>
|
||||
This section concerns API calls related to numerical attributes,
|
||||
@ -2005,8 +2005,8 @@ namely single value of int/float types.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org616c9d0" class="outline-4">
|
||||
<h4 id="org616c9d0"><span class="section-number-4">3.2.2</span> C templates for front end</h4>
|
||||
<div id="outline-container-org38de214" class="outline-4">
|
||||
<h4 id="org38de214"><span class="section-number-4">3.2.2</span> C templates for front end</h4>
|
||||
<div class="outline-text-4" id="text-3-2-2">
|
||||
<p>
|
||||
The <code>C</code> templates that correspond to each of the abovementioned
|
||||
@ -2020,12 +2020,12 @@ precision (see Table above).
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org1aa3d95" class="outline-5">
|
||||
<h5 id="org1aa3d95"><span class="section-number-5">3.2.2.1</span> Function declarations</h5>
|
||||
<div id="outline-container-org26ec6aa" class="outline-5">
|
||||
<h5 id="org26ec6aa"><span class="section-number-5">3.2.2.1</span> Function declarations</h5>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org3e614b3" class="outline-5">
|
||||
<h5 id="org3e614b3"><span class="section-number-5">3.2.2.2</span> Source code for double precision functions</h5>
|
||||
<div id="outline-container-org9eed01e" class="outline-5">
|
||||
<h5 id="org9eed01e"><span class="section-number-5">3.2.2.2</span> Source code for double precision functions</h5>
|
||||
<div class="outline-text-5" id="text-3-2-2-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
||||
@ -2088,8 +2088,8 @@ precision (see Table above).
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org0d22f81" class="outline-5">
|
||||
<h5 id="org0d22f81"><span class="section-number-5">3.2.2.3</span> Source code for single precision functions</h5>
|
||||
<div id="outline-container-orgae45d18" class="outline-5">
|
||||
<h5 id="orgae45d18"><span class="section-number-5">3.2.2.3</span> Source code for single precision functions</h5>
|
||||
<div class="outline-text-5" id="text-3-2-2-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
||||
@ -2164,8 +2164,8 @@ precision (see Table above).
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgcdc66ce" class="outline-5">
|
||||
<h5 id="orgcdc66ce"><span class="section-number-5">3.2.2.4</span> Source code for default functions</h5>
|
||||
<div id="outline-container-org939ecbd" class="outline-5">
|
||||
<h5 id="org939ecbd"><span class="section-number-5">3.2.2.4</span> Source code for default functions</h5>
|
||||
<div class="outline-text-5" id="text-3-2-2-4">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
||||
@ -2220,8 +2220,8 @@ precision (see Table above).
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgad34a0e" class="outline-4">
|
||||
<h4 id="orgad34a0e"><span class="section-number-4">3.2.3</span> Fortran templates for front end</h4>
|
||||
<div id="outline-container-org2bb9dbb" class="outline-4">
|
||||
<h4 id="org2bb9dbb"><span class="section-number-4">3.2.3</span> Fortran templates for front end</h4>
|
||||
<div class="outline-text-4" id="text-3-2-3">
|
||||
<p>
|
||||
The <code>Fortran</code> templates that provide an access to the <code>C</code> API calls from Fortran.
|
||||
@ -2306,8 +2306,8 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org9f1300c" class="outline-4">
|
||||
<h4 id="org9f1300c"><span class="section-number-4">3.2.4</span> Python templates for front end</h4>
|
||||
<div id="outline-container-orgf09b06a" class="outline-4">
|
||||
<h4 id="orgf09b06a"><span class="section-number-4">3.2.4</span> Python templates for front end</h4>
|
||||
<div class="outline-text-4" id="text-3-2-4">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-python"><span style="color: #a020f0;">def</span> <span style="color: #0000ff;">write_</span>$group_num$(trexio_file, num_w: $group_num_py_dtype$) -> <span style="color: #008b8b;">None</span>:
|
||||
@ -2392,12 +2392,12 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org9e8e4c4" class="outline-3">
|
||||
<h3 id="org9e8e4c4"><span class="section-number-3">3.3</span> Templates for front end has/read/write a dataset of numerical data</h3>
|
||||
<div id="outline-container-orga8e3927" class="outline-3">
|
||||
<h3 id="orga8e3927"><span class="section-number-3">3.3</span> Templates for front end has/read/write a dataset of numerical data</h3>
|
||||
<div class="outline-text-3" id="text-3-3">
|
||||
</div>
|
||||
<div id="outline-container-orgad5b82f" class="outline-4">
|
||||
<h4 id="orgad5b82f"><span class="section-number-4">3.3.1</span> Introduction</h4>
|
||||
<div id="outline-container-orgb51e6ab" class="outline-4">
|
||||
<h4 id="orgb51e6ab"><span class="section-number-4">3.3.1</span> Introduction</h4>
|
||||
<div class="outline-text-4" id="text-3-3-1">
|
||||
<p>
|
||||
This section concerns API calls related to datasets.
|
||||
@ -2479,8 +2479,8 @@ This section concerns API calls related to datasets.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org7deacac" class="outline-4">
|
||||
<h4 id="org7deacac"><span class="section-number-4">3.3.2</span> C templates for front end</h4>
|
||||
<div id="outline-container-orgbc32007" class="outline-4">
|
||||
<h4 id="orgbc32007"><span class="section-number-4">3.3.2</span> C templates for front end</h4>
|
||||
<div class="outline-text-4" id="text-3-3-2">
|
||||
<p>
|
||||
The C templates that correspond to each of the abovementioned functions can be found below.
|
||||
@ -2491,12 +2491,12 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org745b967" class="outline-5">
|
||||
<h5 id="org745b967"><span class="section-number-5">3.3.2.1</span> Function declarations</h5>
|
||||
<div id="outline-container-orge31f396" class="outline-5">
|
||||
<h5 id="orge31f396"><span class="section-number-5">3.3.2.1</span> Function declarations</h5>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6c24765" class="outline-5">
|
||||
<h5 id="org6c24765"><span class="section-number-5">3.3.2.2</span> Source code for double precision functions</h5>
|
||||
<div id="outline-container-org8e10cc6" class="outline-5">
|
||||
<h5 id="org8e10cc6"><span class="section-number-5">3.3.2.2</span> Source code for double precision functions</h5>
|
||||
<div class="outline-text-5" id="text-3-3-2-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
||||
@ -2659,8 +2659,8 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org4c4dcb8" class="outline-5">
|
||||
<h5 id="org4c4dcb8"><span class="section-number-5">3.3.2.3</span> Source code for single precision functions</h5>
|
||||
<div id="outline-container-org8150852" class="outline-5">
|
||||
<h5 id="org8150852"><span class="section-number-5">3.3.2.3</span> Source code for single precision functions</h5>
|
||||
<div class="outline-text-5" id="text-3-3-2-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
||||
@ -2811,11 +2811,11 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org5d21e27" class="outline-5">
|
||||
<h5 id="org5d21e27"><span class="section-number-5">3.3.2.4</span> Source code for memory-safe functions</h5>
|
||||
<div id="outline-container-org9435c55" class="outline-5">
|
||||
<h5 id="org9435c55"><span class="section-number-5">3.3.2.4</span> Source code for memory-safe functions</h5>
|
||||
<div class="outline-text-5" id="text-3-3-2-4">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c" id="orge42f52a"><span style="color: #228b22;">trexio_exit_code</span> <span style="color: #a0522d;">rc</span>;
|
||||
<pre class="src src-c" id="org5cb1d4e"><span style="color: #228b22;">trexio_exit_code</span> <span style="color: #a0522d;">rc</span>;
|
||||
int64_t $group_dset_dim$ = 0;
|
||||
|
||||
/* <span style="color: #b22222;">Error handling for this call is added by the generator </span>*/
|
||||
@ -2971,8 +2971,8 @@ rc = trexio_read_$group_dset_dim$_64(file, &($group_dset_dim$));
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgb89fd51" class="outline-5">
|
||||
<h5 id="orgb89fd51"><span class="section-number-5">3.3.2.5</span> Source code for default functions</h5>
|
||||
<div id="outline-container-orgbd7a4f4" class="outline-5">
|
||||
<h5 id="orgbd7a4f4"><span class="section-number-5">3.3.2.5</span> Source code for default functions</h5>
|
||||
<div class="outline-text-5" id="text-3-3-2-5">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
||||
@ -3047,8 +3047,8 @@ rc = trexio_read_$group_dset_dim$_64(file, &($group_dset_dim$));
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org2f81896" class="outline-4">
|
||||
<h4 id="org2f81896"><span class="section-number-4">3.3.3</span> Fortran templates for front end</h4>
|
||||
<div id="outline-container-org8da78cf" class="outline-4">
|
||||
<h4 id="org8da78cf"><span class="section-number-4">3.3.3</span> Fortran templates for front end</h4>
|
||||
<div class="outline-text-4" id="text-3-3-3">
|
||||
<p>
|
||||
The <code>Fortran</code> templates that provide an access to the <code>C</code> API calls from <code>Fortran</code>.
|
||||
@ -3133,8 +3133,8 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgbb40d60" class="outline-4">
|
||||
<h4 id="orgbb40d60"><span class="section-number-4">3.3.4</span> Python templates for front end</h4>
|
||||
<div id="outline-container-org77b3b1b" class="outline-4">
|
||||
<h4 id="org77b3b1b"><span class="section-number-4">3.3.4</span> Python templates for front end</h4>
|
||||
<div class="outline-text-4" id="text-3-3-4">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-python"><span style="color: #a020f0;">def</span> <span style="color: #0000ff;">write_</span>$group_dset$(trexio_file, dset_w) -> <span style="color: #008b8b;">None</span>:
|
||||
@ -3329,12 +3329,12 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org574f84f" class="outline-3">
|
||||
<h3 id="org574f84f"><span class="section-number-3">3.4</span> Templates for front end has/read/write a dataset of sparse data</h3>
|
||||
<div id="outline-container-orge6a8779" class="outline-3">
|
||||
<h3 id="orge6a8779"><span class="section-number-3">3.4</span> Templates for front end has/read/write a dataset of sparse data</h3>
|
||||
<div class="outline-text-3" id="text-3-4">
|
||||
</div>
|
||||
<div id="outline-container-org869789d" class="outline-4">
|
||||
<h4 id="org869789d"><span class="section-number-4">3.4.1</span> Introduction</h4>
|
||||
<div id="outline-container-orgc47178b" class="outline-4">
|
||||
<h4 id="orgc47178b"><span class="section-number-4">3.4.1</span> Introduction</h4>
|
||||
<div class="outline-text-4" id="text-3-4-1">
|
||||
<p>
|
||||
Sparse data structures are used typically for large tensors such as
|
||||
@ -3495,16 +3495,16 @@ This section concerns API calls related to sparse data structures.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgb02bdbd" class="outline-4">
|
||||
<h4 id="orgb02bdbd"><span class="section-number-4">3.4.2</span> C templates for front end</h4>
|
||||
<div id="outline-container-orga5fde88" class="outline-4">
|
||||
<h4 id="orga5fde88"><span class="section-number-4">3.4.2</span> C templates for front end</h4>
|
||||
<div class="outline-text-4" id="text-3-4-2">
|
||||
</div>
|
||||
<div id="outline-container-org2119dac" class="outline-5">
|
||||
<h5 id="org2119dac"><span class="section-number-5">3.4.2.1</span> Function declarations</h5>
|
||||
<div id="outline-container-org2ee5787" class="outline-5">
|
||||
<h5 id="org2ee5787"><span class="section-number-5">3.4.2.1</span> Function declarations</h5>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org7f70e41" class="outline-5">
|
||||
<h5 id="org7f70e41"><span class="section-number-5">3.4.2.2</span> Source code for default functions</h5>
|
||||
<div id="outline-container-orge369406" class="outline-5">
|
||||
<h5 id="orge369406"><span class="section-number-5">3.4.2.2</span> Source code for default functions</h5>
|
||||
<div class="outline-text-5" id="text-3-4-2-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span> <span style="color: #0000ff;">trexio_read_safe_$group_dset$</span>(<span style="color: #228b22;">trexio_t</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">file</span>,
|
||||
@ -3779,8 +3779,8 @@ This section concerns API calls related to sparse data structures.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge68776a" class="outline-4">
|
||||
<h4 id="orge68776a"><span class="section-number-4">3.4.3</span> Fortran templates for front end</h4>
|
||||
<div id="outline-container-org4ed4aed" class="outline-4">
|
||||
<h4 id="org4ed4aed"><span class="section-number-4">3.4.3</span> Fortran templates for front end</h4>
|
||||
<div class="outline-text-4" id="text-3-4-3">
|
||||
<p>
|
||||
The <code>Fortran</code> templates that provide an access to the <code>C</code> API calls from <code>Fortran</code>.
|
||||
@ -3875,8 +3875,8 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org44fbc8c" class="outline-4">
|
||||
<h4 id="org44fbc8c"><span class="section-number-4">3.4.4</span> Python templates for front end</h4>
|
||||
<div id="outline-container-orgd0f821c" class="outline-4">
|
||||
<h4 id="orgd0f821c"><span class="section-number-4">3.4.4</span> Python templates for front end</h4>
|
||||
<div class="outline-text-4" id="text-3-4-4">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-python"><span style="color: #a020f0;">def</span> <span style="color: #0000ff;">write_</span>$group_dset$(trexio_file: File, offset_file: <span style="color: #483d8b;">int</span>, buffer_size: <span style="color: #483d8b;">int</span>, indices: <span style="color: #483d8b;">list</span>, values: <span style="color: #483d8b;">list</span>) -> <span style="color: #008b8b;">None</span>:
|
||||
@ -4097,12 +4097,12 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org43a07de" class="outline-3">
|
||||
<h3 id="org43a07de"><span class="section-number-3">3.5</span> Templates for front end has/read/write a dataset of strings</h3>
|
||||
<div id="outline-container-org41c3f03" class="outline-3">
|
||||
<h3 id="org41c3f03"><span class="section-number-3">3.5</span> Templates for front end has/read/write a dataset of strings</h3>
|
||||
<div class="outline-text-3" id="text-3-5">
|
||||
</div>
|
||||
<div id="outline-container-orgdb65774" class="outline-4">
|
||||
<h4 id="orgdb65774"><span class="section-number-4">3.5.1</span> Introduction</h4>
|
||||
<div id="outline-container-orgbdcded4" class="outline-4">
|
||||
<h4 id="orgbdcded4"><span class="section-number-4">3.5.1</span> Introduction</h4>
|
||||
<div class="outline-text-4" id="text-3-5-1">
|
||||
<p>
|
||||
This section concerns API calls related to datasets of strings.
|
||||
@ -4142,8 +4142,8 @@ This section concerns API calls related to datasets of strings.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgadd5205" class="outline-4">
|
||||
<h4 id="orgadd5205"><span class="section-number-4">3.5.2</span> C templates for front end</h4>
|
||||
<div id="outline-container-org0748303" class="outline-4">
|
||||
<h4 id="org0748303"><span class="section-number-4">3.5.2</span> C templates for front end</h4>
|
||||
<div class="outline-text-4" id="text-3-5-2">
|
||||
<p>
|
||||
First parameter is the <code>TREXIO</code> file handle. Second parameter is the variable to be written/read
|
||||
@ -4151,12 +4151,12 @@ to/from the <code>TREXIO</code> file (except for <code>trexio_has_</code> functi
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org3ccf91e" class="outline-5">
|
||||
<h5 id="org3ccf91e"><span class="section-number-5">3.5.2.1</span> Function declarations</h5>
|
||||
<div id="outline-container-orgc12d5ee" class="outline-5">
|
||||
<h5 id="orgc12d5ee"><span class="section-number-5">3.5.2.1</span> Function declarations</h5>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org055e0a4" class="outline-5">
|
||||
<h5 id="org055e0a4"><span class="section-number-5">3.5.2.2</span> Source code for default functions</h5>
|
||||
<div id="outline-container-org2a44b8a" class="outline-5">
|
||||
<h5 id="org2a44b8a"><span class="section-number-5">3.5.2.2</span> Source code for default functions</h5>
|
||||
<div class="outline-text-5" id="text-3-5-2-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
||||
@ -4406,8 +4406,8 @@ to/from the <code>TREXIO</code> file (except for <code>trexio_has_</code> functi
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org10ddf73" class="outline-4">
|
||||
<h4 id="org10ddf73"><span class="section-number-4">3.5.3</span> Fortran templates for front end</h4>
|
||||
<div id="outline-container-orgfd65bee" class="outline-4">
|
||||
<h4 id="orgfd65bee"><span class="section-number-4">3.5.3</span> Fortran templates for front end</h4>
|
||||
<div class="outline-text-4" id="text-3-5-3">
|
||||
<p>
|
||||
The <code>Fortran</code> templates that provide an access to the <code>C</code> API calls from <code>Fortran</code>.
|
||||
@ -4503,8 +4503,8 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgdc02db8" class="outline-4">
|
||||
<h4 id="orgdc02db8"><span class="section-number-4">3.5.4</span> Python templates for front end</h4>
|
||||
<div id="outline-container-org764588b" class="outline-4">
|
||||
<h4 id="org764588b"><span class="section-number-4">3.5.4</span> Python templates for front end</h4>
|
||||
<div class="outline-text-4" id="text-3-5-4">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-python"><span style="color: #a020f0;">def</span> <span style="color: #0000ff;">write_</span>$group_dset$(trexio_file, dset_w: <span style="color: #483d8b;">list</span>) -> <span style="color: #008b8b;">None</span>:
|
||||
@ -4620,12 +4620,12 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org68d7779" class="outline-3">
|
||||
<h3 id="org68d7779"><span class="section-number-3">3.6</span> Templates for front end has/read/write a single string attribute</h3>
|
||||
<div id="outline-container-org3692f9e" class="outline-3">
|
||||
<h3 id="org3692f9e"><span class="section-number-3">3.6</span> Templates for front end has/read/write a single string attribute</h3>
|
||||
<div class="outline-text-3" id="text-3-6">
|
||||
</div>
|
||||
<div id="outline-container-orgf6a3e8c" class="outline-4">
|
||||
<h4 id="orgf6a3e8c"><span class="section-number-4">3.6.1</span> Introduction</h4>
|
||||
<div id="outline-container-orgd5da7ca" class="outline-4">
|
||||
<h4 id="orgd5da7ca"><span class="section-number-4">3.6.1</span> Introduction</h4>
|
||||
<div class="outline-text-4" id="text-3-6-1">
|
||||
<p>
|
||||
This section concerns API calls related to string attributes.
|
||||
@ -4665,16 +4665,16 @@ This section concerns API calls related to string attributes.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org35d439c" class="outline-4">
|
||||
<h4 id="org35d439c"><span class="section-number-4">3.6.2</span> C templates for front end</h4>
|
||||
<div id="outline-container-org6f6160b" class="outline-4">
|
||||
<h4 id="org6f6160b"><span class="section-number-4">3.6.2</span> C templates for front end</h4>
|
||||
<div class="outline-text-4" id="text-3-6-2">
|
||||
</div>
|
||||
<div id="outline-container-org444340d" class="outline-5">
|
||||
<h5 id="org444340d"><span class="section-number-5">3.6.2.1</span> Function declarations</h5>
|
||||
<div id="outline-container-orgab2f5c2" class="outline-5">
|
||||
<h5 id="orgab2f5c2"><span class="section-number-5">3.6.2.1</span> Function declarations</h5>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgb72138a" class="outline-5">
|
||||
<h5 id="orgb72138a"><span class="section-number-5">3.6.2.2</span> Source code for default functions</h5>
|
||||
<div id="outline-container-org5b42fc8" class="outline-5">
|
||||
<h5 id="org5b42fc8"><span class="section-number-5">3.6.2.2</span> Source code for default functions</h5>
|
||||
<div class="outline-text-5" id="text-3-6-2-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
||||
@ -4778,8 +4778,8 @@ This section concerns API calls related to string attributes.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org3fa2b59" class="outline-4">
|
||||
<h4 id="org3fa2b59"><span class="section-number-4">3.6.3</span> Fortran templates for front end</h4>
|
||||
<div id="outline-container-orgeb461a7" class="outline-4">
|
||||
<h4 id="orgeb461a7"><span class="section-number-4">3.6.3</span> Fortran templates for front end</h4>
|
||||
<div class="outline-text-4" id="text-3-6-3">
|
||||
<p>
|
||||
The <code>Fortran</code> templates that provide an access to the <code>C</code> API calls from Fortran.
|
||||
@ -4856,8 +4856,8 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgc81af02" class="outline-4">
|
||||
<h4 id="orgc81af02"><span class="section-number-4">3.6.4</span> Python templates for front end</h4>
|
||||
<div id="outline-container-org08b5a2f" class="outline-4">
|
||||
<h4 id="org08b5a2f"><span class="section-number-4">3.6.4</span> Python templates for front end</h4>
|
||||
<div class="outline-text-4" id="text-3-6-4">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-python"><span style="color: #a020f0;">def</span> <span style="color: #0000ff;">write_</span>$group_str$(trexio_file, str_w: <span style="color: #483d8b;">str</span>) -> <span style="color: #008b8b;">None</span>:
|
||||
@ -4947,8 +4947,8 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org3447dea" class="outline-2">
|
||||
<h2 id="org3447dea"><span class="section-number-2">4</span> Fortran helper/wrapper functions</h2>
|
||||
<div id="outline-container-org51dc908" class="outline-2">
|
||||
<h2 id="org51dc908"><span class="section-number-2">4</span> Fortran helper/wrapper functions</h2>
|
||||
<div class="outline-text-2" id="text-4">
|
||||
<p>
|
||||
The function below adapts the original C-based <code>trexio_open</code> for Fortran.
|
||||
@ -5083,7 +5083,7 @@ two code are identical, i.e. if the <code>assert</code> statement pass.
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX-CoE</p>
|
||||
<p class="date">Created: 2022-01-07 Fri 18:41</p>
|
||||
<p class="date">Created: 2022-01-10 Mon 09:28</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-07 Fri 18:41 -->
|
||||
<!-- 2022-01-10 Mon 09:28 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>HDF5 back end</title>
|
||||
@ -311,29 +311,29 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org21d0d99">1. HDF5 back end</a>
|
||||
<li><a href="#org6b4f90a">1. HDF5 back end</a>
|
||||
<ul>
|
||||
<li><a href="#orgb481285">1.1. Template for HDF5 definitions</a></li>
|
||||
<li><a href="#orgbdf43c6">1.2. Template for HDF5 structures</a></li>
|
||||
<li><a href="#orge33fbb5">1.3. Template for HDF5 init/deinit</a></li>
|
||||
<li><a href="#org328c90e">1.4. Template for HDF5 has/read/write the numerical attribute</a></li>
|
||||
<li><a href="#org25ffea7">1.5. Template for HDF5 has/read/write the dataset of numerical data</a></li>
|
||||
<li><a href="#org7508fc7">1.6. Template for HDF5 has/read/write the dataset of sparse data</a></li>
|
||||
<li><a href="#org6b54333">1.7. Template for HDF5 has/read/write the dataset of strings</a></li>
|
||||
<li><a href="#orgc29f2b6">1.8. Template for HDF5 has/read/write the string attribute</a></li>
|
||||
<li><a href="#orgae3e0bf">1.9. Helper functions</a></li>
|
||||
<li><a href="#org476e29f">1.1. Template for HDF5 definitions</a></li>
|
||||
<li><a href="#orgaa0fb0d">1.2. Template for HDF5 structures</a></li>
|
||||
<li><a href="#org4143dfa">1.3. Template for HDF5 init/deinit</a></li>
|
||||
<li><a href="#orgef39995">1.4. Template for HDF5 has/read/write the numerical attribute</a></li>
|
||||
<li><a href="#org3ff3653">1.5. Template for HDF5 has/read/write the dataset of numerical data</a></li>
|
||||
<li><a href="#org8922069">1.6. Template for HDF5 has/read/write the dataset of sparse data</a></li>
|
||||
<li><a href="#orgcb0b77f">1.7. Template for HDF5 has/read/write the dataset of strings</a></li>
|
||||
<li><a href="#org5fa8de6">1.8. Template for HDF5 has/read/write the string attribute</a></li>
|
||||
<li><a href="#org92246b1">1.9. Helper functions</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org21d0d99" class="outline-2">
|
||||
<h2 id="org21d0d99"><span class="section-number-2">1</span> HDF5 back end</h2>
|
||||
<div id="outline-container-org6b4f90a" class="outline-2">
|
||||
<h2 id="org6b4f90a"><span class="section-number-2">1</span> HDF5 back end</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
</div>
|
||||
<div id="outline-container-orgb481285" class="outline-3">
|
||||
<h3 id="orgb481285"><span class="section-number-3">1.1</span> Template for HDF5 definitions</h3>
|
||||
<div id="outline-container-org476e29f" class="outline-3">
|
||||
<h3 id="org476e29f"><span class="section-number-3">1.1</span> Template for HDF5 definitions</h3>
|
||||
<div class="outline-text-3" id="text-1-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #483d8b;">#define</span> $GROUP$_GROUP_NAME <span style="color: #8b2252;">"$group$"</span>
|
||||
@ -345,8 +345,8 @@ for the JavaScript code in this tag.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgbdf43c6" class="outline-3">
|
||||
<h3 id="orgbdf43c6"><span class="section-number-3">1.2</span> Template for HDF5 structures</h3>
|
||||
<div id="outline-container-orgaa0fb0d" class="outline-3">
|
||||
<h3 id="orgaa0fb0d"><span class="section-number-3">1.2</span> Template for HDF5 structures</h3>
|
||||
<div class="outline-text-3" id="text-1-2">
|
||||
<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;">trexio_hdf5_s</span> {
|
||||
@ -360,8 +360,8 @@ for the JavaScript code in this tag.
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-orge33fbb5" class="outline-3">
|
||||
<h3 id="orge33fbb5"><span class="section-number-3">1.3</span> Template for HDF5 init/deinit</h3>
|
||||
<div id="outline-container-org4143dfa" class="outline-3">
|
||||
<h3 id="org4143dfa"><span class="section-number-3">1.3</span> Template for HDF5 init/deinit</h3>
|
||||
<div class="outline-text-3" id="text-1-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
||||
@ -441,8 +441,8 @@ for the JavaScript code in this tag.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org328c90e" class="outline-3">
|
||||
<h3 id="org328c90e"><span class="section-number-3">1.4</span> Template for HDF5 has/read/write the numerical attribute</h3>
|
||||
<div id="outline-container-orgef39995" class="outline-3">
|
||||
<h3 id="orgef39995"><span class="section-number-3">1.4</span> Template for HDF5 has/read/write the numerical attribute</h3>
|
||||
<div class="outline-text-3" id="text-1-4">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
||||
@ -536,8 +536,8 @@ for the JavaScript code in this tag.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org25ffea7" class="outline-3">
|
||||
<h3 id="org25ffea7"><span class="section-number-3">1.5</span> Template for HDF5 has/read/write the dataset of numerical data</h3>
|
||||
<div id="outline-container-org3ff3653" class="outline-3">
|
||||
<h3 id="org3ff3653"><span class="section-number-3">1.5</span> Template for HDF5 has/read/write the dataset of numerical data</h3>
|
||||
<div class="outline-text-3" id="text-1-5">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
||||
@ -659,8 +659,8 @@ for the JavaScript code in this tag.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org7508fc7" class="outline-3">
|
||||
<h3 id="org7508fc7"><span class="section-number-3">1.6</span> Template for HDF5 has/read/write the dataset of sparse data</h3>
|
||||
<div id="outline-container-org8922069" class="outline-3">
|
||||
<h3 id="org8922069"><span class="section-number-3">1.6</span> Template for HDF5 has/read/write the dataset of sparse data</h3>
|
||||
<div class="outline-text-3" id="text-1-6">
|
||||
<p>
|
||||
Sparse data is stored using extensible datasets of HDF5. Extensibility is required
|
||||
@ -861,8 +861,8 @@ due to the fact that the sparse data will be written in chunks of user-defined s
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6b54333" class="outline-3">
|
||||
<h3 id="org6b54333"><span class="section-number-3">1.7</span> Template for HDF5 has/read/write the dataset of strings</h3>
|
||||
<div id="outline-container-orgcb0b77f" class="outline-3">
|
||||
<h3 id="orgcb0b77f"><span class="section-number-3">1.7</span> Template for HDF5 has/read/write the dataset of strings</h3>
|
||||
<div class="outline-text-3" id="text-1-7">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
||||
@ -1066,8 +1066,8 @@ due to the fact that the sparse data will be written in chunks of user-defined s
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgc29f2b6" class="outline-3">
|
||||
<h3 id="orgc29f2b6"><span class="section-number-3">1.8</span> Template for HDF5 has/read/write the string attribute</h3>
|
||||
<div id="outline-container-org5fa8de6" class="outline-3">
|
||||
<h3 id="org5fa8de6"><span class="section-number-3">1.8</span> Template for HDF5 has/read/write the string attribute</h3>
|
||||
<div class="outline-text-3" id="text-1-8">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
||||
@ -1189,8 +1189,8 @@ due to the fact that the sparse data will be written in chunks of user-defined s
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-orgae3e0bf" class="outline-3">
|
||||
<h3 id="orgae3e0bf"><span class="section-number-3">1.9</span> Helper functions</h3>
|
||||
<div id="outline-container-org92246b1" class="outline-3">
|
||||
<h3 id="org92246b1"><span class="section-number-3">1.9</span> Helper functions</h3>
|
||||
<div class="outline-text-3" id="text-1-9">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
||||
@ -1452,7 +1452,7 @@ due to the fact that the sparse data will be written in chunks of user-defined s
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX-CoE</p>
|
||||
<p class="date">Created: 2022-01-07 Fri 18:41</p>
|
||||
<p class="date">Created: 2022-01-10 Mon 09:28</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-07 Fri 18:41 -->
|
||||
<!-- 2022-01-10 Mon 09:28 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>TEXT back end</title>
|
||||
@ -311,28 +311,28 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#orgc0c08fc">1. TEXT back end</a>
|
||||
<li><a href="#org97516b0">1. TEXT back end</a>
|
||||
<ul>
|
||||
<li><a href="#org5080f21">1.1. Template for group-related structures in text back end</a></li>
|
||||
<li><a href="#orgd47f9af">1.2. Template for general structure in text back end</a></li>
|
||||
<li><a href="#orged3a128">1.3. Initialize function (constant part)</a></li>
|
||||
<li><a href="#org7db2fc9">1.4. Deinitialize function (templated part)</a></li>
|
||||
<li><a href="#org559f5ef">1.5. Template for text read struct</a></li>
|
||||
<li><a href="#org735cc8f">1.6. Template for text flush struct</a></li>
|
||||
<li><a href="#orgd47018d">1.7. Template for text free memory</a></li>
|
||||
<li><a href="#org48992fb">1.8. Template for has/read/write the numerical attribute</a></li>
|
||||
<li><a href="#orga3daa4f">1.9. Template for has/read/write the dataset of numerical data</a></li>
|
||||
<li><a href="#org941efe9">1.10. Template for has/read/write the dataset of strings</a></li>
|
||||
<li><a href="#orgeb83a84">1.11. Template for has/read/write the string attribute</a></li>
|
||||
<li><a href="#orgadaa5dd">1.12. Template for has/read/write the dataset of sparse data</a></li>
|
||||
<li><a href="#org86003ba">1.1. Template for group-related structures in text back end</a></li>
|
||||
<li><a href="#orgd04e4a7">1.2. Template for general structure in text back end</a></li>
|
||||
<li><a href="#orge0557c8">1.3. Initialize function (constant part)</a></li>
|
||||
<li><a href="#org79de0eb">1.4. Deinitialize function (templated part)</a></li>
|
||||
<li><a href="#org624784d">1.5. Template for text read struct</a></li>
|
||||
<li><a href="#org315f36b">1.6. Template for text flush struct</a></li>
|
||||
<li><a href="#orgd4e9f64">1.7. Template for text free memory</a></li>
|
||||
<li><a href="#org9cec566">1.8. Template for has/read/write the numerical attribute</a></li>
|
||||
<li><a href="#org7d78a0e">1.9. Template for has/read/write the dataset of numerical data</a></li>
|
||||
<li><a href="#org48c90d0">1.10. Template for has/read/write the dataset of strings</a></li>
|
||||
<li><a href="#org73cced3">1.11. Template for has/read/write the string attribute</a></li>
|
||||
<li><a href="#org563b98f">1.12. Template for has/read/write the dataset of sparse data</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgc0c08fc" class="outline-2">
|
||||
<h2 id="orgc0c08fc"><span class="section-number-2">1</span> TEXT back end</h2>
|
||||
<div id="outline-container-org97516b0" class="outline-2">
|
||||
<h2 id="org97516b0"><span class="section-number-2">1</span> TEXT back end</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
<p>
|
||||
The "file" produced by the text back end is a directory with one
|
||||
@ -353,8 +353,8 @@ The file is written when closed, or when the flush function is called.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org5080f21" class="outline-3">
|
||||
<h3 id="org5080f21"><span class="section-number-3">1.1</span> Template for group-related structures in text back end</h3>
|
||||
<div id="outline-container-org86003ba" class="outline-3">
|
||||
<h3 id="org86003ba"><span class="section-number-3">1.1</span> Template for group-related structures in text back end</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> $group$_s {
|
||||
@ -373,8 +373,8 @@ The file is written when closed, or when the flush function is called.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd47f9af" class="outline-3">
|
||||
<h3 id="orgd47f9af"><span class="section-number-3">1.2</span> Template for general structure in text back end</h3>
|
||||
<div id="outline-container-orgd04e4a7" class="outline-3">
|
||||
<h3 id="orgd04e4a7"><span class="section-number-3">1.2</span> Template for general structure in text back end</h3>
|
||||
<div class="outline-text-3" id="text-1-2">
|
||||
<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;">trexio_text_s</span> {
|
||||
@ -387,8 +387,8 @@ The file is written when closed, or when the flush function is called.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orged3a128" class="outline-3">
|
||||
<h3 id="orged3a128"><span class="section-number-3">1.3</span> Initialize function (constant part)</h3>
|
||||
<div id="outline-container-orge0557c8" class="outline-3">
|
||||
<h3 id="orge0557c8"><span class="section-number-3">1.3</span> Initialize function (constant part)</h3>
|
||||
<div class="outline-text-3" id="text-1-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
||||
@ -519,8 +519,8 @@ The file is written when closed, or when the flush function is called.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org7db2fc9" class="outline-3">
|
||||
<h3 id="org7db2fc9"><span class="section-number-3">1.4</span> Deinitialize function (templated part)</h3>
|
||||
<div id="outline-container-org79de0eb" class="outline-3">
|
||||
<h3 id="org79de0eb"><span class="section-number-3">1.4</span> Deinitialize function (templated part)</h3>
|
||||
<div class="outline-text-3" id="text-1-4">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
||||
@ -542,8 +542,8 @@ The file is written when closed, or when the flush function is called.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org559f5ef" class="outline-3">
|
||||
<h3 id="org559f5ef"><span class="section-number-3">1.5</span> Template for text read struct</h3>
|
||||
<div id="outline-container-org624784d" class="outline-3">
|
||||
<h3 id="org624784d"><span class="section-number-3">1.5</span> Template for text read struct</h3>
|
||||
<div class="outline-text-3" id="text-1-5">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">$group$_t*
|
||||
@ -835,8 +835,8 @@ trexio_text_read_$group$ (<span style="color: #228b22;">trexio_text_t</span>* <s
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org735cc8f" class="outline-3">
|
||||
<h3 id="org735cc8f"><span class="section-number-3">1.6</span> Template for text flush struct</h3>
|
||||
<div id="outline-container-org315f36b" class="outline-3">
|
||||
<h3 id="org315f36b"><span class="section-number-3">1.6</span> Template for text flush struct</h3>
|
||||
<div class="outline-text-3" id="text-1-6">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
||||
@ -901,8 +901,8 @@ trexio_text_read_$group$ (<span style="color: #228b22;">trexio_text_t</span>* <s
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd47018d" class="outline-3">
|
||||
<h3 id="orgd47018d"><span class="section-number-3">1.7</span> Template for text free memory</h3>
|
||||
<div id="outline-container-orgd4e9f64" class="outline-3">
|
||||
<h3 id="orgd4e9f64"><span class="section-number-3">1.7</span> Template for text free memory</h3>
|
||||
<div class="outline-text-3" id="text-1-7">
|
||||
<p>
|
||||
Memory is allocated when reading. The following function frees memory.
|
||||
@ -947,8 +947,8 @@ Memory is allocated when reading. The following function frees memory.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org48992fb" class="outline-3">
|
||||
<h3 id="org48992fb"><span class="section-number-3">1.8</span> Template for has/read/write the numerical attribute</h3>
|
||||
<div id="outline-container-org9cec566" class="outline-3">
|
||||
<h3 id="org9cec566"><span class="section-number-3">1.8</span> Template for has/read/write the numerical attribute</h3>
|
||||
<div class="outline-text-3" id="text-1-8">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
||||
@ -1011,8 +1011,8 @@ Memory is allocated when reading. The following function frees memory.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orga3daa4f" class="outline-3">
|
||||
<h3 id="orga3daa4f"><span class="section-number-3">1.9</span> Template for has/read/write the dataset of numerical data</h3>
|
||||
<div id="outline-container-org7d78a0e" class="outline-3">
|
||||
<h3 id="org7d78a0e"><span class="section-number-3">1.9</span> Template for has/read/write the dataset of numerical data</h3>
|
||||
<div class="outline-text-3" id="text-1-9">
|
||||
<p>
|
||||
The <code>group_dset</code> array is assumed allocated with the appropriate size.
|
||||
@ -1108,8 +1108,8 @@ The <code>group_dset</code> array is assumed allocated with the appropriate size
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-org941efe9" class="outline-3">
|
||||
<h3 id="org941efe9"><span class="section-number-3">1.10</span> Template for has/read/write the dataset of strings</h3>
|
||||
<div id="outline-container-org48c90d0" class="outline-3">
|
||||
<h3 id="org48c90d0"><span class="section-number-3">1.10</span> Template for has/read/write the dataset of strings</h3>
|
||||
<div class="outline-text-3" id="text-1-10">
|
||||
<p>
|
||||
The <code>group_dset</code> array is assumed allocated with the appropriate size.
|
||||
@ -1210,8 +1210,8 @@ The <code>group_dset</code> array is assumed allocated with the appropriate size
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-orgeb83a84" class="outline-3">
|
||||
<h3 id="orgeb83a84"><span class="section-number-3">1.11</span> Template for has/read/write the string attribute</h3>
|
||||
<div id="outline-container-org73cced3" class="outline-3">
|
||||
<h3 id="org73cced3"><span class="section-number-3">1.11</span> Template for has/read/write the string attribute</h3>
|
||||
<div class="outline-text-3" id="text-1-11">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
||||
@ -1285,8 +1285,8 @@ The <code>group_dset</code> array is assumed allocated with the appropriate size
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-orgadaa5dd" class="outline-3">
|
||||
<h3 id="orgadaa5dd"><span class="section-number-3">1.12</span> Template for has/read/write the dataset of sparse data</h3>
|
||||
<div id="outline-container-org563b98f" class="outline-3">
|
||||
<h3 id="org563b98f"><span class="section-number-3">1.12</span> Template for has/read/write the dataset of sparse data</h3>
|
||||
<div class="outline-text-3" id="text-1-12">
|
||||
<p>
|
||||
Each sparse array is stored in a separate <code>.txt</code> file due to the fact that sparse I/O has to be decoupled
|
||||
@ -1563,7 +1563,7 @@ User provides indices and values of the sparse array as two separate variables.
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX-CoE</p>
|
||||
<p class="date">Created: 2022-01-07 Fri 18:41</p>
|
||||
<p class="date">Created: 2022-01-10 Mon 09:28</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
174
trex.html
174
trex.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-07 Fri 18:41 -->
|
||||
<!-- 2022-01-10 Mon 09:28 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>TREX Configuration file</title>
|
||||
@ -333,33 +333,33 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org8ee7ecb">1. Metadata (metadata group)</a></li>
|
||||
<li><a href="#org1032d36">2. Electron (electron group)</a></li>
|
||||
<li><a href="#org44388f3">3. Nucleus (nucleus group)</a></li>
|
||||
<li><a href="#org3a56e0e">4. Effective core potentials (ecp group)</a>
|
||||
<li><a href="#orge2708d5">1. Metadata (metadata group)</a></li>
|
||||
<li><a href="#orgc17c195">2. Electron (electron group)</a></li>
|
||||
<li><a href="#orgbd3c307">3. Nucleus (nucleus group)</a></li>
|
||||
<li><a href="#org7a3bc61">4. Effective core potentials (ecp group)</a>
|
||||
<ul>
|
||||
<li><a href="#org8536693">4.1. Example</a></li>
|
||||
<li><a href="#org75753bc">4.1. Example</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org862e2cd">5. Basis set (basis group)</a>
|
||||
<li><a href="#orgcbc2b99">5. Basis set (basis group)</a>
|
||||
<ul>
|
||||
<li><a href="#org22597b2">5.1. Example</a></li>
|
||||
<li><a href="#orgb77b98f">5.1. Example</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgd15963f">6. Atomic orbitals (ao group)</a>
|
||||
<li><a href="#org71681e2">6. Atomic orbitals (ao group)</a>
|
||||
<ul>
|
||||
<li><a href="#ao_one_e">6.1. One-electron integrals (<code>ao_1e_int</code> group)</a></li>
|
||||
<li><a href="#ao_two_e">6.2. Two-electron integrals (<code>ao_2e_int</code> group)</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org00545c7">7. Molecular orbitals (mo group)</a>
|
||||
<li><a href="#org044e1c6">7. Molecular orbitals (mo group)</a>
|
||||
<ul>
|
||||
<li><a href="#orge13aba9">7.1. One-electron integrals (<code>mo_1e_int</code> group)</a></li>
|
||||
<li><a href="#org220b8d4">7.2. Two-electron integrals (<code>mo_2e_int</code> group)</a></li>
|
||||
<li><a href="#org5cc2422">7.1. One-electron integrals (<code>mo_1e_int</code> group)</a></li>
|
||||
<li><a href="#orga500d39">7.2. Two-electron integrals (<code>mo_2e_int</code> group)</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org0ed0b86">8. <span class="todo TODO">TODO</span> Slater determinants</a></li>
|
||||
<li><a href="#org590d9ab">9. Reduced density matrices (rdm group)</a></li>
|
||||
<li><a href="#org292fed8">8. <span class="todo TODO">TODO</span> Slater determinants</a></li>
|
||||
<li><a href="#org37c7d96">9. Reduced density matrices (rdm group)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@ -409,8 +409,8 @@ fetched using multiple function calls to perform I/O on buffers.
|
||||
</p>
|
||||
|
||||
|
||||
<div id="outline-container-org8ee7ecb" class="outline-2">
|
||||
<h2 id="org8ee7ecb"><span class="section-number-2">1</span> Metadata (metadata group)</h2>
|
||||
<div id="outline-container-orge2708d5" class="outline-2">
|
||||
<h2 id="orge2708d5"><span class="section-number-2">1</span> Metadata (metadata group)</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
<p>
|
||||
As we expect our files to be archived in open-data repositories, we
|
||||
@ -420,7 +420,7 @@ which have participated to the creation of the file, a list of
|
||||
authors of the file, and a textual description.
|
||||
</p>
|
||||
|
||||
<table id="orgfe625c6" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orgb8895df" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -487,15 +487,15 @@ authors of the file, and a textual description.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org1032d36" class="outline-2">
|
||||
<h2 id="org1032d36"><span class="section-number-2">2</span> Electron (electron group)</h2>
|
||||
<div id="outline-container-orgc17c195" class="outline-2">
|
||||
<h2 id="orgc17c195"><span class="section-number-2">2</span> Electron (electron group)</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
<p>
|
||||
We consider wave functions expressed in the spin-free formalism, where
|
||||
the number of ↑ and ↓ electrons is fixed.
|
||||
</p>
|
||||
|
||||
<table id="orgf6f73a3" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org15f6a4b" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -534,15 +534,15 @@ the number of ↑ and ↓ electrons is fixed.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org44388f3" class="outline-2">
|
||||
<h2 id="org44388f3"><span class="section-number-2">3</span> Nucleus (nucleus group)</h2>
|
||||
<div id="outline-container-orgbd3c307" class="outline-2">
|
||||
<h2 id="orgbd3c307"><span class="section-number-2">3</span> Nucleus (nucleus group)</h2>
|
||||
<div class="outline-text-2" id="text-3">
|
||||
<p>
|
||||
The nuclei are considered as fixed point charges. Coordinates are
|
||||
given in Cartesian \((x,y,z)\) format.
|
||||
</p>
|
||||
|
||||
<table id="orgbe239f4" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org12dc182" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -609,8 +609,8 @@ given in Cartesian \((x,y,z)\) format.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org3a56e0e" class="outline-2">
|
||||
<h2 id="org3a56e0e"><span class="section-number-2">4</span> Effective core potentials (ecp group)</h2>
|
||||
<div id="outline-container-org7a3bc61" class="outline-2">
|
||||
<h2 id="org7a3bc61"><span class="section-number-2">4</span> Effective core potentials (ecp group)</h2>
|
||||
<div class="outline-text-2" id="text-4">
|
||||
<p>
|
||||
An effective core potential (ECP) \(V_A^{\text{ECP}}\) replacing the
|
||||
@ -643,7 +643,7 @@ The functions \(V_{A\ell}\) are parameterized as:
|
||||
See <a href="http://dx.doi.org/10.1063/1.4984046">http://dx.doi.org/10.1063/1.4984046</a> or <a href="https://doi.org/10.1063/1.5121006">https://doi.org/10.1063/1.5121006</a> for more info.
|
||||
</p>
|
||||
|
||||
<table id="org6902d0b" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org6746153" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -741,8 +741,8 @@ The latter causes issues when written before <code>ang_mom</code> in the TREXIO
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org8536693" class="outline-3">
|
||||
<h3 id="org8536693"><span class="section-number-3">4.1</span> Example</h3>
|
||||
<div id="outline-container-org75753bc" class="outline-3">
|
||||
<h3 id="org75753bc"><span class="section-number-3">4.1</span> Example</h3>
|
||||
<div class="outline-text-3" id="text-4-1">
|
||||
<p>
|
||||
For example, consider H<sub>2</sub> molecule with the following
|
||||
@ -805,8 +805,8 @@ power = [
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org862e2cd" class="outline-2">
|
||||
<h2 id="org862e2cd"><span class="section-number-2">5</span> Basis set (basis group)</h2>
|
||||
<div id="outline-container-orgcbc2b99" class="outline-2">
|
||||
<h2 id="orgcbc2b99"><span class="section-number-2">5</span> Basis set (basis group)</h2>
|
||||
<div class="outline-text-2" id="text-5">
|
||||
<p>
|
||||
We consider here basis functions centered on nuclei. Hence, we enable
|
||||
@ -859,7 +859,7 @@ If the the basis function is not considered normalized, \(\mathcal{N}_s=1\).
|
||||
All the basis set parameters are stored in one-dimensional arrays:
|
||||
</p>
|
||||
|
||||
<table id="orge1c76ff" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orgc557591" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -953,8 +953,8 @@ All the basis set parameters are stored in one-dimensional arrays:
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org22597b2" class="outline-3">
|
||||
<h3 id="org22597b2"><span class="section-number-3">5.1</span> Example</h3>
|
||||
<div id="outline-container-orgb77b98f" class="outline-3">
|
||||
<h3 id="orgb77b98f"><span class="section-number-3">5.1</span> Example</h3>
|
||||
<div class="outline-text-3" id="text-5-1">
|
||||
<p>
|
||||
For example, consider H<sub>2</sub> with the following basis set (in GAMESS
|
||||
@ -1032,8 +1032,8 @@ prim_factor =
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd15963f" class="outline-2">
|
||||
<h2 id="orgd15963f"><span class="section-number-2">6</span> Atomic orbitals (ao group)</h2>
|
||||
<div id="outline-container-org71681e2" class="outline-2">
|
||||
<h2 id="org71681e2"><span class="section-number-2">6</span> Atomic orbitals (ao group)</h2>
|
||||
<div class="outline-text-2" id="text-6">
|
||||
<p>
|
||||
Going from the atomic basis set to AOs implies a systematic
|
||||
@ -1085,13 +1085,13 @@ shell, as in the GAMESS convention where
|
||||
|
||||
<p>
|
||||
In such a case, one should set the normalization of the shell (in
|
||||
the <a href="#org862e2cd">Basis set</a> section) to \(\mathcal{N}_{z^2}\), which is the
|
||||
the <a href="#orgcbc2b99">Basis set</a> section) to \(\mathcal{N}_{z^2}\), which is the
|
||||
normalization factor of the atomic orbitals in spherical coordinates.
|
||||
The normalization factor of the \(xy\) function which should be
|
||||
introduced here should be \(\frac{\mathcal{N}_{xy}}{\mathcal{N}_{z^2}}\).
|
||||
</p>
|
||||
|
||||
<table id="org1b27b79" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org3d93142" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1143,8 +1143,8 @@ introduced here should be \(\frac{\mathcal{N}_{xy}}{\mathcal{N}_{z^2}}\).
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org41b773e" class="outline-3">
|
||||
<h3 id="ao_one_e"><a id="org41b773e"></a><span class="section-number-3">6.1</span> One-electron integrals (<code>ao_1e_int</code> group)</h3>
|
||||
<div id="outline-container-orge0a6714" class="outline-3">
|
||||
<h3 id="ao_one_e"><a id="orge0a6714"></a><span class="section-number-3">6.1</span> One-electron integrals (<code>ao_1e_int</code> group)</h3>
|
||||
<div class="outline-text-3" id="text-ao_one_e">
|
||||
<ul class="org-ul">
|
||||
<li>\[ \hat{V}_{\text{ne}} = \sum_{A=1}^{N_\text{nucl}}
|
||||
@ -1162,7 +1162,7 @@ The one-electron integrals for a one-electron operator \(\hat{O}\) are
|
||||
over atomic orbitals.
|
||||
</p>
|
||||
|
||||
<table id="orgb5d427c" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org2f4d31c" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1229,8 +1229,8 @@ over atomic orbitals.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org1512c78" class="outline-3">
|
||||
<h3 id="ao_two_e"><a id="org1512c78"></a><span class="section-number-3">6.2</span> Two-electron integrals (<code>ao_2e_int</code> group)</h3>
|
||||
<div id="outline-container-orgcc6c496" class="outline-3">
|
||||
<h3 id="ao_two_e"><a id="orgcc6c496"></a><span class="section-number-3">6.2</span> Two-electron integrals (<code>ao_2e_int</code> group)</h3>
|
||||
<div class="outline-text-3" id="text-ao_two_e">
|
||||
<p>
|
||||
The two-electron integrals for a two-electron operator \(\hat{O}\) are
|
||||
@ -1251,7 +1251,7 @@ notation.
|
||||
\mathbf{r}_j \vert)}{\vert \mathbf{r}_i - \mathbf{r}_j \vert} \] : electron-electron long range potential</li>
|
||||
</ul>
|
||||
|
||||
<table id="org4ce250c" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orgc2bf351" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1291,10 +1291,10 @@ notation.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org00545c7" class="outline-2">
|
||||
<h2 id="org00545c7"><span class="section-number-2">7</span> Molecular orbitals (mo group)</h2>
|
||||
<div id="outline-container-org044e1c6" class="outline-2">
|
||||
<h2 id="org044e1c6"><span class="section-number-2">7</span> Molecular orbitals (mo group)</h2>
|
||||
<div class="outline-text-2" id="text-7">
|
||||
<table id="orgf61f4ad" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org856668c" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1360,8 +1360,8 @@ notation.
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge13aba9" class="outline-3">
|
||||
<h3 id="orge13aba9"><span class="section-number-3">7.1</span> One-electron integrals (<code>mo_1e_int</code> group)</h3>
|
||||
<div id="outline-container-org5cc2422" class="outline-3">
|
||||
<h3 id="org5cc2422"><span class="section-number-3">7.1</span> One-electron integrals (<code>mo_1e_int</code> group)</h3>
|
||||
<div class="outline-text-3" id="text-7-1">
|
||||
<p>
|
||||
The operators as the same as those defined in the
|
||||
@ -1369,7 +1369,7 @@ The operators as the same as those defined in the
|
||||
the basis of molecular orbitals.
|
||||
</p>
|
||||
|
||||
<table id="orgd2ff988" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org76ab231" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1436,8 +1436,8 @@ the basis of molecular orbitals.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org220b8d4" class="outline-3">
|
||||
<h3 id="org220b8d4"><span class="section-number-3">7.2</span> Two-electron integrals (<code>mo_2e_int</code> group)</h3>
|
||||
<div id="outline-container-orga500d39" class="outline-3">
|
||||
<h3 id="orga500d39"><span class="section-number-3">7.2</span> Two-electron integrals (<code>mo_2e_int</code> group)</h3>
|
||||
<div class="outline-text-3" id="text-7-2">
|
||||
<p>
|
||||
The operators as the same as those defined in the
|
||||
@ -1445,7 +1445,7 @@ The operators as the same as those defined in the
|
||||
the basis of molecular orbitals.
|
||||
</p>
|
||||
|
||||
<table id="org6639d50" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org6f026d5" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1485,13 +1485,64 @@ the basis of molecular orbitals.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org0ed0b86" class="outline-2">
|
||||
<h2 id="org0ed0b86"><span class="section-number-2">8</span> <span class="todo TODO">TODO</span> Slater determinants</h2>
|
||||
<div id="outline-container-org292fed8" class="outline-2">
|
||||
<h2 id="org292fed8"><span class="section-number-2">8</span> <span class="todo TODO">TODO</span> Slater determinants</h2>
|
||||
</div>
|
||||
<div id="outline-container-org590d9ab" class="outline-2">
|
||||
<h2 id="org590d9ab"><span class="section-number-2">9</span> Reduced density matrices (rdm group)</h2>
|
||||
<div id="outline-container-org37c7d96" class="outline-2">
|
||||
<h2 id="org37c7d96"><span class="section-number-2">9</span> Reduced density matrices (rdm group)</h2>
|
||||
<div class="outline-text-2" id="text-9">
|
||||
<table id="org6606c9e" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<p>
|
||||
The reduced density matrices are defined in the basis of molecular
|
||||
orbitals.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The $↑$-spin and $↓$-spin components of the one-body
|
||||
density matrix are given by
|
||||
</p>
|
||||
\begin{eqnarray*}
|
||||
\gamma_{ij}^{\uparrow} &=& \langle \Psi | a^{\dagger}_{j\alpha}\, a_{i\alpha} | \Psi \rangle \\
|
||||
\gamma_{ij}^{\downarrow} &=& \langle \Psi | a^{\dagger}_{j\beta} \, a_{i\beta} | \Psi \rangle
|
||||
\end{eqnarray*}
|
||||
<p>
|
||||
and the spin-summed one-body density matrix is
|
||||
\[
|
||||
\gamma_{ij} = \gamma^{\uparrow}_{ij} + \gamma^{\downarrow}_{ij}
|
||||
\]
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The \(\uparrow \uparrow\), \(\downarrow \downarrow\), \(\uparrow \downarrow\), \(\downarrow \uparrow\)
|
||||
components of the two-body density matrix are given by
|
||||
</p>
|
||||
\begin{eqnarray*}
|
||||
\Gamma_{ijkl}^{\uparrow \uparrow} &=&
|
||||
\langle \Psi | a^{\dagger}_{k\alpha}\, a^{\dagger}_{l\alpha} a_{j\alpha}\, a_{i\alpha} | \Psi \rangle \\
|
||||
\Gamma_{ijkl}^{\downarrow \downarrow} &=&
|
||||
\langle \Psi | a^{\dagger}_{k\beta}\, a^{\dagger}_{l\beta} a_{j\beta}\, a_{i\beta} | \Psi \rangle \\
|
||||
\Gamma_{ijkl}^{\uparrow \downarrow} &=&
|
||||
+\langle \Psi | a^{\dagger}_{k\alpha}\, a^{\dagger}_{l\beta} a_{j\beta}\, a_{i\alpha} | \Psi \rangle \\
|
||||
\Gamma_{ijkl}^{\downarrow \uparrow} &=&
|
||||
\langle \Psi | a^{\dagger}_{k\beta}\, a^{\dagger}_{l\alpha} a_{j\alpha}\, a_{i\beta} | \Psi \rangle \\
|
||||
\end{eqnarray*}
|
||||
<p>
|
||||
and the spin-summed one-body density matrix is
|
||||
\[
|
||||
\Gamma_{ijkl} = \Gamma_{ijkl}^{\uparrow \uparrow} +
|
||||
\Gamma_{ijkl}^{\downarrow \downarrow} + \Gamma_{ijkl}^{\uparrow \downarrow}
|
||||
\Gamma_{ijkl}^{\downarrow \uparrow}
|
||||
\]
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The total energy can be computed as:
|
||||
\[
|
||||
E = E_{\text{NN}} + \sum_{ij} \gamma_{ij} \langle j|h|i \rangle +
|
||||
\frac{1}{2} \sum_{ijlk} \Gamma_{ijkl} \langle k l | i j \rangle
|
||||
\]
|
||||
</p>
|
||||
|
||||
<table id="orgd8d0ba4" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1560,6 +1611,13 @@ the basis of molecular orbitals.
|
||||
<td class="org-left"><code>(mo.num, mo.num, mo.num, mo.num)</code></td>
|
||||
<td class="org-left">↑↓ component of the two-body reduced density matrix</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left"><code>2e_dnup</code></td>
|
||||
<td class="org-left"><code>float sparse</code></td>
|
||||
<td class="org-left"><code>(mo.num, mo.num, mo.num, mo.num)</code></td>
|
||||
<td class="org-left">↓↑ component of the two-body reduced density matrix</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@ -1567,7 +1625,7 @@ the basis of molecular orbitals.
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX-CoE</p>
|
||||
<p class="date">Created: 2022-01-07 Fri 18:41</p>
|
||||
<p class="date">Created: 2022-01-10 Mon 09:28</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