1
0
mirror of https://github.com/TREX-CoE/trexio.git synced 2024-12-25 05:43:53 +01:00

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

This commit is contained in:
q-posev 2021-11-18 13:35:31 +00:00
parent e676e364cf
commit eaf61a68f0
7 changed files with 345 additions and 345 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-11-18 Thu 13:13 -->
<!-- 2021-11-18 Thu 13:35 -->
<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-11-18 Thu 13:13</p>
<p class="date">Created: 2021-11-18 Thu 13:35</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-11-18 Thu 13:13 -->
<!-- 2021-11-18 Thu 13:35 -->
<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="#org20388ff">1. Text back end</a></li>
<li><a href="#org8d3c066">2. HDF5 Back end</a></li>
<li><a href="#org7485b1c">1. Text back end</a></li>
<li><a href="#org6deefd8">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-org20388ff" class="outline-2">
<h2 id="org20388ff"><span class="section-number-2">1</span> Text back end</h2>
<div id="outline-container-org7485b1c" class="outline-2">
<h2 id="org7485b1c"><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-org8d3c066" class="outline-2">
<h2 id="org8d3c066"><span class="section-number-2">2</span> HDF5 Back end</h2>
<div id="outline-container-org6deefd8" class="outline-2">
<h2 id="org6deefd8"><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-11-18 Thu 13:13</p>
<p class="date">Created: 2021-11-18 Thu 13:35</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-11-18 Thu 13:13 -->
<!-- 2021-11-18 Thu 13:35 -->
<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-11-18 Thu 13:13</p>
<p class="date">Created: 2021-11-18 Thu 13:35</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-11-18 Thu 13:13 -->
<!-- 2021-11-18 Thu 13:35 -->
<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="#orge5db52c">1. Coding conventions</a>
<li><a href="#org95ef7e4">1. Coding conventions</a>
<ul>
<li><a href="#orgefd3d95">1.1. Memory allocation</a></li>
<li><a href="#org0f7366f">1.1. Memory allocation</a></li>
</ul>
</li>
<li><a href="#orgc1773c2">2. Front end</a>
<li><a href="#org3a8ff76">2. Front end</a>
<ul>
<li><a href="#orgcace681">2.1. Error handling</a>
<li><a href="#org1c5d76f">2.1. Error handling</a>
<ul>
<li><a href="#orgb4c95bd">2.1.1. Decoding errors</a>
<li><a href="#org17b757c">2.1.1. Decoding errors</a>
<ul>
<li><a href="#org7ceb194">2.1.1.1. C source code</a></li>
<li><a href="#org0dd363d">2.1.1.2. Fortran interface</a></li>
<li><a href="#org7ffd1cb">2.1.1.3. Python interface</a></li>
<li><a href="#org6edcfb5">2.1.1.1. C source code</a></li>
<li><a href="#orgfff80d8">2.1.1.2. Fortran interface</a></li>
<li><a href="#orgcf64689">2.1.1.3. Python interface</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#org2dc3f4f">2.2. Back ends</a>
<li><a href="#org8496948">2.2. Back ends</a>
<ul>
<li><a href="#orgf6a9925">2.2.1. C</a></li>
<li><a href="#org92afddb">2.2.2. Fortran</a></li>
<li><a href="#orgad413f1">2.2.3. Python</a></li>
<li><a href="#org9dd90fb">2.2.1. C</a></li>
<li><a href="#org850cbaf">2.2.2. Fortran</a></li>
<li><a href="#orgc3efc40">2.2.3. Python</a></li>
</ul>
</li>
<li><a href="#orgb0d4157">2.3. Read/write behavior</a></li>
<li><a href="#org28be95e">2.4. TREXIO file type</a>
<li><a href="#org38e2030">2.3. Read/write behavior</a></li>
<li><a href="#orgc0c152d">2.4. TREXIO file type</a>
<ul>
<li><a href="#org310fc5f">2.4.1. TREXIO<sub>File</sub> Python class</a></li>
<li><a href="#orge61ef47">2.4.1. TREXIO<sub>File</sub> Python class</a></li>
</ul>
</li>
<li><a href="#org77abb54">2.5. Polymorphism of the file handle</a></li>
<li><a href="#org7ea585f">2.6. File opening</a>
<li><a href="#orgc1ed07b">2.5. Polymorphism of the file handle</a></li>
<li><a href="#orgd948212">2.6. File opening</a>
<ul>
<li><a href="#org289dacc">2.6.1. C</a></li>
<li><a href="#org6796379">2.6.2. Fortran</a></li>
<li><a href="#orgac87272">2.6.3. Python</a></li>
<li><a href="#orgf083add">2.6.4. Zero-based versus one-based arrays of indices</a></li>
<li><a href="#org3f7d397">2.6.1. C</a></li>
<li><a href="#org09252d5">2.6.2. Fortran</a></li>
<li><a href="#org31dd44d">2.6.3. Python</a></li>
<li><a href="#org59be5ec">2.6.4. Zero-based versus one-based arrays of indices</a></li>
</ul>
</li>
<li><a href="#org0dbff75">2.7. File closing</a>
<li><a href="#org91bf330">2.7. File closing</a>
<ul>
<li><a href="#org047e8c4">2.7.1. C</a></li>
<li><a href="#orge0c986e">2.7.2. Fortran</a></li>
<li><a href="#org8383e54">2.7.3. Python</a></li>
<li><a href="#orgc92dfd1">2.7.1. C</a></li>
<li><a href="#orgdfd57c6">2.7.2. Fortran</a></li>
<li><a href="#orge5adb60">2.7.3. Python</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#org1e59d01">3. Templates for front end</a>
<li><a href="#org6984aec">3. Templates for front end</a>
<ul>
<li><a href="#org70fba7f">3.1. Description</a></li>
<li><a href="#org5cbf3c1">3.2. Templates for front end has/read/write a single numerical attribute</a>
<li><a href="#orge8075eb">3.1. Description</a></li>
<li><a href="#org59399a5">3.2. Templates for front end has/read/write a single numerical attribute</a>
<ul>
<li><a href="#orge68eebb">3.2.1. Introduction</a></li>
<li><a href="#org83fa54f">3.2.2. C templates for front end</a>
<li><a href="#org5cac91b">3.2.1. Introduction</a></li>
<li><a href="#orgb8ee39d">3.2.2. C templates for front end</a>
<ul>
<li><a href="#orgec79a89">3.2.2.1. Function declarations</a></li>
<li><a href="#org14ce5d2">3.2.2.2. Source code for double precision functions</a></li>
<li><a href="#org2438225">3.2.2.3. Source code for single precision functions</a></li>
<li><a href="#org88d7be7">3.2.2.4. Source code for default functions</a></li>
<li><a href="#org26bc1a3">3.2.2.1. Function declarations</a></li>
<li><a href="#orga4db47e">3.2.2.2. Source code for double precision functions</a></li>
<li><a href="#orgbd23d89">3.2.2.3. Source code for single precision functions</a></li>
<li><a href="#orgafe0585">3.2.2.4. Source code for default functions</a></li>
</ul>
</li>
<li><a href="#orgfc05727">3.2.3. Fortran templates for front end</a></li>
<li><a href="#org25098c5">3.2.4. Python templates for front end</a></li>
<li><a href="#orgc9f9e14">3.2.3. Fortran templates for front end</a></li>
<li><a href="#orgb927b84">3.2.4. Python templates for front end</a></li>
</ul>
</li>
<li><a href="#org53d4dfa">3.3. Templates for front end has/read/write a dataset of numerical data</a>
<li><a href="#orga16049e">3.3. Templates for front end has/read/write a dataset of numerical data</a>
<ul>
<li><a href="#org5cff3a6">3.3.1. Introduction</a></li>
<li><a href="#org54238c8">3.3.2. C templates for front end</a>
<li><a href="#orge8f8a31">3.3.1. Introduction</a></li>
<li><a href="#orgb83ec54">3.3.2. C templates for front end</a>
<ul>
<li><a href="#org14af7c1">3.3.2.1. Function declarations</a></li>
<li><a href="#org1e92ec8">3.3.2.2. Source code for double precision functions</a></li>
<li><a href="#org68b740b">3.3.2.3. Source code for single precision functions</a></li>
<li><a href="#orgf2fba24">3.3.2.4. Source code for memory-safe functions</a></li>
<li><a href="#orgcd7495d">3.3.2.5. Source code for default functions</a></li>
<li><a href="#org0bc6934">3.3.2.1. Function declarations</a></li>
<li><a href="#org57246e8">3.3.2.2. Source code for double precision functions</a></li>
<li><a href="#org308bfb1">3.3.2.3. Source code for single precision functions</a></li>
<li><a href="#org16b314b">3.3.2.4. Source code for memory-safe functions</a></li>
<li><a href="#orga33275e">3.3.2.5. Source code for default functions</a></li>
</ul>
</li>
<li><a href="#org724a344">3.3.3. Fortran templates for front end</a></li>
<li><a href="#orga439513">3.3.4. Python templates for front end</a></li>
<li><a href="#org49f2b89">3.3.3. Fortran templates for front end</a></li>
<li><a href="#org75cea83">3.3.4. Python templates for front end</a></li>
</ul>
</li>
<li><a href="#org137b8d8">3.4. Sparse data structures</a></li>
<li><a href="#org58e4d59">3.5. Templates for front end has/read/write a dataset of strings</a>
<li><a href="#org43d6c25">3.4. Sparse data structures</a></li>
<li><a href="#org366960b">3.5. Templates for front end has/read/write a dataset of strings</a>
<ul>
<li><a href="#org28000e6">3.5.1. Introduction</a></li>
<li><a href="#orga0bd834">3.5.2. C templates for front end</a>
<li><a href="#orgdab245a">3.5.1. Introduction</a></li>
<li><a href="#orga148f43">3.5.2. C templates for front end</a>
<ul>
<li><a href="#org934449b">3.5.2.1. Function declarations</a></li>
<li><a href="#org77cd040">3.5.2.2. Source code for default functions</a></li>
<li><a href="#org22317ad">3.5.2.1. Function declarations</a></li>
<li><a href="#org8994510">3.5.2.2. Source code for default functions</a></li>
</ul>
</li>
<li><a href="#org07a465c">3.5.3. Fortran templates for front end</a></li>
<li><a href="#org42d352f">3.5.4. Python templates for front end</a></li>
<li><a href="#org395ca87">3.5.3. Fortran templates for front end</a></li>
<li><a href="#org90301e9">3.5.4. Python templates for front end</a></li>
</ul>
</li>
<li><a href="#org3cd04b1">3.6. Templates for front end has/read/write a single string attribute</a>
<li><a href="#orgaa970de">3.6. Templates for front end has/read/write a single string attribute</a>
<ul>
<li><a href="#org7c1c662">3.6.1. Introduction</a></li>
<li><a href="#org3334036">3.6.2. C templates for front end</a>
<li><a href="#org291604e">3.6.1. Introduction</a></li>
<li><a href="#orge17cbc3">3.6.2. C templates for front end</a>
<ul>
<li><a href="#org31e3bd3">3.6.2.1. Function declarations</a></li>
<li><a href="#org82bbf3e">3.6.2.2. Source code for default functions</a></li>
<li><a href="#org46e8123">3.6.2.1. Function declarations</a></li>
<li><a href="#org6bc70d5">3.6.2.2. Source code for default functions</a></li>
</ul>
</li>
<li><a href="#org7aaf3db">3.6.3. Fortran templates for front end</a></li>
<li><a href="#orgea3c01a">3.6.4. Python templates for front end</a></li>
<li><a href="#orgf559a3e">3.6.3. Fortran templates for front end</a></li>
<li><a href="#org4db1c04">3.6.4. Python templates for front end</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#orgc9d9ce0">4. Fortran helper/wrapper functions</a></li>
<li><a href="#orged0ae67">4. Fortran helper/wrapper functions</a></li>
</ul>
</div>
</div>
<div id="outline-container-orge5db52c" class="outline-2">
<h2 id="orge5db52c"><span class="section-number-2">1</span> Coding conventions</h2>
<div id="outline-container-org95ef7e4" class="outline-2">
<h2 id="org95ef7e4"><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-orgefd3d95" class="outline-3">
<h3 id="orgefd3d95"><span class="section-number-3">1.1</span> Memory allocation</h3>
<div id="outline-container-org0f7366f" class="outline-3">
<h3 id="org0f7366f"><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-orgc1773c2" class="outline-2">
<h2 id="orgc1773c2"><span class="section-number-2">2</span> Front end</h2>
<div id="outline-container-org3a8ff76" class="outline-2">
<h2 id="org3a8ff76"><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-orgcace681" class="outline-3">
<h3 id="orgcace681"><span class="section-number-3">2.1</span> Error handling</h3>
<div id="outline-container-org1c5d76f" class="outline-3">
<h3 id="org1c5d76f"><span class="section-number-3">2.1</span> Error handling</h3>
<div class="outline-text-3" id="text-2-1">
<table id="org23e4234" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="org49b11f8" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -742,8 +742,8 @@ TREXIO front end is modular, which simplifies implementation of new back ends.
</div>
</div>
<div id="outline-container-orgb4c95bd" class="outline-4">
<h4 id="orgb4c95bd"><span class="section-number-4">2.1.1</span> Decoding errors</h4>
<div id="outline-container-org17b757c" class="outline-4">
<h4 id="org17b757c"><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
@ -766,8 +766,8 @@ The text strings are extracted from the previous table.
</p>
</div>
<div id="outline-container-org7ceb194" class="outline-5">
<h5 id="org7ceb194"><span class="section-number-5">2.1.1.1</span> C source code</h5>
<div id="outline-container-org6edcfb5" class="outline-5">
<h5 id="org6edcfb5"><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>*
@ -875,8 +875,8 @@ The text strings are extracted from the previous table.
</div>
</div>
<div id="outline-container-org0dd363d" class="outline-5">
<h5 id="org0dd363d"><span class="section-number-5">2.1.1.2</span> Fortran interface</h5>
<div id="outline-container-orgfff80d8" class="outline-5">
<h5 id="orgfff80d8"><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>
@ -892,8 +892,8 @@ The text strings are extracted from the previous table.
</div>
</div>
<div id="outline-container-org7ffd1cb" class="outline-5">
<h5 id="org7ffd1cb"><span class="section-number-5">2.1.1.3</span> Python interface</h5>
<div id="outline-container-orgcf64689" class="outline-5">
<h5 id="orgcf64689"><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>):
@ -932,8 +932,8 @@ The text strings are extracted from the previous table.
</div>
</div>
<div id="outline-container-org2dc3f4f" class="outline-3">
<h3 id="org2dc3f4f"><span class="section-number-3">2.2</span> Back ends</h3>
<div id="outline-container-org8496948" class="outline-3">
<h3 id="org8496948"><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:
@ -957,8 +957,8 @@ lines that correspond to the <code>TREXIO_JSON</code> back end (not implemented
</p>
</div>
<div id="outline-container-orgf6a9925" class="outline-4">
<h4 id="orgf6a9925"><span class="section-number-4">2.2.1</span> C</h4>
<div id="outline-container-org9dd90fb" class="outline-4">
<h4 id="org9dd90fb"><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>;
@ -1001,8 +1001,8 @@ This is useful due to the fact that HDF5 back end can be disabled at configure s
</div>
</div>
<div id="outline-container-org92afddb" class="outline-4">
<h4 id="org92afddb"><span class="section-number-4">2.2.2</span> Fortran</h4>
<div id="outline-container-org850cbaf" class="outline-4">
<h4 id="org850cbaf"><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>
@ -1028,8 +1028,8 @@ The function below is a Fortran interface for the aforementioned C-compatible <c
</div>
</div>
<div id="outline-container-orgad413f1" class="outline-4">
<h4 id="orgad413f1"><span class="section-number-4">2.2.3</span> Python</h4>
<div id="outline-container-orgc3efc40" class="outline-4">
<h4 id="orgc3efc40"><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>
@ -1043,8 +1043,8 @@ The function below is a Fortran interface for the aforementioned C-compatible <c
</div>
</div>
<div id="outline-container-orgb0d4157" class="outline-3">
<h3 id="orgb0d4157"><span class="section-number-3">2.3</span> Read/write behavior</h3>
<div id="outline-container-org38e2030" class="outline-3">
<h3 id="org38e2030"><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
@ -1072,8 +1072,8 @@ concurrent programs, the behavior is not specified.
</p>
</div>
</div>
<div id="outline-container-org28be95e" class="outline-3">
<h3 id="org28be95e"><span class="section-number-3">2.4</span> TREXIO file type</h3>
<div id="outline-container-orgc0c152d" class="outline-3">
<h3 id="orgc0c152d"><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
@ -1107,8 +1107,8 @@ TREXIO files will have as a first argument the TREXIO file handle.
</div>
</div>
<div id="outline-container-org310fc5f" class="outline-4">
<h4 id="org310fc5f"><span class="section-number-4">2.4.1</span> TREXIO<sub>File</sub> Python class</h4>
<div id="outline-container-orge61ef47" class="outline-4">
<h4 id="orge61ef47"><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>:
@ -1181,8 +1181,8 @@ TREXIO files will have as a first argument the TREXIO file handle.
</div>
</div>
<div id="outline-container-org77abb54" class="outline-3">
<h3 id="org77abb54"><span class="section-number-3">2.5</span> Polymorphism of the file handle</h3>
<div id="outline-container-orgc1ed07b" class="outline-3">
<h3 id="orgc1ed07b"><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
@ -1201,8 +1201,8 @@ corresponding types for all back ends can be safely casted to
</div>
</div>
<div id="outline-container-org7ea585f" class="outline-3">
<h3 id="org7ea585f"><span class="section-number-3">2.6</span> File opening</h3>
<div id="outline-container-orgd948212" class="outline-3">
<h3 id="orgd948212"><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.
@ -1241,8 +1241,8 @@ renaming the <code>.txt</code> data files.
</p>
</div>
<div id="outline-container-org289dacc" class="outline-4">
<h4 id="org289dacc"><span class="section-number-4">2.6.1</span> C</h4>
<div id="outline-container-org3f7d397" class="outline-4">
<h4 id="org3f7d397"><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>*
@ -1429,8 +1429,8 @@ renaming the <code>.txt</code> data files.
</div>
</div>
<div id="outline-container-org6796379" class="outline-4">
<h4 id="org6796379"><span class="section-number-4">2.6.2</span> Fortran</h4>
<div id="outline-container-org09252d5" class="outline-4">
<h4 id="org09252d5"><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>
@ -1448,8 +1448,8 @@ renaming the <code>.txt</code> data files.
</div>
</div>
<div id="outline-container-orgac87272" class="outline-4">
<h4 id="orgac87272"><span class="section-number-4">2.6.3</span> Python</h4>
<div id="outline-container-org31dd44d" class="outline-4">
<h4 id="org31dd44d"><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>):
@ -1497,8 +1497,8 @@ renaming the <code>.txt</code> data files.
</div>
</div>
<div id="outline-container-orgf083add" class="outline-4">
<h4 id="orgf083add"><span class="section-number-4">2.6.4</span> Zero-based versus one-based arrays of indices</h4>
<div id="outline-container-org59be5ec" class="outline-4">
<h4 id="org59be5ec"><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
@ -1531,8 +1531,8 @@ know if we need to shift by 1 arrays of indices.
</div>
</div>
<div id="outline-container-org0dbff75" class="outline-3">
<h3 id="org0dbff75"><span class="section-number-3">2.7</span> File closing</h3>
<div id="outline-container-org91bf330" class="outline-3">
<h3 id="org91bf330"><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.
@ -1549,8 +1549,8 @@ output:
</p>
</div>
<div id="outline-container-org047e8c4" class="outline-4">
<h4 id="org047e8c4"><span class="section-number-4">2.7.1</span> C</h4>
<div id="outline-container-orgc92dfd1" class="outline-4">
<h4 id="orgc92dfd1"><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>
@ -1629,8 +1629,8 @@ output:
</div>
</div>
<div id="outline-container-orge0c986e" class="outline-4">
<h4 id="orge0c986e"><span class="section-number-4">2.7.2</span> Fortran</h4>
<div id="outline-container-orgdfd57c6" class="outline-4">
<h4 id="orgdfd57c6"><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>
@ -1644,8 +1644,8 @@ output:
</div>
</div>
<div id="outline-container-org8383e54" class="outline-4">
<h4 id="org8383e54"><span class="section-number-4">2.7.3</span> Python</h4>
<div id="outline-container-orge5adb60" class="outline-4">
<h4 id="orge5adb60"><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):
@ -1667,12 +1667,12 @@ output:
</div>
</div>
<div id="outline-container-org1e59d01" class="outline-2">
<h2 id="org1e59d01"><span class="section-number-2">3</span> Templates for front end</h2>
<div id="outline-container-org6984aec" class="outline-2">
<h2 id="org6984aec"><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-org70fba7f" class="outline-3">
<h3 id="org70fba7f"><span class="section-number-3">3.1</span> Description</h3>
<div id="outline-container-orge8075eb" class="outline-3">
<h3 id="orge8075eb"><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>:
@ -1893,12 +1893,12 @@ value will result in <code>TREXIO_INVALID_ARG_2</code> exit code.
</div>
</div>
<div id="outline-container-org5cbf3c1" class="outline-3">
<h3 id="org5cbf3c1"><span class="section-number-3">3.2</span> Templates for front end has/read/write a single numerical attribute</h3>
<div id="outline-container-org59399a5" class="outline-3">
<h3 id="org59399a5"><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-orge68eebb" class="outline-4">
<h4 id="orge68eebb"><span class="section-number-4">3.2.1</span> Introduction</h4>
<div id="outline-container-org5cac91b" class="outline-4">
<h4 id="org5cac91b"><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,
@ -1969,8 +1969,8 @@ namely single value of int/float types.
</div>
</div>
<div id="outline-container-org83fa54f" class="outline-4">
<h4 id="org83fa54f"><span class="section-number-4">3.2.2</span> C templates for front end</h4>
<div id="outline-container-orgb8ee39d" class="outline-4">
<h4 id="orgb8ee39d"><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
@ -1984,12 +1984,12 @@ precision (see Table above).
</p>
</div>
<div id="outline-container-orgec79a89" class="outline-5">
<h5 id="orgec79a89"><span class="section-number-5">3.2.2.1</span> Function declarations</h5>
<div id="outline-container-org26bc1a3" class="outline-5">
<h5 id="org26bc1a3"><span class="section-number-5">3.2.2.1</span> Function declarations</h5>
</div>
<div id="outline-container-org14ce5d2" class="outline-5">
<h5 id="org14ce5d2"><span class="section-number-5">3.2.2.2</span> Source code for double precision functions</h5>
<div id="outline-container-orga4db47e" class="outline-5">
<h5 id="orga4db47e"><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>
@ -2058,8 +2058,8 @@ precision (see Table above).
</div>
</div>
<div id="outline-container-org2438225" class="outline-5">
<h5 id="org2438225"><span class="section-number-5">3.2.2.3</span> Source code for single precision functions</h5>
<div id="outline-container-orgbd23d89" class="outline-5">
<h5 id="orgbd23d89"><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>
@ -2135,8 +2135,8 @@ precision (see Table above).
</div>
</div>
<div id="outline-container-org88d7be7" class="outline-5">
<h5 id="org88d7be7"><span class="section-number-5">3.2.2.4</span> Source code for default functions</h5>
<div id="outline-container-orgafe0585" class="outline-5">
<h5 id="orgafe0585"><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>
@ -2193,8 +2193,8 @@ precision (see Table above).
</div>
</div>
<div id="outline-container-orgfc05727" class="outline-4">
<h4 id="orgfc05727"><span class="section-number-4">3.2.3</span> Fortran templates for front end</h4>
<div id="outline-container-orgc9f9e14" class="outline-4">
<h4 id="orgc9f9e14"><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.
@ -2279,8 +2279,8 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
</div>
</div>
<div id="outline-container-org25098c5" class="outline-4">
<h4 id="org25098c5"><span class="section-number-4">3.2.4</span> Python templates for front end</h4>
<div id="outline-container-orgb927b84" class="outline-4">
<h4 id="orgb927b84"><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>:
@ -2365,12 +2365,12 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
</div>
</div>
<div id="outline-container-org53d4dfa" class="outline-3">
<h3 id="org53d4dfa"><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-orga16049e" class="outline-3">
<h3 id="orga16049e"><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-org5cff3a6" class="outline-4">
<h4 id="org5cff3a6"><span class="section-number-4">3.3.1</span> Introduction</h4>
<div id="outline-container-orge8f8a31" class="outline-4">
<h4 id="orge8f8a31"><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.
@ -2452,8 +2452,8 @@ This section concerns API calls related to datasets.
</div>
</div>
<div id="outline-container-org54238c8" class="outline-4">
<h4 id="org54238c8"><span class="section-number-4">3.3.2</span> C templates for front end</h4>
<div id="outline-container-orgb83ec54" class="outline-4">
<h4 id="orgb83ec54"><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.
@ -2464,13 +2464,13 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
</p>
</div>
<div id="outline-container-org14af7c1" class="outline-5">
<h5 id="org14af7c1"><span class="section-number-5">3.3.2.1</span> Function declarations</h5>
<div id="outline-container-org0bc6934" class="outline-5">
<h5 id="org0bc6934"><span class="section-number-5">3.3.2.1</span> Function declarations</h5>
</div>
<div id="outline-container-org1e92ec8" class="outline-5">
<h5 id="org1e92ec8"><span class="section-number-5">3.3.2.2</span> Source code for double precision functions</h5>
<div id="outline-container-org57246e8" class="outline-5">
<h5 id="org57246e8"><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>
@ -2523,7 +2523,7 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
dim_size *= dims[i];
}
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">uint64_t</span> <span style="color: #a0522d;">i</span>=0; i&lt;dim_size; ++i){
$group_dset$[i] += ($group_dset_dtype_single$) 1;
$group_dset$[i] += ($group_dset_dtype_double$) 1;
}
}
@ -2567,7 +2567,7 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
<span style="color: #a020f0;">if</span> ($group_dset$_p == <span style="color: #008b8b;">NULL</span>) <span style="color: #a020f0;">return</span> TREXIO_ALLOCATION_FAILED;
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">uint64_t</span> <span style="color: #a0522d;">i</span>=0; i&lt;dim_size; ++i){
$group_dset$_p[i] = $group_dset$_p[i] - ($group_dset_dtype_single$) 1;
$group_dset$_p[i] -= ($group_dset_dtype_double$) 1;
}
}
@ -2606,8 +2606,8 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
</div>
</div>
<div id="outline-container-org68b740b" class="outline-5">
<h5 id="org68b740b"><span class="section-number-5">3.3.2.3</span> Source code for single precision functions</h5>
<div id="outline-container-org308bfb1" class="outline-5">
<h5 id="org308bfb1"><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>
@ -2668,7 +2668,7 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
<span style="color: #a020f0;">if</span> ($is_index$) {
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">uint64_t</span> <span style="color: #a0522d;">i</span>=0; i&lt;dim_size; ++i){
$group_dset$[i] = ($group_dset_dtype_single$) $group_dset$_64[i] + ($group_dset_dtype_single$) 1;
$group_dset$[i] = ($group_dset_dtype_single$) $group_dset$_64[i] + 1;
}
} <span style="color: #a020f0;">else</span> {
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">uint64_t</span> <span style="color: #a0522d;">i</span>=0; i&lt;dim_size; ++i){
@ -2756,11 +2756,11 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
</div>
</div>
<div id="outline-container-orgf2fba24" class="outline-5">
<h5 id="orgf2fba24"><span class="section-number-5">3.3.2.4</span> Source code for memory-safe functions</h5>
<div id="outline-container-org16b314b" class="outline-5">
<h5 id="org16b314b"><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="org8f0740f"><span style="color: #228b22;">trexio_exit_code</span> <span style="color: #a0522d;">rc</span>;
<pre class="src src-c" id="orgd1bbe2e"><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>*/
@ -2916,8 +2916,8 @@ rc = trexio_read_$group_dset_dim$_64(file, &amp;($group_dset_dim$));
</div>
</div>
<div id="outline-container-orgcd7495d" class="outline-5">
<h5 id="orgcd7495d"><span class="section-number-5">3.3.2.5</span> Source code for default functions</h5>
<div id="outline-container-orga33275e" class="outline-5">
<h5 id="orga33275e"><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>
@ -2995,8 +2995,8 @@ rc = trexio_read_$group_dset_dim$_64(file, &amp;($group_dset_dim$));
</div>
</div>
<div id="outline-container-org724a344" class="outline-4">
<h4 id="org724a344"><span class="section-number-4">3.3.3</span> Fortran templates for front end</h4>
<div id="outline-container-org49f2b89" class="outline-4">
<h4 id="org49f2b89"><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>.
@ -3081,8 +3081,8 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
</div>
</div>
<div id="outline-container-orga439513" class="outline-4">
<h4 id="orga439513"><span class="section-number-4">3.3.4</span> Python templates for front end</h4>
<div id="outline-container-org75cea83" class="outline-4">
<h4 id="org75cea83"><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>:
@ -3277,8 +3277,8 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
</div>
</div>
<div id="outline-container-org137b8d8" class="outline-3">
<h3 id="org137b8d8"><span class="section-number-3">3.4</span> Sparse data structures</h3>
<div id="outline-container-org43d6c25" class="outline-3">
<h3 id="org43d6c25"><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
@ -3419,12 +3419,12 @@ For the values,
</div>
</div>
<div id="outline-container-org58e4d59" class="outline-3">
<h3 id="org58e4d59"><span class="section-number-3">3.5</span> Templates for front end has/read/write a dataset of strings</h3>
<div id="outline-container-org366960b" class="outline-3">
<h3 id="org366960b"><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-org28000e6" class="outline-4">
<h4 id="org28000e6"><span class="section-number-4">3.5.1</span> Introduction</h4>
<div id="outline-container-orgdab245a" class="outline-4">
<h4 id="orgdab245a"><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.
@ -3464,8 +3464,8 @@ This section concerns API calls related to datasets of strings.
</div>
</div>
<div id="outline-container-orga0bd834" class="outline-4">
<h4 id="orga0bd834"><span class="section-number-4">3.5.2</span> C templates for front end</h4>
<div id="outline-container-orga148f43" class="outline-4">
<h4 id="orga148f43"><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
@ -3473,12 +3473,12 @@ to/from the <code>TREXIO</code> file (except for <code>trexio_has_</code> functi
</p>
</div>
<div id="outline-container-org934449b" class="outline-5">
<h5 id="org934449b"><span class="section-number-5">3.5.2.1</span> Function declarations</h5>
<div id="outline-container-org22317ad" class="outline-5">
<h5 id="org22317ad"><span class="section-number-5">3.5.2.1</span> Function declarations</h5>
</div>
<div id="outline-container-org77cd040" class="outline-5">
<h5 id="org77cd040"><span class="section-number-5">3.5.2.2</span> Source code for default functions</h5>
<div id="outline-container-org8994510" class="outline-5">
<h5 id="org8994510"><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>
@ -3732,8 +3732,8 @@ to/from the <code>TREXIO</code> file (except for <code>trexio_has_</code> functi
</div>
</div>
<div id="outline-container-org07a465c" class="outline-4">
<h4 id="org07a465c"><span class="section-number-4">3.5.3</span> Fortran templates for front end</h4>
<div id="outline-container-org395ca87" class="outline-4">
<h4 id="org395ca87"><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>.
@ -3829,8 +3829,8 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
</div>
</div>
<div id="outline-container-org42d352f" class="outline-4">
<h4 id="org42d352f"><span class="section-number-4">3.5.4</span> Python templates for front end</h4>
<div id="outline-container-org90301e9" class="outline-4">
<h4 id="org90301e9"><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>:
@ -3946,12 +3946,12 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
</div>
</div>
<div id="outline-container-org3cd04b1" class="outline-3">
<h3 id="org3cd04b1"><span class="section-number-3">3.6</span> Templates for front end has/read/write a single string attribute</h3>
<div id="outline-container-orgaa970de" class="outline-3">
<h3 id="orgaa970de"><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-org7c1c662" class="outline-4">
<h4 id="org7c1c662"><span class="section-number-4">3.6.1</span> Introduction</h4>
<div id="outline-container-org291604e" class="outline-4">
<h4 id="org291604e"><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.
@ -3991,16 +3991,16 @@ This section concerns API calls related to string attributes.
</div>
</div>
<div id="outline-container-org3334036" class="outline-4">
<h4 id="org3334036"><span class="section-number-4">3.6.2</span> C templates for front end</h4>
<div id="outline-container-orge17cbc3" class="outline-4">
<h4 id="orge17cbc3"><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-org31e3bd3" class="outline-5">
<h5 id="org31e3bd3"><span class="section-number-5">3.6.2.1</span> Function declarations</h5>
<div id="outline-container-org46e8123" class="outline-5">
<h5 id="org46e8123"><span class="section-number-5">3.6.2.1</span> Function declarations</h5>
</div>
<div id="outline-container-org82bbf3e" class="outline-5">
<h5 id="org82bbf3e"><span class="section-number-5">3.6.2.2</span> Source code for default functions</h5>
<div id="outline-container-org6bc70d5" class="outline-5">
<h5 id="org6bc70d5"><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>
@ -4112,8 +4112,8 @@ This section concerns API calls related to string attributes.
</div>
</div>
<div id="outline-container-org7aaf3db" class="outline-4">
<h4 id="org7aaf3db"><span class="section-number-4">3.6.3</span> Fortran templates for front end</h4>
<div id="outline-container-orgf559a3e" class="outline-4">
<h4 id="orgf559a3e"><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.
@ -4190,8 +4190,8 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
</div>
</div>
<div id="outline-container-orgea3c01a" class="outline-4">
<h4 id="orgea3c01a"><span class="section-number-4">3.6.4</span> Python templates for front end</h4>
<div id="outline-container-org4db1c04" class="outline-4">
<h4 id="org4db1c04"><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>:
@ -4281,8 +4281,8 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
</div>
</div>
<div id="outline-container-orgc9d9ce0" class="outline-2">
<h2 id="orgc9d9ce0"><span class="section-number-2">4</span> Fortran helper/wrapper functions</h2>
<div id="outline-container-orged0ae67" class="outline-2">
<h2 id="orged0ae67"><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.
@ -4417,7 +4417,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-11-18 Thu 13:13</p>
<p class="date">Created: 2021-11-18 Thu 13:35</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-11-18 Thu 13:13 -->
<!-- 2021-11-18 Thu 13:35 -->
<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="#org6329b1a">1. HDF5 back end</a>
<li><a href="#org49ee306">1. HDF5 back end</a>
<ul>
<li><a href="#orgafa0eb9">1.1. Template for HDF5 definitions</a></li>
<li><a href="#orgae0b355">1.2. Template for HDF5 structures</a></li>
<li><a href="#org8fdd8b4">1.3. Template for HDF5 init/deinit</a></li>
<li><a href="#orgb71e5df">1.4. Template for HDF5 has/read/write the numerical attribute</a></li>
<li><a href="#orgc1bcbbe">1.5. Template for HDF5 has/read/write the dataset of numerical data</a></li>
<li><a href="#org72b2af9">1.6. Template for HDF5 has/read/write the dataset of strings</a></li>
<li><a href="#org4598a85">1.7. Template for HDF5 has/read/write the string attribute</a></li>
<li><a href="#org852fdca">1.1. Template for HDF5 definitions</a></li>
<li><a href="#orgeacd5dd">1.2. Template for HDF5 structures</a></li>
<li><a href="#org9db0bf2">1.3. Template for HDF5 init/deinit</a></li>
<li><a href="#org4005811">1.4. Template for HDF5 has/read/write the numerical attribute</a></li>
<li><a href="#orgee6a275">1.5. Template for HDF5 has/read/write the dataset of numerical data</a></li>
<li><a href="#org3d1f746">1.6. Template for HDF5 has/read/write the dataset of strings</a></li>
<li><a href="#orgaf5c58a">1.7. Template for HDF5 has/read/write the string attribute</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div id="outline-container-org6329b1a" class="outline-2">
<h2 id="org6329b1a"><span class="section-number-2">1</span> HDF5 back end</h2>
<div id="outline-container-org49ee306" class="outline-2">
<h2 id="org49ee306"><span class="section-number-2">1</span> HDF5 back end</h2>
<div class="outline-text-2" id="text-1">
</div>
<div id="outline-container-orgafa0eb9" class="outline-3">
<h3 id="orgafa0eb9"><span class="section-number-3">1.1</span> Template for HDF5 definitions</h3>
<div id="outline-container-org852fdca" class="outline-3">
<h3 id="org852fdca"><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-orgae0b355" class="outline-3">
<h3 id="orgae0b355"><span class="section-number-3">1.2</span> Template for HDF5 structures</h3>
<div id="outline-container-orgeacd5dd" class="outline-3">
<h3 id="orgeacd5dd"><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-org8fdd8b4" class="outline-3">
<h3 id="org8fdd8b4"><span class="section-number-3">1.3</span> Template for HDF5 init/deinit</h3>
<div id="outline-container-org9db0bf2" class="outline-3">
<h3 id="org9db0bf2"><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-orgb71e5df" class="outline-3">
<h3 id="orgb71e5df"><span class="section-number-3">1.4</span> Template for HDF5 has/read/write the numerical attribute</h3>
<div id="outline-container-org4005811" class="outline-3">
<h3 id="org4005811"><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-orgc1bcbbe" class="outline-3">
<h3 id="orgc1bcbbe"><span class="section-number-3">1.5</span> Template for HDF5 has/read/write the dataset of numerical data</h3>
<div id="outline-container-orgee6a275" class="outline-3">
<h3 id="orgee6a275"><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-org72b2af9" class="outline-3">
<h3 id="org72b2af9"><span class="section-number-3">1.6</span> Template for HDF5 has/read/write the dataset of strings</h3>
<div id="outline-container-org3d1f746" class="outline-3">
<h3 id="org3d1f746"><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-org4598a85" class="outline-3">
<h3 id="org4598a85"><span class="section-number-3">1.7</span> Template for HDF5 has/read/write the string attribute</h3>
<div id="outline-container-orgaf5c58a" class="outline-3">
<h3 id="orgaf5c58a"><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-11-18 Thu 13:13</p>
<p class="date">Created: 2021-11-18 Thu 13:35</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-11-18 Thu 13:13 -->
<!-- 2021-11-18 Thu 13:35 -->
<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="#org37a0a5d">1. TEXT back end</a>
<li><a href="#org29904bb">1. TEXT back end</a>
<ul>
<li><a href="#org5a4d3a3">1.1. Template for group-related structures in text back end</a></li>
<li><a href="#orgc39c7d8">1.2. Template for general structure in text back end</a></li>
<li><a href="#org3fb15ba">1.3. Initialize function (constant part)</a></li>
<li><a href="#orgb4f23ae">1.4. Deinitialize function (templated part)</a></li>
<li><a href="#org3512ef6">1.5. Template for text read struct</a></li>
<li><a href="#org69e92d8">1.6. Template for text flush struct</a></li>
<li><a href="#org16cd706">1.7. Template for text free memory</a></li>
<li><a href="#orge696a3a">1.8. Template for has/read/write the numerical attribute</a></li>
<li><a href="#orgc230d0b">1.9. Template for has/read/write the dataset of numerical data</a></li>
<li><a href="#org8c943ed">1.10. Template for has/read/write the dataset of strings</a></li>
<li><a href="#orgb7b0cb9">1.11. Template for has/read/write the string attribute</a></li>
<li><a href="#org0163a7a">1.12. RDM struct (hard-coded)</a>
<li><a href="#org1daae06">1.1. Template for group-related structures in text back end</a></li>
<li><a href="#orgd0cab51">1.2. Template for general structure in text back end</a></li>
<li><a href="#org1d65fdd">1.3. Initialize function (constant part)</a></li>
<li><a href="#orga444414">1.4. Deinitialize function (templated part)</a></li>
<li><a href="#org2f284a0">1.5. Template for text read struct</a></li>
<li><a href="#org7409db0">1.6. Template for text flush struct</a></li>
<li><a href="#org4df469f">1.7. Template for text free memory</a></li>
<li><a href="#org8ab29ae">1.8. Template for has/read/write the numerical attribute</a></li>
<li><a href="#orgfc5a618">1.9. Template for has/read/write the dataset of numerical data</a></li>
<li><a href="#orgec645c2">1.10. Template for has/read/write the dataset of strings</a></li>
<li><a href="#org48fbf5b">1.11. Template for has/read/write the string attribute</a></li>
<li><a href="#org00d1d85">1.12. RDM struct (hard-coded)</a>
<ul>
<li><a href="#orgc90ca81">1.12.1. Read the complete struct</a></li>
<li><a href="#org293e776">1.12.2. Flush the complete struct</a></li>
<li><a href="#org7f49fa1">1.12.3. Free memory</a></li>
<li><a href="#org3ec6653">1.12.4. Read/Write the one<sub>e</sub> attribute</a></li>
<li><a href="#orgc7b6107">1.12.5. Read/Write the two<sub>e</sub> attribute</a></li>
<li><a href="#org0970f25">1.12.1. Read the complete struct</a></li>
<li><a href="#org1f6f9d3">1.12.2. Flush the complete struct</a></li>
<li><a href="#orgc8677c2">1.12.3. Free memory</a></li>
<li><a href="#orgffff108">1.12.4. Read/Write the one<sub>e</sub> attribute</a></li>
<li><a href="#orgef258a8">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-org37a0a5d" class="outline-2">
<h2 id="org37a0a5d"><span class="section-number-2">1</span> TEXT back end</h2>
<div id="outline-container-org29904bb" class="outline-2">
<h2 id="org29904bb"><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-org5a4d3a3" class="outline-3">
<h3 id="org5a4d3a3"><span class="section-number-3">1.1</span> Template for group-related structures in text back end</h3>
<div id="outline-container-org1daae06" class="outline-3">
<h3 id="org1daae06"><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-orgc39c7d8" class="outline-3">
<h3 id="orgc39c7d8"><span class="section-number-3">1.2</span> Template for general structure in text back end</h3>
<div id="outline-container-orgd0cab51" class="outline-3">
<h3 id="orgd0cab51"><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-org3fb15ba" class="outline-3">
<h3 id="org3fb15ba"><span class="section-number-3">1.3</span> Initialize function (constant part)</h3>
<div id="outline-container-org1d65fdd" class="outline-3">
<h3 id="org1d65fdd"><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-orgb4f23ae" class="outline-3">
<h3 id="orgb4f23ae"><span class="section-number-3">1.4</span> Deinitialize function (templated part)</h3>
<div id="outline-container-orga444414" class="outline-3">
<h3 id="orga444414"><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-org3512ef6" class="outline-3">
<h3 id="org3512ef6"><span class="section-number-3">1.5</span> Template for text read struct</h3>
<div id="outline-container-org2f284a0" class="outline-3">
<h3 id="org2f284a0"><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-org69e92d8" class="outline-3">
<h3 id="org69e92d8"><span class="section-number-3">1.6</span> Template for text flush struct</h3>
<div id="outline-container-org7409db0" class="outline-3">
<h3 id="org7409db0"><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-org16cd706" class="outline-3">
<h3 id="org16cd706"><span class="section-number-3">1.7</span> Template for text free memory</h3>
<div id="outline-container-org4df469f" class="outline-3">
<h3 id="org4df469f"><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-orge696a3a" class="outline-3">
<h3 id="orge696a3a"><span class="section-number-3">1.8</span> Template for has/read/write the numerical attribute</h3>
<div id="outline-container-org8ab29ae" class="outline-3">
<h3 id="org8ab29ae"><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-orgc230d0b" class="outline-3">
<h3 id="orgc230d0b"><span class="section-number-3">1.9</span> Template for has/read/write the dataset of numerical data</h3>
<div id="outline-container-orgfc5a618" class="outline-3">
<h3 id="orgfc5a618"><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-org8c943ed" class="outline-3">
<h3 id="org8c943ed"><span class="section-number-3">1.10</span> Template for has/read/write the dataset of strings</h3>
<div id="outline-container-orgec645c2" class="outline-3">
<h3 id="orgec645c2"><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-orgb7b0cb9" class="outline-3">
<h3 id="orgb7b0cb9"><span class="section-number-3">1.11</span> Template for has/read/write the string attribute</h3>
<div id="outline-container-org48fbf5b" class="outline-3">
<h3 id="org48fbf5b"><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-org0163a7a" class="outline-3">
<h3 id="org0163a7a"><span class="section-number-3">1.12</span> RDM struct (hard-coded)</h3>
<div id="outline-container-org00d1d85" class="outline-3">
<h3 id="org00d1d85"><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-orgc90ca81" class="outline-4">
<h4 id="orgc90ca81"><span class="section-number-4">1.12.1</span> Read the complete struct</h4>
<div id="outline-container-org0970f25" class="outline-4">
<h4 id="org0970f25"><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-org293e776" class="outline-4">
<h4 id="org293e776"><span class="section-number-4">1.12.2</span> Flush the complete struct</h4>
<div id="outline-container-org1f6f9d3" class="outline-4">
<h4 id="org1f6f9d3"><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-org7f49fa1" class="outline-4">
<h4 id="org7f49fa1"><span class="section-number-4">1.12.3</span> Free memory</h4>
<div id="outline-container-orgc8677c2" class="outline-4">
<h4 id="orgc8677c2"><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-org3ec6653" class="outline-4">
<h4 id="org3ec6653"><span class="section-number-4">1.12.4</span> Read/Write the one<sub>e</sub> attribute</h4>
<div id="outline-container-orgffff108" class="outline-4">
<h4 id="orgffff108"><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-orgc7b6107" class="outline-4">
<h4 id="orgc7b6107"><span class="section-number-4">1.12.5</span> Read/Write the two<sub>e</sub> attribute</h4>
<div id="outline-container-orgef258a8" class="outline-4">
<h4 id="orgef258a8"><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-11-18 Thu 13:13</p>
<p class="date">Created: 2021-11-18 Thu 13:35</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>

116
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-11-18 Thu 13:13 -->
<!-- 2021-11-18 Thu 13:35 -->
<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="#org835677f">1. Metadata (metadata group)</a></li>
<li><a href="#org15acd27">2. Electron (electron group)</a></li>
<li><a href="#orgac10337">3. Nucleus (nucleus group)</a></li>
<li><a href="#orgb37c888">4. Effective core potentials (ecp group)</a>
<li><a href="#orga60d977">1. Metadata (metadata group)</a></li>
<li><a href="#org5af70b7">2. Electron (electron group)</a></li>
<li><a href="#org8a1f003">3. Nucleus (nucleus group)</a></li>
<li><a href="#org2c65ce1">4. Effective core potentials (ecp group)</a>
<ul>
<li><a href="#org28dc216">4.1. Example</a></li>
<li><a href="#org036856e">4.1. Example</a></li>
</ul>
</li>
<li><a href="#org71b107d">5. Basis set (basis group)</a>
<li><a href="#org4d2d6f7">5. Basis set (basis group)</a>
<ul>
<li><a href="#orge40c5a3">5.1. Example</a></li>
<li><a href="#orgac93d3f">5.1. Example</a></li>
</ul>
</li>
<li><a href="#orgc3003f8">6. Atomic orbitals (ao group)</a>
<li><a href="#org112ab53">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="#orgb60345f">7. Molecular orbitals (mo group)</a>
<li><a href="#org682b6be">7. Molecular orbitals (mo group)</a>
<ul>
<li><a href="#org34937b5">7.1. One-electron integrals (<code>mo_1e_int</code> group)</a></li>
<li><a href="#orgf5e9adc">7.2. Two-electron integrals (<code>mo_2e_int</code> group)</a></li>
<li><a href="#org391cc5e">7.1. One-electron integrals (<code>mo_1e_int</code> group)</a></li>
<li><a href="#orgd48d8cd">7.2. Two-electron integrals (<code>mo_2e_int</code> group)</a></li>
</ul>
</li>
<li><a href="#org78840e7">8. <span class="todo TODO">TODO</span> Slater determinants</a></li>
<li><a href="#org768d1c2">9. <span class="todo TODO">TODO</span> Reduced density matrices (rdm group)</a></li>
<li><a href="#org28c9343">8. <span class="todo TODO">TODO</span> Slater determinants</a></li>
<li><a href="#orgb814863">9. <span class="todo TODO">TODO</span> Reduced density matrices (rdm group)</a></li>
</ul>
</div>
</div>
@ -399,8 +399,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-org835677f" class="outline-2">
<h2 id="org835677f"><span class="section-number-2">1</span> Metadata (metadata group)</h2>
<div id="outline-container-orga60d977" class="outline-2">
<h2 id="orga60d977"><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
@ -410,7 +410,7 @@ which have participated to the creation of the file, a list of
authors of the file, and a textual description.
</p>
<table id="org919ce12" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="org244fe86" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -477,15 +477,15 @@ authors of the file, and a textual description.
</div>
</div>
<div id="outline-container-org15acd27" class="outline-2">
<h2 id="org15acd27"><span class="section-number-2">2</span> Electron (electron group)</h2>
<div id="outline-container-org5af70b7" class="outline-2">
<h2 id="org5af70b7"><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="orgc80a57d" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="org93d3510" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -524,15 +524,15 @@ the number of &uarr; and &darr; electrons is fixed.
</div>
</div>
<div id="outline-container-orgac10337" class="outline-2">
<h2 id="orgac10337"><span class="section-number-2">3</span> Nucleus (nucleus group)</h2>
<div id="outline-container-org8a1f003" class="outline-2">
<h2 id="org8a1f003"><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="org67a8816" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="org66d53a0" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -592,8 +592,8 @@ given in Cartesian \((x,y,z)\) format.
</div>
</div>
<div id="outline-container-orgb37c888" class="outline-2">
<h2 id="orgb37c888"><span class="section-number-2">4</span> Effective core potentials (ecp group)</h2>
<div id="outline-container-org2c65ce1" class="outline-2">
<h2 id="org2c65ce1"><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
@ -626,7 +626,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="org9269b2e" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="org9c04814" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -724,8 +724,8 @@ The latter causes issues when written before <code>ang_mom</code> in the TREXIO
</p>
</div>
<div id="outline-container-org28dc216" class="outline-3">
<h3 id="org28dc216"><span class="section-number-3">4.1</span> Example</h3>
<div id="outline-container-org036856e" class="outline-3">
<h3 id="org036856e"><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
@ -788,8 +788,8 @@ power = [
</div>
</div>
<div id="outline-container-org71b107d" class="outline-2">
<h2 id="org71b107d"><span class="section-number-2">5</span> Basis set (basis group)</h2>
<div id="outline-container-org4d2d6f7" class="outline-2">
<h2 id="org4d2d6f7"><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
@ -842,7 +842,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="org812a24e" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="orgfad5aba" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -936,8 +936,8 @@ All the basis set parameters are stored in one-dimensional arrays:
</table>
</div>
<div id="outline-container-orge40c5a3" class="outline-3">
<h3 id="orge40c5a3"><span class="section-number-3">5.1</span> Example</h3>
<div id="outline-container-orgac93d3f" class="outline-3">
<h3 id="orgac93d3f"><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
@ -1015,8 +1015,8 @@ prim_factor =
</div>
</div>
<div id="outline-container-orgc3003f8" class="outline-2">
<h2 id="orgc3003f8"><span class="section-number-2">6</span> Atomic orbitals (ao group)</h2>
<div id="outline-container-org112ab53" class="outline-2">
<h2 id="org112ab53"><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
@ -1064,13 +1064,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="#org71b107d">Basis set</a> section) to \(\mathcal{N}_{z^2}\), which is the
the <a href="#org4d2d6f7">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="orgae201fd" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="orgcbe818f" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -1122,8 +1122,8 @@ introduced here should be \(\frac{\mathcal{N}_{xy}}{\mathcal{N}_{z^2}}\).
</table>
</div>
<div id="outline-container-orgd2c410f" class="outline-3">
<h3 id="ao_one_e"><a id="orgd2c410f"></a><span class="section-number-3">6.1</span> One-electron integrals (<code>ao_1e_int</code> group)</h3>
<div id="outline-container-orgba9b087" class="outline-3">
<h3 id="ao_one_e"><a id="orgba9b087"></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}}
@ -1141,7 +1141,7 @@ The one-electron integrals for a one-electron operator \(\hat{O}\) are
over atomic orbitals.
</p>
<table id="org997c646" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="orgb7db77d" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -1208,8 +1208,8 @@ over atomic orbitals.
</div>
</div>
<div id="outline-container-orgb676ab4" class="outline-3">
<h3 id="ao_two_e"><a id="orgb676ab4"></a><span class="section-number-3">6.2</span> Two-electron integrals (<code>ao_2e_int</code> group)</h3>
<div id="outline-container-org8a083a9" class="outline-3">
<h3 id="ao_two_e"><a id="org8a083a9"></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
@ -1230,7 +1230,7 @@ notation.
\mathbf{r}_j \vert)}{\vert \mathbf{r}_i - \mathbf{r}_j \vert} \] : electron-electron long range potential</li>
</ul>
<table id="org1f44d99" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="orgb5c9e93" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -1270,10 +1270,10 @@ notation.
</div>
</div>
<div id="outline-container-orgb60345f" class="outline-2">
<h2 id="orgb60345f"><span class="section-number-2">7</span> Molecular orbitals (mo group)</h2>
<div id="outline-container-org682b6be" class="outline-2">
<h2 id="org682b6be"><span class="section-number-2">7</span> Molecular orbitals (mo group)</h2>
<div class="outline-text-2" id="text-7">
<table id="orga97c5ef" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="orgbe38e34" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -1339,8 +1339,8 @@ notation.
</table>
</div>
<div id="outline-container-org34937b5" class="outline-3">
<h3 id="org34937b5"><span class="section-number-3">7.1</span> One-electron integrals (<code>mo_1e_int</code> group)</h3>
<div id="outline-container-org391cc5e" class="outline-3">
<h3 id="org391cc5e"><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
@ -1348,7 +1348,7 @@ The operators as the same as those defined in the
the basis of molecular orbitals.
</p>
<table id="orgf56d597" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="orge2f9716" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -1415,8 +1415,8 @@ the basis of molecular orbitals.
</div>
</div>
<div id="outline-container-orgf5e9adc" class="outline-3">
<h3 id="orgf5e9adc"><span class="section-number-3">7.2</span> Two-electron integrals (<code>mo_2e_int</code> group)</h3>
<div id="outline-container-orgd48d8cd" class="outline-3">
<h3 id="orgd48d8cd"><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
@ -1424,7 +1424,7 @@ The operators as the same as those defined in the
the basis of molecular orbitals.
</p>
<table id="org8282ddd" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="org37bfed6" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -1464,13 +1464,13 @@ the basis of molecular orbitals.
</div>
</div>
<div id="outline-container-org78840e7" class="outline-2">
<h2 id="org78840e7"><span class="section-number-2">8</span> <span class="todo TODO">TODO</span> Slater determinants</h2>
<div id="outline-container-org28c9343" class="outline-2">
<h2 id="org28c9343"><span class="section-number-2">8</span> <span class="todo TODO">TODO</span> Slater determinants</h2>
</div>
<div id="outline-container-org768d1c2" class="outline-2">
<h2 id="org768d1c2"><span class="section-number-2">9</span> <span class="todo TODO">TODO</span> Reduced density matrices (rdm group)</h2>
<div id="outline-container-orgb814863" class="outline-2">
<h2 id="orgb814863"><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="org3fb055c" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="orgff078dc" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -1525,7 +1525,7 @@ the basis of molecular orbitals.
</div>
<div id="postamble" class="status">
<p class="author">Author: TREX-CoE</p>
<p class="date">Created: 2021-11-18 Thu 13:13</p>
<p class="date">Created: 2021-11-18 Thu 13:35</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>