1
0
mirror of https://github.com/TREX-CoE/trexio.git synced 2025-01-12 22:18:35 +01:00

Deploying to gh-pages from @ TREX-CoE/trexio@0967c5f4b8 🚀

This commit is contained in:
scemama 2021-10-21 17:40:52 +00:00
parent 81093f3264
commit 226a56a0ad
7 changed files with 391 additions and 383 deletions

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2021-10-14 Thu 08:59 -->
<!-- 2021-10-21 Thu 17:40 -->
<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>
@ -343,7 +343,7 @@ and bug reports should be submitted at
</div>
<div id="postamble" class="status">
<p class="author">Author: TREX-CoE</p>
<p class="date">Created: 2021-10-14 Thu 08:59</p>
<p class="date">Created: 2021-10-21 Thu 17:40</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2021-10-14 Thu 08:59 -->
<!-- 2021-10-21 Thu 17:40 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>&lrm;</title>
@ -232,8 +232,8 @@ for the JavaScript code in this tag.
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#orgf1d6498">1. Text back end</a></li>
<li><a href="#org03a8484">2. HDF5 Back end</a></li>
<li><a href="#org8f6fae2">1. Text back end</a></li>
<li><a href="#org8082903">2. HDF5 Back end</a></li>
</ul>
</div>
</div>
@ -241,8 +241,8 @@ for the JavaScript code in this tag.
See templator<sub>front.org</sub>
</p>
<div id="outline-container-orgf1d6498" class="outline-2">
<h2 id="orgf1d6498"><span class="section-number-2">1</span> Text back end</h2>
<div id="outline-container-org8f6fae2" class="outline-2">
<h2 id="org8f6fae2"><span class="section-number-2">1</span> Text back end</h2>
<div class="outline-text-2" id="text-1">
<p>
As the size of the dataset should be extensible, the simplest
@ -256,8 +256,8 @@ The offset can be used with <code>fseek(69L*offset, SEEK_SET)</code>
</div>
</div>
<div id="outline-container-org03a8484" class="outline-2">
<h2 id="org03a8484"><span class="section-number-2">2</span> HDF5 Back end</h2>
<div id="outline-container-org8082903" class="outline-2">
<h2 id="org8082903"><span class="section-number-2">2</span> HDF5 Back end</h2>
<div class="outline-text-2" id="text-2">
<p>
We need to declare the number of rows of the dataset as
@ -278,7 +278,7 @@ If the offset+num &gt; nmax, we need to extend the dataset.
</div>
</div>
<div id="postamble" class="status">
<p class="date">Created: 2021-10-14 Thu 08:59</p>
<p class="date">Created: 2021-10-21 Thu 17:40</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2021-10-14 Thu 08:59 -->
<!-- 2021-10-21 Thu 17:40 -->
<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>
@ -343,7 +343,7 @@ and bug reports should be submitted at
</div>
<div id="postamble" class="status">
<p class="author">Author: TREX-CoE</p>
<p class="date">Created: 2021-10-14 Thu 08:59</p>
<p class="date">Created: 2021-10-21 Thu 17:40</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2021-10-14 Thu 08:59 -->
<!-- 2021-10-21 Thu 17:40 -->
<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,125 +333,125 @@ for the JavaScript code in this tag.
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#orgf2a14c5">1. Coding conventions</a>
<li><a href="#orga1fc9d2">1. Coding conventions</a>
<ul>
<li><a href="#org7550e35">1.1. Memory allocation</a></li>
<li><a href="#org743d227">1.1. Memory allocation</a></li>
</ul>
</li>
<li><a href="#org32ff745">2. Front end</a>
<li><a href="#org36d1ec8">2. Front end</a>
<ul>
<li><a href="#orgcd4e3af">2.1. Error handling</a>
<li><a href="#org9d356fd">2.1. Error handling</a>
<ul>
<li><a href="#org090e3d7">2.1.1. Decoding errors</a>
<li><a href="#org90a3033">2.1.1. Decoding errors</a>
<ul>
<li><a href="#org62cb96b">2.1.1.1. C source code</a></li>
<li><a href="#org775af1b">2.1.1.2. Fortran interface</a></li>
<li><a href="#orgca844a2">2.1.1.3. Python interface</a></li>
<li><a href="#org296376b">2.1.1.1. C source code</a></li>
<li><a href="#org6f28b73">2.1.1.2. Fortran interface</a></li>
<li><a href="#org4a227bf">2.1.1.3. Python interface</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#orgf029c25">2.2. Back ends</a>
<li><a href="#org04446b1">2.2. Back ends</a>
<ul>
<li><a href="#org77377c1">2.2.1. C</a></li>
<li><a href="#org6d5e21f">2.2.2. Fortran</a></li>
<li><a href="#orgd48c47c">2.2.3. Python</a></li>
<li><a href="#orgcba4eca">2.2.1. C</a></li>
<li><a href="#org63191a6">2.2.2. Fortran</a></li>
<li><a href="#org81e3cd2">2.2.3. Python</a></li>
</ul>
</li>
<li><a href="#org11e88b2">2.3. Read/write behavior</a></li>
<li><a href="#org5edda87">2.4. TREXIO file type</a>
<li><a href="#org5222b39">2.3. Read/write behavior</a></li>
<li><a href="#org8bf7349">2.4. TREXIO file type</a>
<ul>
<li><a href="#org50927d4">2.4.1. TREXIO<sub>File</sub> Python class</a></li>
<li><a href="#orgd7b4fff">2.4.1. TREXIO<sub>File</sub> Python class</a></li>
</ul>
</li>
<li><a href="#org16525fb">2.5. Polymorphism of the file handle</a></li>
<li><a href="#org6b4d7e0">2.6. File opening</a>
<li><a href="#org517c9e7">2.5. Polymorphism of the file handle</a></li>
<li><a href="#org2607454">2.6. File opening</a>
<ul>
<li><a href="#orgf418f67">2.6.1. C</a></li>
<li><a href="#org6194c75">2.6.2. Fortran</a></li>
<li><a href="#org789c5d8">2.6.3. Python</a></li>
<li><a href="#org92245d1">2.6.4. Zero-based versus one-based arrays of indices</a></li>
<li><a href="#orgf3c783d">2.6.1. C</a></li>
<li><a href="#orgd49a9f1">2.6.2. Fortran</a></li>
<li><a href="#org5bc636d">2.6.3. Python</a></li>
<li><a href="#orgca5237d">2.6.4. Zero-based versus one-based arrays of indices</a></li>
</ul>
</li>
<li><a href="#org7b5ee3a">2.7. File closing</a>
<li><a href="#org2908da2">2.7. File closing</a>
<ul>
<li><a href="#org469aa80">2.7.1. C</a></li>
<li><a href="#org492447d">2.7.2. Fortran</a></li>
<li><a href="#org167dbed">2.7.3. Python</a></li>
<li><a href="#orgf7290b8">2.7.1. C</a></li>
<li><a href="#org00823be">2.7.2. Fortran</a></li>
<li><a href="#orgc0f253b">2.7.3. Python</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#org6fe03c5">3. Templates for front end</a>
<li><a href="#org98c4dba">3. Templates for front end</a>
<ul>
<li><a href="#org72d405c">3.1. Description</a></li>
<li><a href="#org0d712c0">3.2. Templates for front end has/read/write a single numerical attribute</a>
<li><a href="#org29f6586">3.1. Description</a></li>
<li><a href="#orga9990d1">3.2. Templates for front end has/read/write a single numerical attribute</a>
<ul>
<li><a href="#orgd8be5bc">3.2.1. Introduction</a></li>
<li><a href="#orgdb22e7e">3.2.2. C templates for front end</a>
<li><a href="#orgc0997ae">3.2.1. Introduction</a></li>
<li><a href="#orgaa1cd6f">3.2.2. C templates for front end</a>
<ul>
<li><a href="#org433ff63">3.2.2.1. Function declarations</a></li>
<li><a href="#orgaea2e0c">3.2.2.2. Source code for double precision functions</a></li>
<li><a href="#org9e62624">3.2.2.3. Source code for single precision functions</a></li>
<li><a href="#org9f5982d">3.2.2.4. Source code for default functions</a></li>
<li><a href="#org9c41458">3.2.2.1. Function declarations</a></li>
<li><a href="#orgac2a3c3">3.2.2.2. Source code for double precision functions</a></li>
<li><a href="#orgd7f6828">3.2.2.3. Source code for single precision functions</a></li>
<li><a href="#org8cee097">3.2.2.4. Source code for default functions</a></li>
</ul>
</li>
<li><a href="#org8e05746">3.2.3. Fortran templates for front end</a></li>
<li><a href="#org6eff863">3.2.4. Python templates for front end</a></li>
<li><a href="#orgbeeb5a8">3.2.3. Fortran templates for front end</a></li>
<li><a href="#org3ab8bb8">3.2.4. Python templates for front end</a></li>
</ul>
</li>
<li><a href="#orga9b2685">3.3. Templates for front end has/read/write a dataset of numerical data</a>
<li><a href="#orgbb47b22">3.3. Templates for front end has/read/write a dataset of numerical data</a>
<ul>
<li><a href="#orgdff8300">3.3.1. Introduction</a></li>
<li><a href="#orgcfe7312">3.3.2. C templates for front end</a>
<li><a href="#org5c7898c">3.3.1. Introduction</a></li>
<li><a href="#orgd096848">3.3.2. C templates for front end</a>
<ul>
<li><a href="#org54136ae">3.3.2.1. Function declarations</a></li>
<li><a href="#orgcd5cbb9">3.3.2.2. Source code for double precision functions</a></li>
<li><a href="#org0a2100c">3.3.2.3. Source code for single precision functions</a></li>
<li><a href="#orgbf263b1">3.3.2.4. Source code for memory-safe functions</a></li>
<li><a href="#org8a65af1">3.3.2.5. Source code for default functions</a></li>
<li><a href="#orgb376523">3.3.2.1. Function declarations</a></li>
<li><a href="#org91c2e54">3.3.2.2. Source code for double precision functions</a></li>
<li><a href="#org2c91bfb">3.3.2.3. Source code for single precision functions</a></li>
<li><a href="#org21d09c1">3.3.2.4. Source code for memory-safe functions</a></li>
<li><a href="#org1caf42d">3.3.2.5. Source code for default functions</a></li>
</ul>
</li>
<li><a href="#org180074f">3.3.3. Fortran templates for front end</a></li>
<li><a href="#orgc2c4a5c">3.3.4. Python templates for front end</a></li>
<li><a href="#orgb49b2db">3.3.3. Fortran templates for front end</a></li>
<li><a href="#orgd384e92">3.3.4. Python templates for front end</a></li>
</ul>
</li>
<li><a href="#org9bcc034">3.4. Sparse data structures</a></li>
<li><a href="#org1debada">3.5. Templates for front end has/read/write a dataset of strings</a>
<li><a href="#orge31ce3e">3.4. Sparse data structures</a></li>
<li><a href="#orgc7476b1">3.5. Templates for front end has/read/write a dataset of strings</a>
<ul>
<li><a href="#org6de9670">3.5.1. Introduction</a></li>
<li><a href="#orgdb40c76">3.5.2. C templates for front end</a>
<li><a href="#org84d325e">3.5.1. Introduction</a></li>
<li><a href="#org6e0b080">3.5.2. C templates for front end</a>
<ul>
<li><a href="#org9475e10">3.5.2.1. Function declarations</a></li>
<li><a href="#org1767e40">3.5.2.2. Source code for default functions</a></li>
<li><a href="#orga0bb920">3.5.2.1. Function declarations</a></li>
<li><a href="#org6927613">3.5.2.2. Source code for default functions</a></li>
</ul>
</li>
<li><a href="#orgc0d4f37">3.5.3. Fortran templates for front end</a></li>
<li><a href="#orga49bc3f">3.5.4. Python templates for front end</a></li>
<li><a href="#org0ea3ee9">3.5.3. Fortran templates for front end</a></li>
<li><a href="#org51f39ae">3.5.4. Python templates for front end</a></li>
</ul>
</li>
<li><a href="#org3cc89a1">3.6. Templates for front end has/read/write a single string attribute</a>
<li><a href="#orgaeb2b4b">3.6. Templates for front end has/read/write a single string attribute</a>
<ul>
<li><a href="#org60104ff">3.6.1. Introduction</a></li>
<li><a href="#org9a3d857">3.6.2. C templates for front end</a>
<li><a href="#org0def1e2">3.6.1. Introduction</a></li>
<li><a href="#org9571ac7">3.6.2. C templates for front end</a>
<ul>
<li><a href="#org9fed500">3.6.2.1. Function declarations</a></li>
<li><a href="#orgd62e6e3">3.6.2.2. Source code for default functions</a></li>
<li><a href="#org0e6d4d9">3.6.2.1. Function declarations</a></li>
<li><a href="#org0c4d53b">3.6.2.2. Source code for default functions</a></li>
</ul>
</li>
<li><a href="#org76e1f01">3.6.3. Fortran templates for front end</a></li>
<li><a href="#orge713fcd">3.6.4. Python templates for front end</a></li>
<li><a href="#org6b7305f">3.6.3. Fortran templates for front end</a></li>
<li><a href="#org414a668">3.6.4. Python templates for front end</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#orgdff1b9c">4. Fortran helper/wrapper functions</a></li>
<li><a href="#org8ad3d5e">4. Fortran helper/wrapper functions</a></li>
</ul>
</div>
</div>
<div id="outline-container-orgf2a14c5" class="outline-2">
<h2 id="orgf2a14c5"><span class="section-number-2">1</span> Coding conventions</h2>
<div id="outline-container-orga1fc9d2" class="outline-2">
<h2 id="orga1fc9d2"><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>
@ -466,8 +466,8 @@ for the JavaScript code in this tag.
</ul>
</div>
<div id="outline-container-org7550e35" class="outline-3">
<h3 id="org7550e35"><span class="section-number-3">1.1</span> Memory allocation</h3>
<div id="outline-container-org743d227" class="outline-3">
<h3 id="org743d227"><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
@ -502,8 +502,8 @@ The maximum string size for the filenames is 4096 characters.
</div>
</div>
<div id="outline-container-org32ff745" class="outline-2">
<h2 id="org32ff745"><span class="section-number-2">2</span> Front end</h2>
<div id="outline-container-org36d1ec8" class="outline-2">
<h2 id="org36d1ec8"><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.
@ -511,10 +511,10 @@ TREXIO front end is modular, which simplifies implementation of new back ends.
</p>
</div>
<div id="outline-container-orgcd4e3af" class="outline-3">
<h3 id="orgcd4e3af"><span class="section-number-3">2.1</span> Error handling</h3>
<div id="outline-container-org9d356fd" class="outline-3">
<h3 id="org9d356fd"><span class="section-number-3">2.1</span> Error handling</h3>
<div class="outline-text-3" id="text-2-1">
<table id="org20b2d64" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="org504b657" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -736,8 +736,8 @@ TREXIO front end is modular, which simplifies implementation of new back ends.
</div>
</div>
<div id="outline-container-org090e3d7" class="outline-4">
<h4 id="org090e3d7"><span class="section-number-4">2.1.1</span> Decoding errors</h4>
<div id="outline-container-org90a3033" class="outline-4">
<h4 id="org90a3033"><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
@ -760,8 +760,8 @@ The text strings are extracted from the previous table.
</p>
</div>
<div id="outline-container-org62cb96b" class="outline-5">
<h5 id="org62cb96b"><span class="section-number-5">2.1.1.1</span> C source code</h5>
<div id="outline-container-org296376b" class="outline-5">
<h5 id="org296376b"><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>*
@ -866,8 +866,8 @@ The text strings are extracted from the previous table.
</div>
</div>
<div id="outline-container-org775af1b" class="outline-5">
<h5 id="org775af1b"><span class="section-number-5">2.1.1.2</span> Fortran interface</h5>
<div id="outline-container-org6f28b73" class="outline-5">
<h5 id="org6f28b73"><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>
@ -883,8 +883,8 @@ The text strings are extracted from the previous table.
</div>
</div>
<div id="outline-container-orgca844a2" class="outline-5">
<h5 id="orgca844a2"><span class="section-number-5">2.1.1.3</span> Python interface</h5>
<div id="outline-container-org4a227bf" class="outline-5">
<h5 id="org4a227bf"><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>):
@ -923,8 +923,8 @@ The text strings are extracted from the previous table.
</div>
</div>
<div id="outline-container-orgf029c25" class="outline-3">
<h3 id="orgf029c25"><span class="section-number-3">2.2</span> Back ends</h3>
<div id="outline-container-org04446b1" class="outline-3">
<h3 id="org04446b1"><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:
@ -948,8 +948,8 @@ lines that correspond to the <code>TREXIO_JSON</code> back end (not implemented
</p>
</div>
<div id="outline-container-org77377c1" class="outline-4">
<h4 id="org77377c1"><span class="section-number-4">2.2.1</span> C</h4>
<div id="outline-container-orgcba4eca" class="outline-4">
<h4 id="orgcba4eca"><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>;
@ -965,8 +965,8 @@ lines that correspond to the <code>TREXIO_JSON</code> back end (not implemented
</div>
</div>
<div id="outline-container-org6d5e21f" class="outline-4">
<h4 id="org6d5e21f"><span class="section-number-4">2.2.2</span> Fortran</h4>
<div id="outline-container-org63191a6" class="outline-4">
<h4 id="org63191a6"><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>
@ -978,8 +978,8 @@ lines that correspond to the <code>TREXIO_JSON</code> back end (not implemented
</div>
</div>
<div id="outline-container-orgd48c47c" class="outline-4">
<h4 id="orgd48c47c"><span class="section-number-4">2.2.3</span> Python</h4>
<div id="outline-container-org81e3cd2" class="outline-4">
<h4 id="org81e3cd2"><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>
@ -993,8 +993,8 @@ lines that correspond to the <code>TREXIO_JSON</code> back end (not implemented
</div>
</div>
<div id="outline-container-org11e88b2" class="outline-3">
<h3 id="org11e88b2"><span class="section-number-3">2.3</span> Read/write behavior</h3>
<div id="outline-container-org5222b39" class="outline-3">
<h3 id="org5222b39"><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
@ -1022,8 +1022,8 @@ concurrent programs, the behavior is not specified.
</p>
</div>
</div>
<div id="outline-container-org5edda87" class="outline-3">
<h3 id="org5edda87"><span class="section-number-3">2.4</span> TREXIO file type</h3>
<div id="outline-container-org8bf7349" class="outline-3">
<h3 id="org8bf7349"><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
@ -1057,8 +1057,8 @@ TREXIO files will have as a first argument the TREXIO file handle.
</div>
</div>
<div id="outline-container-org50927d4" class="outline-4">
<h4 id="org50927d4"><span class="section-number-4">2.4.1</span> TREXIO<sub>File</sub> Python class</h4>
<div id="outline-container-orgd7b4fff" class="outline-4">
<h4 id="orgd7b4fff"><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>:
@ -1131,8 +1131,8 @@ TREXIO files will have as a first argument the TREXIO file handle.
</div>
</div>
<div id="outline-container-org16525fb" class="outline-3">
<h3 id="org16525fb"><span class="section-number-3">2.5</span> Polymorphism of the file handle</h3>
<div id="outline-container-org517c9e7" class="outline-3">
<h3 id="org517c9e7"><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
@ -1151,8 +1151,8 @@ corresponding types for all back ends can be safely casted to
</div>
</div>
<div id="outline-container-org6b4d7e0" class="outline-3">
<h3 id="org6b4d7e0"><span class="section-number-3">2.6</span> File opening</h3>
<div id="outline-container-org2607454" class="outline-3">
<h3 id="org2607454"><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.
@ -1191,8 +1191,8 @@ renaming the <code>.txt</code> data files.
</p>
</div>
<div id="outline-container-orgf418f67" class="outline-4">
<h4 id="orgf418f67"><span class="section-number-4">2.6.1</span> C</h4>
<div id="outline-container-orgf3c783d" class="outline-4">
<h4 id="orgf3c783d"><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>*
@ -1359,8 +1359,8 @@ renaming the <code>.txt</code> data files.
</div>
</div>
<div id="outline-container-org6194c75" class="outline-4">
<h4 id="org6194c75"><span class="section-number-4">2.6.2</span> Fortran</h4>
<div id="outline-container-orgd49a9f1" class="outline-4">
<h4 id="orgd49a9f1"><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>
@ -1378,8 +1378,8 @@ renaming the <code>.txt</code> data files.
</div>
</div>
<div id="outline-container-org789c5d8" class="outline-4">
<h4 id="org789c5d8"><span class="section-number-4">2.6.3</span> Python</h4>
<div id="outline-container-org5bc636d" class="outline-4">
<h4 id="org5bc636d"><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>):
@ -1427,8 +1427,8 @@ renaming the <code>.txt</code> data files.
</div>
</div>
<div id="outline-container-org92245d1" class="outline-4">
<h4 id="org92245d1"><span class="section-number-4">2.6.4</span> Zero-based versus one-based arrays of indices</h4>
<div id="outline-container-orgca5237d" class="outline-4">
<h4 id="orgca5237d"><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
@ -1461,8 +1461,8 @@ know if we need to shift by 1 arrays of indices.
</div>
</div>
<div id="outline-container-org7b5ee3a" class="outline-3">
<h3 id="org7b5ee3a"><span class="section-number-3">2.7</span> File closing</h3>
<div id="outline-container-org2908da2" class="outline-3">
<h3 id="org2908da2"><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.
@ -1479,8 +1479,8 @@ output:
</p>
</div>
<div id="outline-container-org469aa80" class="outline-4">
<h4 id="org469aa80"><span class="section-number-4">2.7.1</span> C</h4>
<div id="outline-container-orgf7290b8" class="outline-4">
<h4 id="orgf7290b8"><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>
@ -1551,8 +1551,8 @@ output:
</div>
</div>
<div id="outline-container-org492447d" class="outline-4">
<h4 id="org492447d"><span class="section-number-4">2.7.2</span> Fortran</h4>
<div id="outline-container-org00823be" class="outline-4">
<h4 id="org00823be"><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>
@ -1566,8 +1566,8 @@ output:
</div>
</div>
<div id="outline-container-org167dbed" class="outline-4">
<h4 id="org167dbed"><span class="section-number-4">2.7.3</span> Python</h4>
<div id="outline-container-orgc0f253b" class="outline-4">
<h4 id="orgc0f253b"><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):
@ -1589,12 +1589,12 @@ output:
</div>
</div>
<div id="outline-container-org6fe03c5" class="outline-2">
<h2 id="org6fe03c5"><span class="section-number-2">3</span> Templates for front end</h2>
<div id="outline-container-org98c4dba" class="outline-2">
<h2 id="org98c4dba"><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-org72d405c" class="outline-3">
<h3 id="org72d405c"><span class="section-number-3">3.1</span> Description</h3>
<div id="outline-container-org29f6586" class="outline-3">
<h3 id="org29f6586"><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>:
@ -1815,12 +1815,12 @@ value will result in <code>TREXIO_INVALID_ARG_2</code> exit code.
</div>
</div>
<div id="outline-container-org0d712c0" class="outline-3">
<h3 id="org0d712c0"><span class="section-number-3">3.2</span> Templates for front end has/read/write a single numerical attribute</h3>
<div id="outline-container-orga9990d1" class="outline-3">
<h3 id="orga9990d1"><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-orgd8be5bc" class="outline-4">
<h4 id="orgd8be5bc"><span class="section-number-4">3.2.1</span> Introduction</h4>
<div id="outline-container-orgc0997ae" class="outline-4">
<h4 id="orgc0997ae"><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,
@ -1891,8 +1891,8 @@ namely single value of int/float types.
</div>
</div>
<div id="outline-container-orgdb22e7e" class="outline-4">
<h4 id="orgdb22e7e"><span class="section-number-4">3.2.2</span> C templates for front end</h4>
<div id="outline-container-orgaa1cd6f" class="outline-4">
<h4 id="orgaa1cd6f"><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
@ -1906,12 +1906,12 @@ precision (see Table above).
</p>
</div>
<div id="outline-container-org433ff63" class="outline-5">
<h5 id="org433ff63"><span class="section-number-5">3.2.2.1</span> Function declarations</h5>
<div id="outline-container-org9c41458" class="outline-5">
<h5 id="org9c41458"><span class="section-number-5">3.2.2.1</span> Function declarations</h5>
</div>
<div id="outline-container-orgaea2e0c" class="outline-5">
<h5 id="orgaea2e0c"><span class="section-number-5">3.2.2.2</span> Source code for double precision functions</h5>
<div id="outline-container-orgac2a3c3" class="outline-5">
<h5 id="orgac2a3c3"><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>
@ -1972,8 +1972,8 @@ precision (see Table above).
</div>
</div>
<div id="outline-container-org9e62624" class="outline-5">
<h5 id="org9e62624"><span class="section-number-5">3.2.2.3</span> Source code for single precision functions</h5>
<div id="outline-container-orgd7f6828" class="outline-5">
<h5 id="orgd7f6828"><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>
@ -2041,8 +2041,8 @@ precision (see Table above).
</div>
</div>
<div id="outline-container-org9f5982d" class="outline-5">
<h5 id="org9f5982d"><span class="section-number-5">3.2.2.4</span> Source code for default functions</h5>
<div id="outline-container-org8cee097" class="outline-5">
<h5 id="org8cee097"><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>
@ -2095,8 +2095,8 @@ precision (see Table above).
</div>
</div>
<div id="outline-container-org8e05746" class="outline-4">
<h4 id="org8e05746"><span class="section-number-4">3.2.3</span> Fortran templates for front end</h4>
<div id="outline-container-orgbeeb5a8" class="outline-4">
<h4 id="orgbeeb5a8"><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.
@ -2181,8 +2181,8 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
</div>
</div>
<div id="outline-container-org6eff863" class="outline-4">
<h4 id="org6eff863"><span class="section-number-4">3.2.4</span> Python templates for front end</h4>
<div id="outline-container-org3ab8bb8" class="outline-4">
<h4 id="org3ab8bb8"><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$) -&gt; <span style="color: #008b8b;">None</span>:
@ -2267,12 +2267,12 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
</div>
</div>
<div id="outline-container-orga9b2685" class="outline-3">
<h3 id="orga9b2685"><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-orgbb47b22" class="outline-3">
<h3 id="orgbb47b22"><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-orgdff8300" class="outline-4">
<h4 id="orgdff8300"><span class="section-number-4">3.3.1</span> Introduction</h4>
<div id="outline-container-org5c7898c" class="outline-4">
<h4 id="org5c7898c"><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.
@ -2354,8 +2354,8 @@ This section concerns API calls related to datasets.
</div>
</div>
<div id="outline-container-orgcfe7312" class="outline-4">
<h4 id="orgcfe7312"><span class="section-number-4">3.3.2</span> C templates for front end</h4>
<div id="outline-container-orgd096848" class="outline-4">
<h4 id="orgd096848"><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.
@ -2366,13 +2366,13 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
</p>
</div>
<div id="outline-container-org54136ae" class="outline-5">
<h5 id="org54136ae"><span class="section-number-5">3.3.2.1</span> Function declarations</h5>
<div id="outline-container-orgb376523" class="outline-5">
<h5 id="orgb376523"><span class="section-number-5">3.3.2.1</span> Function declarations</h5>
</div>
<div id="outline-container-orgcd5cbb9" class="outline-5">
<h5 id="orgcd5cbb9"><span class="section-number-5">3.3.2.2</span> Source code for double precision functions</h5>
<div id="outline-container-org91c2e54" class="outline-5">
<h5 id="org91c2e54"><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>
@ -2500,8 +2500,8 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
</div>
</div>
<div id="outline-container-org0a2100c" class="outline-5">
<h5 id="org0a2100c"><span class="section-number-5">3.3.2.3</span> Source code for single precision functions</h5>
<div id="outline-container-org2c91bfb" class="outline-5">
<h5 id="org2c91bfb"><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>
@ -2642,11 +2642,11 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
</div>
</div>
<div id="outline-container-orgbf263b1" class="outline-5">
<h5 id="orgbf263b1"><span class="section-number-5">3.3.2.4</span> Source code for memory-safe functions</h5>
<div id="outline-container-org21d09c1" class="outline-5">
<h5 id="org21d09c1"><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="orgdc27eea"><span style="color: #228b22;">trexio_exit_code</span> <span style="color: #a0522d;">rc</span>;
<pre class="src src-c" id="orgd18eca7"><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>*/
@ -2802,8 +2802,8 @@ rc = trexio_read_$group_dset_dim$_64(file, &amp;($group_dset_dim$));
</div>
</div>
<div id="outline-container-org8a65af1" class="outline-5">
<h5 id="org8a65af1"><span class="section-number-5">3.3.2.5</span> Source code for default functions</h5>
<div id="outline-container-org1caf42d" class="outline-5">
<h5 id="org1caf42d"><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>
@ -2877,8 +2877,8 @@ rc = trexio_read_$group_dset_dim$_64(file, &amp;($group_dset_dim$));
</div>
</div>
<div id="outline-container-org180074f" class="outline-4">
<h4 id="org180074f"><span class="section-number-4">3.3.3</span> Fortran templates for front end</h4>
<div id="outline-container-orgb49b2db" class="outline-4">
<h4 id="orgb49b2db"><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>.
@ -2963,8 +2963,8 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
</div>
</div>
<div id="outline-container-orgc2c4a5c" class="outline-4">
<h4 id="orgc2c4a5c"><span class="section-number-4">3.3.4</span> Python templates for front end</h4>
<div id="outline-container-orgd384e92" class="outline-4">
<h4 id="orgd384e92"><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) -&gt; <span style="color: #008b8b;">None</span>:
@ -3159,8 +3159,8 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
</div>
</div>
<div id="outline-container-org9bcc034" class="outline-3">
<h3 id="org9bcc034"><span class="section-number-3">3.4</span> Sparse data structures</h3>
<div id="outline-container-orge31ce3e" class="outline-3">
<h3 id="orge31ce3e"><span class="section-number-3">3.4</span> Sparse data structures</h3>
<div class="outline-text-3" id="text-3-4">
<p>
Sparse data structures are used typically for large tensors such as
@ -3301,12 +3301,12 @@ For the values,
</div>
</div>
<div id="outline-container-org1debada" class="outline-3">
<h3 id="org1debada"><span class="section-number-3">3.5</span> Templates for front end has/read/write a dataset of strings</h3>
<div id="outline-container-orgc7476b1" class="outline-3">
<h3 id="orgc7476b1"><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-org6de9670" class="outline-4">
<h4 id="org6de9670"><span class="section-number-4">3.5.1</span> Introduction</h4>
<div id="outline-container-org84d325e" class="outline-4">
<h4 id="org84d325e"><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.
@ -3346,8 +3346,8 @@ This section concerns API calls related to datasets of strings.
</div>
</div>
<div id="outline-container-orgdb40c76" class="outline-4">
<h4 id="orgdb40c76"><span class="section-number-4">3.5.2</span> C templates for front end</h4>
<div id="outline-container-org6e0b080" class="outline-4">
<h4 id="org6e0b080"><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
@ -3355,12 +3355,12 @@ to/from the <code>TREXIO</code> file (except for <code>trexio_has_</code> functi
</p>
</div>
<div id="outline-container-org9475e10" class="outline-5">
<h5 id="org9475e10"><span class="section-number-5">3.5.2.1</span> Function declarations</h5>
<div id="outline-container-orga0bb920" class="outline-5">
<h5 id="orga0bb920"><span class="section-number-5">3.5.2.1</span> Function declarations</h5>
</div>
<div id="outline-container-org1767e40" class="outline-5">
<h5 id="org1767e40"><span class="section-number-5">3.5.2.2</span> Source code for default functions</h5>
<div id="outline-container-org6927613" class="outline-5">
<h5 id="org6927613"><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>
@ -3602,8 +3602,8 @@ to/from the <code>TREXIO</code> file (except for <code>trexio_has_</code> functi
</div>
</div>
<div id="outline-container-orgc0d4f37" class="outline-4">
<h4 id="orgc0d4f37"><span class="section-number-4">3.5.3</span> Fortran templates for front end</h4>
<div id="outline-container-org0ea3ee9" class="outline-4">
<h4 id="org0ea3ee9"><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>.
@ -3699,8 +3699,8 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
</div>
</div>
<div id="outline-container-orga49bc3f" class="outline-4">
<h4 id="orga49bc3f"><span class="section-number-4">3.5.4</span> Python templates for front end</h4>
<div id="outline-container-org51f39ae" class="outline-4">
<h4 id="org51f39ae"><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>) -&gt; <span style="color: #008b8b;">None</span>:
@ -3816,12 +3816,12 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
</div>
</div>
<div id="outline-container-org3cc89a1" class="outline-3">
<h3 id="org3cc89a1"><span class="section-number-3">3.6</span> Templates for front end has/read/write a single string attribute</h3>
<div id="outline-container-orgaeb2b4b" class="outline-3">
<h3 id="orgaeb2b4b"><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-org60104ff" class="outline-4">
<h4 id="org60104ff"><span class="section-number-4">3.6.1</span> Introduction</h4>
<div id="outline-container-org0def1e2" class="outline-4">
<h4 id="org0def1e2"><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.
@ -3861,16 +3861,16 @@ This section concerns API calls related to string attributes.
</div>
</div>
<div id="outline-container-org9a3d857" class="outline-4">
<h4 id="org9a3d857"><span class="section-number-4">3.6.2</span> C templates for front end</h4>
<div id="outline-container-org9571ac7" class="outline-4">
<h4 id="org9571ac7"><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-org9fed500" class="outline-5">
<h5 id="org9fed500"><span class="section-number-5">3.6.2.1</span> Function declarations</h5>
<div id="outline-container-org0e6d4d9" class="outline-5">
<h5 id="org0e6d4d9"><span class="section-number-5">3.6.2.1</span> Function declarations</h5>
</div>
<div id="outline-container-orgd62e6e3" class="outline-5">
<h5 id="orgd62e6e3"><span class="section-number-5">3.6.2.2</span> Source code for default functions</h5>
<div id="outline-container-org0c4d53b" class="outline-5">
<h5 id="org0c4d53b"><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>
@ -3970,8 +3970,8 @@ This section concerns API calls related to string attributes.
</div>
</div>
<div id="outline-container-org76e1f01" class="outline-4">
<h4 id="org76e1f01"><span class="section-number-4">3.6.3</span> Fortran templates for front end</h4>
<div id="outline-container-org6b7305f" class="outline-4">
<h4 id="org6b7305f"><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.
@ -4048,8 +4048,8 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
</div>
</div>
<div id="outline-container-orge713fcd" class="outline-4">
<h4 id="orge713fcd"><span class="section-number-4">3.6.4</span> Python templates for front end</h4>
<div id="outline-container-org414a668" class="outline-4">
<h4 id="org414a668"><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>) -&gt; <span style="color: #008b8b;">None</span>:
@ -4139,8 +4139,8 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
</div>
</div>
<div id="outline-container-orgdff1b9c" class="outline-2">
<h2 id="orgdff1b9c"><span class="section-number-2">4</span> Fortran helper/wrapper functions</h2>
<div id="outline-container-org8ad3d5e" class="outline-2">
<h2 id="org8ad3d5e"><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.
@ -4275,7 +4275,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: 2021-10-14 Thu 08:59</p>
<p class="date">Created: 2021-10-21 Thu 17:40</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2021-10-14 Thu 08:59 -->
<!-- 2021-10-21 Thu 17:40 -->
<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,27 +311,27 @@ for the JavaScript code in this tag.
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#orgdc801b1">1. HDF5 back end</a>
<li><a href="#org10bdbe2">1. HDF5 back end</a>
<ul>
<li><a href="#orgdd0aad8">1.1. Template for HDF5 definitions</a></li>
<li><a href="#org83cf976">1.2. Template for HDF5 structures</a></li>
<li><a href="#orgbe0f403">1.3. Template for HDF5 init/deinit</a></li>
<li><a href="#org14d20f5">1.4. Template for HDF5 has/read/write the numerical attribute</a></li>
<li><a href="#orgd788deb">1.5. Template for HDF5 has/read/write the dataset of numerical data</a></li>
<li><a href="#orgb6c9ea7">1.6. Template for HDF5 has/read/write the dataset of strings</a></li>
<li><a href="#orgc4a08a6">1.7. Template for HDF5 has/read/write the string attribute</a></li>
<li><a href="#orgbc8f268">1.1. Template for HDF5 definitions</a></li>
<li><a href="#org6e68734">1.2. Template for HDF5 structures</a></li>
<li><a href="#org449b588">1.3. Template for HDF5 init/deinit</a></li>
<li><a href="#org4a662cb">1.4. Template for HDF5 has/read/write the numerical attribute</a></li>
<li><a href="#org242a22a">1.5. Template for HDF5 has/read/write the dataset of numerical data</a></li>
<li><a href="#orga80558f">1.6. Template for HDF5 has/read/write the dataset of strings</a></li>
<li><a href="#org7cbdd21">1.7. Template for HDF5 has/read/write the string attribute</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div id="outline-container-orgdc801b1" class="outline-2">
<h2 id="orgdc801b1"><span class="section-number-2">1</span> HDF5 back end</h2>
<div id="outline-container-org10bdbe2" class="outline-2">
<h2 id="org10bdbe2"><span class="section-number-2">1</span> HDF5 back end</h2>
<div class="outline-text-2" id="text-1">
</div>
<div id="outline-container-orgdd0aad8" class="outline-3">
<h3 id="orgdd0aad8"><span class="section-number-3">1.1</span> Template for HDF5 definitions</h3>
<div id="outline-container-orgbc8f268" class="outline-3">
<h3 id="orgbc8f268"><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>
@ -343,8 +343,8 @@ for the JavaScript code in this tag.
</div>
</div>
<div id="outline-container-org83cf976" class="outline-3">
<h3 id="org83cf976"><span class="section-number-3">1.2</span> Template for HDF5 structures</h3>
<div id="outline-container-org6e68734" class="outline-3">
<h3 id="org6e68734"><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> {
@ -358,8 +358,8 @@ for the JavaScript code in this tag.
</div>
<div id="outline-container-orgbe0f403" class="outline-3">
<h3 id="orgbe0f403"><span class="section-number-3">1.3</span> Template for HDF5 init/deinit</h3>
<div id="outline-container-org449b588" class="outline-3">
<h3 id="org449b588"><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>
@ -439,8 +439,8 @@ for the JavaScript code in this tag.
</div>
</div>
<div id="outline-container-org14d20f5" class="outline-3">
<h3 id="org14d20f5"><span class="section-number-3">1.4</span> Template for HDF5 has/read/write the numerical attribute</h3>
<div id="outline-container-org4a662cb" class="outline-3">
<h3 id="org4a662cb"><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>
@ -534,8 +534,8 @@ for the JavaScript code in this tag.
</div>
</div>
<div id="outline-container-orgd788deb" class="outline-3">
<h3 id="orgd788deb"><span class="section-number-3">1.5</span> Template for HDF5 has/read/write the dataset of numerical data</h3>
<div id="outline-container-org242a22a" class="outline-3">
<h3 id="org242a22a"><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>
@ -658,8 +658,8 @@ for the JavaScript code in this tag.
</div>
</div>
<div id="outline-container-orgb6c9ea7" class="outline-3">
<h3 id="orgb6c9ea7"><span class="section-number-3">1.6</span> Template for HDF5 has/read/write the dataset of strings</h3>
<div id="outline-container-orga80558f" class="outline-3">
<h3 id="orga80558f"><span class="section-number-3">1.6</span> Template for HDF5 has/read/write the dataset of strings</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>
@ -864,8 +864,8 @@ for the JavaScript code in this tag.
</div>
</div>
<div id="outline-container-orgc4a08a6" class="outline-3">
<h3 id="orgc4a08a6"><span class="section-number-3">1.7</span> Template for HDF5 has/read/write the string attribute</h3>
<div id="outline-container-org7cbdd21" class="outline-3">
<h3 id="org7cbdd21"><span class="section-number-3">1.7</span> Template for HDF5 has/read/write the string attribute</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>
@ -992,7 +992,7 @@ for the JavaScript code in this tag.
</div>
<div id="postamble" class="status">
<p class="author">Author: TREX-CoE</p>
<p class="date">Created: 2021-10-14 Thu 08:59</p>
<p class="date">Created: 2021-10-21 Thu 17:40</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2021-10-14 Thu 08:59 -->
<!-- 2021-10-21 Thu 17:40 -->
<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,26 +311,26 @@ for the JavaScript code in this tag.
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#org15aa22c">1. TEXT back end</a>
<li><a href="#org644b272">1. TEXT back end</a>
<ul>
<li><a href="#orgf55fa49">1.1. Template for group-related structures in text back end</a></li>
<li><a href="#orgc386da1">1.2. Template for general structure in text back end</a></li>
<li><a href="#orgf888541">1.3. Initialize function (constant part)</a></li>
<li><a href="#org67f2b22">1.4. Deinitialize function (templated part)</a></li>
<li><a href="#org1f9c2d8">1.5. Template for text read struct</a></li>
<li><a href="#orga9fdff5">1.6. Template for text flush struct</a></li>
<li><a href="#org27e9c7f">1.7. Template for text free memory</a></li>
<li><a href="#org823f230">1.8. Template for has/read/write the numerical attribute</a></li>
<li><a href="#org945e01d">1.9. Template for has/read/write the dataset of numerical data</a></li>
<li><a href="#orgcf22c04">1.10. Template for has/read/write the dataset of strings</a></li>
<li><a href="#org9360f43">1.11. Template for has/read/write the string attribute</a></li>
<li><a href="#org56d4003">1.12. RDM struct (hard-coded)</a>
<li><a href="#org4480e26">1.1. Template for group-related structures in text back end</a></li>
<li><a href="#org4c18fc2">1.2. Template for general structure in text back end</a></li>
<li><a href="#orgba90629">1.3. Initialize function (constant part)</a></li>
<li><a href="#orgd2248b4">1.4. Deinitialize function (templated part)</a></li>
<li><a href="#org4b126ef">1.5. Template for text read struct</a></li>
<li><a href="#org90b5206">1.6. Template for text flush struct</a></li>
<li><a href="#orga2790d0">1.7. Template for text free memory</a></li>
<li><a href="#org3b736be">1.8. Template for has/read/write the numerical attribute</a></li>
<li><a href="#org8d3f4da">1.9. Template for has/read/write the dataset of numerical data</a></li>
<li><a href="#org10809a5">1.10. Template for has/read/write the dataset of strings</a></li>
<li><a href="#org591c42a">1.11. Template for has/read/write the string attribute</a></li>
<li><a href="#org7229cde">1.12. RDM struct (hard-coded)</a>
<ul>
<li><a href="#orge18ef1e">1.12.1. Read the complete struct</a></li>
<li><a href="#org93ff785">1.12.2. Flush the complete struct</a></li>
<li><a href="#orge1f7f43">1.12.3. Free memory</a></li>
<li><a href="#org61dfc13">1.12.4. Read/Write the one<sub>e</sub> attribute</a></li>
<li><a href="#org29e00f6">1.12.5. Read/Write the two<sub>e</sub> attribute</a></li>
<li><a href="#orge6de449">1.12.1. Read the complete struct</a></li>
<li><a href="#orgc7c9c71">1.12.2. Flush the complete struct</a></li>
<li><a href="#orgf38e360">1.12.3. Free memory</a></li>
<li><a href="#org94831f3">1.12.4. Read/Write the one<sub>e</sub> attribute</a></li>
<li><a href="#org3260e27">1.12.5. Read/Write the two<sub>e</sub> attribute</a></li>
</ul>
</li>
</ul>
@ -339,8 +339,8 @@ for the JavaScript code in this tag.
</div>
</div>
<div id="outline-container-org15aa22c" class="outline-2">
<h2 id="org15aa22c"><span class="section-number-2">1</span> TEXT back end</h2>
<div id="outline-container-org644b272" class="outline-2">
<h2 id="org644b272"><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
@ -361,8 +361,8 @@ The file is written when closed, or when the flush function is called.
</p>
</div>
<div id="outline-container-orgf55fa49" class="outline-3">
<h3 id="orgf55fa49"><span class="section-number-3">1.1</span> Template for group-related structures in text back end</h3>
<div id="outline-container-org4480e26" class="outline-3">
<h3 id="org4480e26"><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 {
@ -381,8 +381,8 @@ The file is written when closed, or when the flush function is called.
</div>
</div>
<div id="outline-container-orgc386da1" class="outline-3">
<h3 id="orgc386da1"><span class="section-number-3">1.2</span> Template for general structure in text back end</h3>
<div id="outline-container-org4c18fc2" class="outline-3">
<h3 id="org4c18fc2"><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;">rdm_s</span> {
@ -408,8 +408,8 @@ The file is written when closed, or when the flush function is called.
</div>
</div>
<div id="outline-container-orgf888541" class="outline-3">
<h3 id="orgf888541"><span class="section-number-3">1.3</span> Initialize function (constant part)</h3>
<div id="outline-container-orgba90629" class="outline-3">
<h3 id="orgba90629"><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>
@ -540,8 +540,8 @@ The file is written when closed, or when the flush function is called.
</div>
</div>
<div id="outline-container-org67f2b22" class="outline-3">
<h3 id="org67f2b22"><span class="section-number-3">1.4</span> Deinitialize function (templated part)</h3>
<div id="outline-container-orgd2248b4" class="outline-3">
<h3 id="orgd2248b4"><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>
@ -566,8 +566,8 @@ The file is written when closed, or when the flush function is called.
</div>
</div>
<div id="outline-container-org1f9c2d8" class="outline-3">
<h3 id="org1f9c2d8"><span class="section-number-3">1.5</span> Template for text read struct</h3>
<div id="outline-container-org4b126ef" class="outline-3">
<h3 id="org4b126ef"><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*
@ -861,8 +861,8 @@ trexio_text_read_$group$ (<span style="color: #228b22;">trexio_text_t</span>* <s
</div>
</div>
<div id="outline-container-orga9fdff5" class="outline-3">
<h3 id="orga9fdff5"><span class="section-number-3">1.6</span> Template for text flush struct</h3>
<div id="outline-container-org90b5206" class="outline-3">
<h3 id="org90b5206"><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>
@ -927,8 +927,8 @@ trexio_text_read_$group$ (<span style="color: #228b22;">trexio_text_t</span>* <s
</div>
</div>
<div id="outline-container-org27e9c7f" class="outline-3">
<h3 id="org27e9c7f"><span class="section-number-3">1.7</span> Template for text free memory</h3>
<div id="outline-container-orga2790d0" class="outline-3">
<h3 id="orga2790d0"><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.
@ -973,8 +973,8 @@ Memory is allocated when reading. The following function frees memory.
</div>
</div>
<div id="outline-container-org823f230" class="outline-3">
<h3 id="org823f230"><span class="section-number-3">1.8</span> Template for has/read/write the numerical attribute</h3>
<div id="outline-container-org3b736be" class="outline-3">
<h3 id="org3b736be"><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>
@ -1037,8 +1037,8 @@ Memory is allocated when reading. The following function frees memory.
</div>
</div>
<div id="outline-container-org945e01d" class="outline-3">
<h3 id="org945e01d"><span class="section-number-3">1.9</span> Template for has/read/write the dataset of numerical data</h3>
<div id="outline-container-org8d3f4da" class="outline-3">
<h3 id="org8d3f4da"><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.
@ -1134,8 +1134,8 @@ The <code>group_dset</code> array is assumed allocated with the appropriate size
</div>
</div>
</div>
<div id="outline-container-orgcf22c04" class="outline-3">
<h3 id="orgcf22c04"><span class="section-number-3">1.10</span> Template for has/read/write the dataset of strings</h3>
<div id="outline-container-org10809a5" class="outline-3">
<h3 id="org10809a5"><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.
@ -1236,8 +1236,8 @@ The <code>group_dset</code> array is assumed allocated with the appropriate size
</div>
</div>
</div>
<div id="outline-container-org9360f43" class="outline-3">
<h3 id="org9360f43"><span class="section-number-3">1.11</span> Template for has/read/write the string attribute</h3>
<div id="outline-container-org591c42a" class="outline-3">
<h3 id="org591c42a"><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>
@ -1311,12 +1311,12 @@ The <code>group_dset</code> array is assumed allocated with the appropriate size
</div>
</div>
</div>
<div id="outline-container-org56d4003" class="outline-3">
<h3 id="org56d4003"><span class="section-number-3">1.12</span> RDM struct (hard-coded)</h3>
<div id="outline-container-org7229cde" class="outline-3">
<h3 id="org7229cde"><span class="section-number-3">1.12</span> RDM struct (hard-coded)</h3>
<div class="outline-text-3" id="text-1-12">
</div>
<div id="outline-container-orge18ef1e" class="outline-4">
<h4 id="orge18ef1e"><span class="section-number-4">1.12.1</span> Read the complete struct</h4>
<div id="outline-container-orge6de449" class="outline-4">
<h4 id="orge6de449"><span class="section-number-4">1.12.1</span> Read the complete struct</h4>
<div class="outline-text-4" id="text-1-12-1">
<div class="org-src-container">
<pre class="src src-c"><span style="color: #228b22;">rdm_t</span>* <span style="color: #0000ff;">trexio_text_read_rdm</span>(<span style="color: #228b22;">trexio_text_t</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">file</span>);
@ -1411,8 +1411,8 @@ The <code>group_dset</code> array is assumed allocated with the appropriate size
</div>
</div>
<div id="outline-container-org93ff785" class="outline-4">
<h4 id="org93ff785"><span class="section-number-4">1.12.2</span> Flush the complete struct</h4>
<div id="outline-container-orgc7c9c71" class="outline-4">
<h4 id="orgc7c9c71"><span class="section-number-4">1.12.2</span> Flush the complete struct</h4>
<div class="outline-text-4" id="text-1-12-2">
<div class="org-src-container">
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span> <span style="color: #0000ff;">trexio_text_flush_rdm</span>(<span style="color: #228b22;">trexio_text_t</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">file</span>);
@ -1454,8 +1454,8 @@ The <code>group_dset</code> array is assumed allocated with the appropriate size
</div>
</div>
<div id="outline-container-orge1f7f43" class="outline-4">
<h4 id="orge1f7f43"><span class="section-number-4">1.12.3</span> Free memory</h4>
<div id="outline-container-orgf38e360" class="outline-4">
<h4 id="orgf38e360"><span class="section-number-4">1.12.3</span> Free memory</h4>
<div class="outline-text-4" id="text-1-12-3">
<p>
Memory is allocated when reading. The followig function frees memory.
@ -1491,8 +1491,8 @@ Memory is allocated when reading. The followig function frees memory.
</div>
</div>
<div id="outline-container-org61dfc13" class="outline-4">
<h4 id="org61dfc13"><span class="section-number-4">1.12.4</span> Read/Write the one<sub>e</sub> attribute</h4>
<div id="outline-container-org94831f3" class="outline-4">
<h4 id="org94831f3"><span class="section-number-4">1.12.4</span> Read/Write the one<sub>e</sub> attribute</h4>
<div class="outline-text-4" id="text-1-12-4">
<p>
The <code>one_e</code> array is assumed allocated with the appropriate size.
@ -1558,8 +1558,8 @@ The <code>one_e</code> array is assumed allocated with the appropriate size.
</div>
</div>
<div id="outline-container-org29e00f6" class="outline-4">
<h4 id="org29e00f6"><span class="section-number-4">1.12.5</span> Read/Write the two<sub>e</sub> attribute</h4>
<div id="outline-container-org3260e27" class="outline-4">
<h4 id="org3260e27"><span class="section-number-4">1.12.5</span> Read/Write the two<sub>e</sub> attribute</h4>
<div class="outline-text-4" id="text-1-12-5">
<p>
<code>two_e</code> is a sparse data structure, which can be too large to fit
@ -1667,7 +1667,7 @@ file for each sparse float structure.
</div>
<div id="postamble" class="status">
<p class="author">Author: TREX-CoE</p>
<p class="date">Created: 2021-10-14 Thu 08:59</p>
<p class="date">Created: 2021-10-21 Thu 17:40</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>

206
trex.html
View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2021-10-14 Thu 08:59 -->
<!-- 2021-10-21 Thu 17:40 -->
<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,25 +333,29 @@ for the JavaScript code in this tag.
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#org87e1e90">1. Metadata (metadata group)</a></li>
<li><a href="#org8909baf">2. Electron (electron group)</a></li>
<li><a href="#org259bad9">3. Nucleus (nucleus group)</a></li>
<li><a href="#orgdc5af33">4. Effective core potentials (ecp group)</a></li>
<li><a href="#org325c383">5. Basis set (basis group)</a></li>
<li><a href="#org8bab3a9">6. Atomic orbitals (ao group)</a>
<li><a href="#orgc6633ea">1. Metadata (metadata group)</a></li>
<li><a href="#orgc51179d">2. Electron (electron group)</a></li>
<li><a href="#org5561496">3. Nucleus (nucleus group)</a></li>
<li><a href="#org5540aca">4. Effective core potentials (ecp group)</a></li>
<li><a href="#orga9dc80c">5. Basis set (basis group)</a>
<ul>
<li><a href="#org12ce9eb">5.1. Example</a></li>
</ul>
</li>
<li><a href="#orge82a7c8">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="#orgea0a07c">7. Molecular orbitals (mo group)</a>
<li><a href="#orgace508e">7. Molecular orbitals (mo group)</a>
<ul>
<li><a href="#org365ab95">7.1. One-electron integrals (<code>mo_1e_int</code> group)</a></li>
<li><a href="#org2fbb570">7.2. Two-electron integrals (<code>mo_2e_int</code> group)</a></li>
<li><a href="#org90934e3">7.1. One-electron integrals (<code>mo_1e_int</code> group)</a></li>
<li><a href="#orge5f1e79">7.2. Two-electron integrals (<code>mo_2e_int</code> group)</a></li>
</ul>
</li>
<li><a href="#org39d6dd5">8. <span class="todo TODO">TODO</span> Slater determinants</a></li>
<li><a href="#org2e054ea">9. <span class="todo TODO">TODO</span> Reduced density matrices (rdm group)</a></li>
<li><a href="#orge476000">8. <span class="todo TODO">TODO</span> Slater determinants</a></li>
<li><a href="#orgc72b4fb">9. <span class="todo TODO">TODO</span> Reduced density matrices (rdm group)</a></li>
</ul>
</div>
</div>
@ -391,8 +395,8 @@ arrays are 0-based. Hence, we introduce the <code>index</code> type which is an
1-based <code>int</code> in the Fortran interface and 0-based otherwise.
</p>
<div id="outline-container-org87e1e90" class="outline-2">
<h2 id="org87e1e90"><span class="section-number-2">1</span> Metadata (metadata group)</h2>
<div id="outline-container-orgc6633ea" class="outline-2">
<h2 id="orgc6633ea"><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
@ -402,7 +406,7 @@ which have participated to the creation of the file, a list of
authors of the file, and a textual description.
</p>
<table id="orgcac067a" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="org9e4f3bc" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -469,15 +473,15 @@ authors of the file, and a textual description.
</div>
</div>
<div id="outline-container-org8909baf" class="outline-2">
<h2 id="org8909baf"><span class="section-number-2">2</span> Electron (electron group)</h2>
<div id="outline-container-orgc51179d" class="outline-2">
<h2 id="orgc51179d"><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 &uarr; and &darr; electrons is fixed.
</p>
<table id="orga8e5af7" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="org4ffadac" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -516,15 +520,15 @@ the number of &uarr; and &darr; electrons is fixed.
</div>
</div>
<div id="outline-container-org259bad9" class="outline-2">
<h2 id="org259bad9"><span class="section-number-2">3</span> Nucleus (nucleus group)</h2>
<div id="outline-container-org5561496" class="outline-2">
<h2 id="org5561496"><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="orgaa9f20f" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="org7a3a692" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -584,8 +588,8 @@ given in Cartesian \((x,y,z)\) format.
</div>
</div>
<div id="outline-container-orgdc5af33" class="outline-2">
<h2 id="orgdc5af33"><span class="section-number-2">4</span> Effective core potentials (ecp group)</h2>
<div id="outline-container-org5540aca" class="outline-2">
<h2 id="org5540aca"><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
@ -613,7 +617,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> for more info.
</p>
<table id="org4fd99d1" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="org9d6b99f" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -722,8 +726,8 @@ See <a href="http://dx.doi.org/10.1063/1.4984046">http://dx.doi.org/10.1063/1.49
</div>
</div>
<div id="outline-container-org325c383" class="outline-2">
<h2 id="org325c383"><span class="section-number-2">5</span> Basis set (basis group)</h2>
<div id="outline-container-orga9dc80c" class="outline-2">
<h2 id="orga9dc80c"><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
@ -776,7 +780,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="org9d2f5fd" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="org4d3192b" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -804,13 +808,6 @@ All the basis set parameters are stored in one-dimensional arrays:
<td class="org-left">Type of basis set: "Gaussian" or "Slater"</td>
</tr>
<tr>
<td class="org-left"><code>num</code></td>
<td class="org-left"><code>dim</code></td>
<td class="org-left">&#xa0;</td>
<td class="org-left">Total Number of shells</td>
</tr>
<tr>
<td class="org-left"><code>prim_num</code></td>
<td class="org-left"><code>dim</code></td>
@ -818,46 +815,39 @@ All the basis set parameters are stored in one-dimensional arrays:
<td class="org-left">Total number of primitives</td>
</tr>
<tr>
<td class="org-left"><code>shell_num</code></td>
<td class="org-left"><code>dim</code></td>
<td class="org-left">&#xa0;</td>
<td class="org-left">Total number of shells</td>
</tr>
<tr>
<td class="org-left"><code>nucleus_index</code></td>
<td class="org-left"><code>index</code></td>
<td class="org-left"><code>(nucleus.num)</code></td>
<td class="org-left">Index of the first shell of each nucleus (\(A\))</td>
<td class="org-left"><code>(basis.shell_num)</code></td>
<td class="org-left">One-to-one correspondence between shells and atomic indices</td>
</tr>
<tr>
<td class="org-left"><code>nucleus_shell_num</code></td>
<td class="org-left"><code>ang_mom</code></td>
<td class="org-left"><code>int</code></td>
<td class="org-left"><code>(nucleus.num)</code></td>
<td class="org-left">Number of shells for each nucleus</td>
</tr>
<tr>
<td class="org-left"><code>shell_ang_mom</code></td>
<td class="org-left"><code>int</code></td>
<td class="org-left"><code>(basis.num)</code></td>
<td class="org-left">Angular momentum <code>0:S, 1:P, 2:D, ...</code></td>
</tr>
<tr>
<td class="org-left"><code>shell_prim_num</code></td>
<td class="org-left"><code>int</code></td>
<td class="org-left"><code>(basis.num)</code></td>
<td class="org-left">Number of primitives in the shell (\(N_{\text{prim}}\))</td>
<td class="org-left"><code>(basis.shell_num)</code></td>
<td class="org-left">One-to-one correspondence between shells and angular momenta</td>
</tr>
<tr>
<td class="org-left"><code>shell_factor</code></td>
<td class="org-left"><code>float</code></td>
<td class="org-left"><code>(basis.num)</code></td>
<td class="org-left">Normalization factor of the shell (\(\mathcal{N}_s\))</td>
<td class="org-left"><code>(basis.shell_num)</code></td>
<td class="org-left">Normalization factor of each shell (\(\mathcal{N}_s\))</td>
</tr>
<tr>
<td class="org-left"><code>shell_prim_index</code></td>
<td class="org-left"><code>shell_index</code></td>
<td class="org-left"><code>index</code></td>
<td class="org-left"><code>(basis.num)</code></td>
<td class="org-left">Index of the first primitive in the complete list</td>
<td class="org-left"><code>(basis.prim_num)</code></td>
<td class="org-left">One-to-one correspondence between primitives and shell index</td>
</tr>
<tr>
@ -882,7 +872,11 @@ All the basis set parameters are stored in one-dimensional arrays:
</tr>
</tbody>
</table>
</div>
<div id="outline-container-org12ce9eb" class="outline-3">
<h3 id="org12ce9eb"><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
format), where both the AOs and primitives are considered normalized:
@ -905,33 +899,46 @@ P 1
P 1
1 3.880000E-01 1.000000E+00
D 1
1 1.057000E+00 1.0000000
1 1.057000E+00 1.000000E+00
</pre>
<p>
we have:
In TREXIO representaion we have:
</p>
<pre class="example">
type = "Gaussian"
num = 12
prim_num = 20
type = "Gaussian"
prim_num = 20
shell_num = 12
nucleus_index = [0 , 6]
shell_ang_mom = [0 , 0 , 0 , 1 , 1 , 2 , 0 , 0 , 0 , 1 , 1 , 2 ]
shell_prim_num = [5 , 1 , 1 , 1 , 1 , 1 , 5 , 1 , 1 , 1 , 1 , 1 ]
shell_prim_index = [0 , 5 , 6 , 7 , 8 , 9 , 10, 15, 16, 17, 18, 19]
shell_factor = [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]
# 6 shells per H atom
nucleus_index =
[ 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 1 ]
# 3 shells in S (l=0), 2 in P (l=1), 1 in D (l=2)
ang_mom =
[ 0, 0, 0, 1, 1, 2,
0, 0, 0, 1, 1, 2 ]
# no need to renormalize shells
shell_factor =
[ 1., 1., 1., 1., 1., 1.,
1., 1., 1., 1., 1., 1. ]
# 5 primitives for the first S shell and then 1 primitive per remaining shells in each H atom
shell_index =
[ 0, 0, 0, 0, 0, 1, 2, 3, 4, 5,
6, 6, 6, 6, 6, 7, 8, 9, 10, 11 ]
# parameters of the primitives (10 per H atom)
exponent =
[ 33.87, 5.095, 1.159, 0.3258, 0.1027, 0.3258, 0.1027, 1.407,
0.388, 1.057, 33.87, 5.095, 1.159, 0.3258, 0.1027, 0.3258, 0.1027, 1.407,
0.388, 1.057]
[ 33.87, 5.095, 1.159, 0.3258, 0.1027, 0.3258, 0.1027, 1.407, 0.388, 1.057,
33.87, 5.095, 1.159, 0.3258, 0.1027, 0.3258, 0.1027, 1.407, 0.388, 1.057 ]
coefficient =
[ 0.006068, 0.045308, 0.202822, 0.503903, 0.383421, 1.0, 1.0,
1.0, 1.0, 1.0, 0.006068, 0.045308, 0.202822, 0.503903, 0.383421, 1.0, 1.0,
1.0, 1.0, 1.0]
[ 0.006068, 0.045308, 0.202822, 0.503903, 0.383421, 1.0, 1.0, 1.0, 1.0, 1.0,
0.006068, 0.045308, 0.202822, 0.503903, 0.383421, 1.0, 1.0, 1.0, 1.0, 1.0 ]
prim_factor =
[ 1.0006253235944540e+01, 2.4169531573445120e+00, 7.9610924849766440e-01
@ -944,9 +951,10 @@ prim_factor =
</pre>
</div>
</div>
</div>
<div id="outline-container-org8bab3a9" class="outline-2">
<h2 id="org8bab3a9"><span class="section-number-2">6</span> Atomic orbitals (ao group)</h2>
<div id="outline-container-orge82a7c8" class="outline-2">
<h2 id="orge82a7c8"><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
@ -994,13 +1002,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="#org325c383">Basis set</a> section) to \(\mathcal{N}_{z^2}\), which is the
the <a href="#orga9dc80c">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="org1213b9f" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="org0eff5fb" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -1052,8 +1060,8 @@ introduced here should be \(\frac{\mathcal{N}_{xy}}{\mathcal{N}_{z^2}}\).
</table>
</div>
<div id="outline-container-org42118bb" class="outline-3">
<h3 id="ao_one_e"><a id="org42118bb"></a><span class="section-number-3">6.1</span> One-electron integrals (<code>ao_1e_int</code> group)</h3>
<div id="outline-container-org6e9c283" class="outline-3">
<h3 id="ao_one_e"><a id="org6e9c283"></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}}
@ -1071,7 +1079,7 @@ The one-electron integrals for a one-electron operator \(\hat{O}\) are
over atomic orbitals.
</p>
<table id="org9efb586" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="orgfeaec7c" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -1138,8 +1146,8 @@ over atomic orbitals.
</div>
</div>
<div id="outline-container-orgfb1f17e" class="outline-3">
<h3 id="ao_two_e"><a id="orgfb1f17e"></a><span class="section-number-3">6.2</span> Two-electron integrals (<code>ao_2e_int</code> group)</h3>
<div id="outline-container-orge8703c0" class="outline-3">
<h3 id="ao_two_e"><a id="orge8703c0"></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
@ -1160,7 +1168,7 @@ notation.
\mathbf{r}_j \vert)}{\vert \mathbf{r}_i - \mathbf{r}_j \vert} \] : electron-electron long range potential</li>
</ul>
<table id="org7f0d6e9" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="org256f8e2" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -1200,10 +1208,10 @@ notation.
</div>
</div>
<div id="outline-container-orgea0a07c" class="outline-2">
<h2 id="orgea0a07c"><span class="section-number-2">7</span> Molecular orbitals (mo group)</h2>
<div id="outline-container-orgace508e" class="outline-2">
<h2 id="orgace508e"><span class="section-number-2">7</span> Molecular orbitals (mo group)</h2>
<div class="outline-text-2" id="text-7">
<table id="org7ef68b2" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="org7385739" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -1269,8 +1277,8 @@ notation.
</table>
</div>
<div id="outline-container-org365ab95" class="outline-3">
<h3 id="org365ab95"><span class="section-number-3">7.1</span> One-electron integrals (<code>mo_1e_int</code> group)</h3>
<div id="outline-container-org90934e3" class="outline-3">
<h3 id="org90934e3"><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
@ -1278,7 +1286,7 @@ The operators as the same as those defined in the
the basis of molecular orbitals.
</p>
<table id="org1e0bc28" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="orgc4d217d" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -1345,8 +1353,8 @@ the basis of molecular orbitals.
</div>
</div>
<div id="outline-container-org2fbb570" class="outline-3">
<h3 id="org2fbb570"><span class="section-number-3">7.2</span> Two-electron integrals (<code>mo_2e_int</code> group)</h3>
<div id="outline-container-orge5f1e79" class="outline-3">
<h3 id="orge5f1e79"><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
@ -1354,7 +1362,7 @@ The operators as the same as those defined in the
the basis of molecular orbitals.
</p>
<table id="org676b402" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="org34aaf75" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -1394,13 +1402,13 @@ the basis of molecular orbitals.
</div>
</div>
<div id="outline-container-org39d6dd5" class="outline-2">
<h2 id="org39d6dd5"><span class="section-number-2">8</span> <span class="todo TODO">TODO</span> Slater determinants</h2>
<div id="outline-container-orge476000" class="outline-2">
<h2 id="orge476000"><span class="section-number-2">8</span> <span class="todo TODO">TODO</span> Slater determinants</h2>
</div>
<div id="outline-container-org2e054ea" class="outline-2">
<h2 id="org2e054ea"><span class="section-number-2">9</span> <span class="todo TODO">TODO</span> Reduced density matrices (rdm group)</h2>
<div id="outline-container-orgc72b4fb" class="outline-2">
<h2 id="orgc72b4fb"><span class="section-number-2">9</span> <span class="todo TODO">TODO</span> Reduced density matrices (rdm group)</h2>
<div class="outline-text-2" id="text-9">
<table id="org59adfa0" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="org3e25596" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -1455,7 +1463,7 @@ the basis of molecular orbitals.
</div>
<div id="postamble" class="status">
<p class="author">Author: TREX-CoE</p>
<p class="date">Created: 2021-10-14 Thu 08:59</p>
<p class="date">Created: 2021-10-21 Thu 17:40</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>