mirror of
https://github.com/TREX-CoE/trexio.git
synced 2024-11-03 20:54:07 +01:00
Deploying to gh-pages from @ TREX-CoE/trexio@1ba0876d81 🚀
This commit is contained in:
parent
5fe37d3077
commit
b4149f32cb
@ -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-09-24 Fri 10:10 -->
|
||||
<!-- 2021-09-24 Fri 10:46 -->
|
||||
<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>
|
||||
@ -349,7 +349,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-09-24 Fri 10:10</p>
|
||||
<p class="date">Created: 2021-09-24 Fri 10:46</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
16
Sparse.html
16
Sparse.html
@ -3,7 +3,7 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2021-09-24 Fri 10:10 -->
|
||||
<!-- 2021-09-24 Fri 10:46 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>‎</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="#orgf7553d5">1. Text back end</a></li>
|
||||
<li><a href="#org7400b18">2. HDF5 Back end</a></li>
|
||||
<li><a href="#orge1cb130">1. Text back end</a></li>
|
||||
<li><a href="#org4b614b1">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-orgf7553d5" class="outline-2">
|
||||
<h2 id="orgf7553d5"><span class="section-number-2">1</span> Text back end</h2>
|
||||
<div id="outline-container-orge1cb130" class="outline-2">
|
||||
<h2 id="orge1cb130"><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-org7400b18" class="outline-2">
|
||||
<h2 id="org7400b18"><span class="section-number-2">2</span> HDF5 Back end</h2>
|
||||
<div id="outline-container-org4b614b1" class="outline-2">
|
||||
<h2 id="org4b614b1"><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 > nmax, we need to extend the dataset.
|
||||
</div>
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="date">Created: 2021-09-24 Fri 10:10</p>
|
||||
<p class="date">Created: 2021-09-24 Fri 10:46</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -3,7 +3,7 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2021-09-24 Fri 10:10 -->
|
||||
<!-- 2021-09-24 Fri 10:46 -->
|
||||
<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>
|
||||
@ -349,7 +349,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-09-24 Fri 10:10</p>
|
||||
<p class="date">Created: 2021-09-24 Fri 10:46</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -3,7 +3,7 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2021-09-24 Fri 10:10 -->
|
||||
<!-- 2021-09-24 Fri 10:46 -->
|
||||
<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>
|
||||
@ -339,125 +339,125 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org8333c1d">1. Coding conventions</a>
|
||||
<li><a href="#org1e9450f">1. Coding conventions</a>
|
||||
<ul>
|
||||
<li><a href="#org86411e7">1.1. Memory allocation</a></li>
|
||||
<li><a href="#orga29988b">1.1. Memory allocation</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgfaa6909">2. Front end</a>
|
||||
<li><a href="#org6d65809">2. Front end</a>
|
||||
<ul>
|
||||
<li><a href="#org500c687">2.1. Error handling</a>
|
||||
<li><a href="#org3f51c78">2.1. Error handling</a>
|
||||
<ul>
|
||||
<li><a href="#org33d43d5">2.1.1. Decoding errors</a>
|
||||
<li><a href="#org6d78946">2.1.1. Decoding errors</a>
|
||||
<ul>
|
||||
<li><a href="#org5790b7d">2.1.1.1. C source code</a></li>
|
||||
<li><a href="#org2e427fd">2.1.1.2. Fortran interface</a></li>
|
||||
<li><a href="#orgc234861">2.1.1.3. Python interface</a></li>
|
||||
<li><a href="#orgfe481b7">2.1.1.1. C source code</a></li>
|
||||
<li><a href="#orgc0bbd34">2.1.1.2. Fortran interface</a></li>
|
||||
<li><a href="#org40cd4d1">2.1.1.3. Python interface</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org72c0c90">2.2. Back ends</a>
|
||||
<li><a href="#org0cb560b">2.2. Back ends</a>
|
||||
<ul>
|
||||
<li><a href="#orga37141f">2.2.1. C</a></li>
|
||||
<li><a href="#org6ed185d">2.2.2. Fortran</a></li>
|
||||
<li><a href="#org98c597b">2.2.3. Python</a></li>
|
||||
<li><a href="#org4176049">2.2.1. C</a></li>
|
||||
<li><a href="#org0d24ea9">2.2.2. Fortran</a></li>
|
||||
<li><a href="#org08d7364">2.2.3. Python</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org0c779da">2.3. Read/write behavior</a></li>
|
||||
<li><a href="#orga0ee255">2.4. TREXIO file type</a>
|
||||
<li><a href="#org1039f68">2.3. Read/write behavior</a></li>
|
||||
<li><a href="#orgd0e1b37">2.4. TREXIO file type</a>
|
||||
<ul>
|
||||
<li><a href="#orgd59c29e">2.4.1. TREXIO<sub>File</sub> Python class</a></li>
|
||||
<li><a href="#org3f19ed2">2.4.1. TREXIO<sub>File</sub> Python class</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org24d23e9">2.5. Polymorphism of the file handle</a></li>
|
||||
<li><a href="#orge917409">2.6. File opening</a>
|
||||
<li><a href="#org9d103df">2.5. Polymorphism of the file handle</a></li>
|
||||
<li><a href="#org855a482">2.6. File opening</a>
|
||||
<ul>
|
||||
<li><a href="#org416f068">2.6.1. C</a></li>
|
||||
<li><a href="#org44ce5c3">2.6.2. Fortran</a></li>
|
||||
<li><a href="#orgfbcedfc">2.6.3. Python</a></li>
|
||||
<li><a href="#org67ab986">2.6.4. Zero-based versus one-based arrays of indices</a></li>
|
||||
<li><a href="#org877c568">2.6.1. C</a></li>
|
||||
<li><a href="#org704f1fb">2.6.2. Fortran</a></li>
|
||||
<li><a href="#orga1bd242">2.6.3. Python</a></li>
|
||||
<li><a href="#orgc600c47">2.6.4. Zero-based versus one-based arrays of indices</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org4a50e2f">2.7. File closing</a>
|
||||
<li><a href="#orgd5053ed">2.7. File closing</a>
|
||||
<ul>
|
||||
<li><a href="#org47cf699">2.7.1. C</a></li>
|
||||
<li><a href="#org76b3ace">2.7.2. Fortran</a></li>
|
||||
<li><a href="#orgb20ec13">2.7.3. Python</a></li>
|
||||
<li><a href="#org6dd25e6">2.7.1. C</a></li>
|
||||
<li><a href="#orgae99e4b">2.7.2. Fortran</a></li>
|
||||
<li><a href="#org397e967">2.7.3. Python</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgb6c5610">3. Templates for front end</a>
|
||||
<li><a href="#orgc9cf295">3. Templates for front end</a>
|
||||
<ul>
|
||||
<li><a href="#orgfd46f6b">3.1. Description</a></li>
|
||||
<li><a href="#orgf5b0ec7">3.2. Templates for front end has/read/write a single numerical attribute</a>
|
||||
<li><a href="#org80f6482">3.1. Description</a></li>
|
||||
<li><a href="#org5f19b1f">3.2. Templates for front end has/read/write a single numerical attribute</a>
|
||||
<ul>
|
||||
<li><a href="#org208fee4">3.2.1. Introduction</a></li>
|
||||
<li><a href="#org2365b3e">3.2.2. C templates for front end</a>
|
||||
<li><a href="#org939f045">3.2.1. Introduction</a></li>
|
||||
<li><a href="#org50552af">3.2.2. C templates for front end</a>
|
||||
<ul>
|
||||
<li><a href="#org6b47a3b">3.2.2.1. Function declarations</a></li>
|
||||
<li><a href="#org237c62c">3.2.2.2. Source code for double precision functions</a></li>
|
||||
<li><a href="#org999d6c3">3.2.2.3. Source code for single precision functions</a></li>
|
||||
<li><a href="#org26d8210">3.2.2.4. Source code for default functions</a></li>
|
||||
<li><a href="#orgf561b12">3.2.2.1. Function declarations</a></li>
|
||||
<li><a href="#orgc963541">3.2.2.2. Source code for double precision functions</a></li>
|
||||
<li><a href="#org6c066bb">3.2.2.3. Source code for single precision functions</a></li>
|
||||
<li><a href="#org6cf7937">3.2.2.4. Source code for default functions</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgf2cbdf2">3.2.3. Fortran templates for front end</a></li>
|
||||
<li><a href="#orge5872bb">3.2.4. Python templates for front end</a></li>
|
||||
<li><a href="#org9a40037">3.2.3. Fortran templates for front end</a></li>
|
||||
<li><a href="#org7ea777a">3.2.4. Python templates for front end</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgd2ea031">3.3. Templates for front end has/read/write a dataset of numerical data</a>
|
||||
<li><a href="#org75cb8fd">3.3. Templates for front end has/read/write a dataset of numerical data</a>
|
||||
<ul>
|
||||
<li><a href="#orgee0739a">3.3.1. Introduction</a></li>
|
||||
<li><a href="#orgdc30ab3">3.3.2. C templates for front end</a>
|
||||
<li><a href="#org6a86c77">3.3.1. Introduction</a></li>
|
||||
<li><a href="#org7995460">3.3.2. C templates for front end</a>
|
||||
<ul>
|
||||
<li><a href="#org201267c">3.3.2.1. Function declarations</a></li>
|
||||
<li><a href="#org7f2264b">3.3.2.2. Source code for double precision functions</a></li>
|
||||
<li><a href="#org3eb7e15">3.3.2.3. Source code for single precision functions</a></li>
|
||||
<li><a href="#org0486967">3.3.2.4. Source code for memory-safe functions</a></li>
|
||||
<li><a href="#orgbc3f092">3.3.2.5. Source code for default functions</a></li>
|
||||
<li><a href="#orgc16256d">3.3.2.1. Function declarations</a></li>
|
||||
<li><a href="#org7d5fb95">3.3.2.2. Source code for double precision functions</a></li>
|
||||
<li><a href="#orgb4481bd">3.3.2.3. Source code for single precision functions</a></li>
|
||||
<li><a href="#orgc53c702">3.3.2.4. Source code for memory-safe functions</a></li>
|
||||
<li><a href="#org3233da0">3.3.2.5. Source code for default functions</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org1f61d7e">3.3.3. Fortran templates for front end</a></li>
|
||||
<li><a href="#orge2bfe6a">3.3.4. Python templates for front end</a></li>
|
||||
<li><a href="#orgd35b657">3.3.3. Fortran templates for front end</a></li>
|
||||
<li><a href="#org2d5a7b1">3.3.4. Python templates for front end</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org659f3c1">3.4. Sparse data structures</a></li>
|
||||
<li><a href="#org87def1b">3.5. Templates for front end has/read/write a dataset of strings</a>
|
||||
<li><a href="#org5bf7e26">3.4. Sparse data structures</a></li>
|
||||
<li><a href="#orgba88ff0">3.5. Templates for front end has/read/write a dataset of strings</a>
|
||||
<ul>
|
||||
<li><a href="#orgb0a00cb">3.5.1. Introduction</a></li>
|
||||
<li><a href="#org3488fe4">3.5.2. C templates for front end</a>
|
||||
<li><a href="#org46dc1b8">3.5.1. Introduction</a></li>
|
||||
<li><a href="#org70d1119">3.5.2. C templates for front end</a>
|
||||
<ul>
|
||||
<li><a href="#org47e3782">3.5.2.1. Function declarations</a></li>
|
||||
<li><a href="#orge7a31a7">3.5.2.2. Source code for default functions</a></li>
|
||||
<li><a href="#orgdcdd9cb">3.5.2.1. Function declarations</a></li>
|
||||
<li><a href="#orgf82cf7f">3.5.2.2. Source code for default functions</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgeb16281">3.5.3. Fortran templates for front end</a></li>
|
||||
<li><a href="#org4d12235">3.5.4. Python templates for front end</a></li>
|
||||
<li><a href="#orgedee2e5">3.5.3. Fortran templates for front end</a></li>
|
||||
<li><a href="#org78926b2">3.5.4. Python templates for front end</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orge4feb79">3.6. Templates for front end has/read/write a single string attribute</a>
|
||||
<li><a href="#org46ad0f6">3.6. Templates for front end has/read/write a single string attribute</a>
|
||||
<ul>
|
||||
<li><a href="#orgc77a321">3.6.1. Introduction</a></li>
|
||||
<li><a href="#orgf7b8294">3.6.2. C templates for front end</a>
|
||||
<li><a href="#orge8d4ce0">3.6.1. Introduction</a></li>
|
||||
<li><a href="#org747cee1">3.6.2. C templates for front end</a>
|
||||
<ul>
|
||||
<li><a href="#org14f3700">3.6.2.1. Function declarations</a></li>
|
||||
<li><a href="#orgd07b730">3.6.2.2. Source code for default functions</a></li>
|
||||
<li><a href="#org9d6776c">3.6.2.1. Function declarations</a></li>
|
||||
<li><a href="#org8ec874b">3.6.2.2. Source code for default functions</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org862805e">3.6.3. Fortran templates for front end</a></li>
|
||||
<li><a href="#org2d66187">3.6.4. Python templates for front end</a></li>
|
||||
<li><a href="#org272d73f">3.6.3. Fortran templates for front end</a></li>
|
||||
<li><a href="#org3bd04ca">3.6.4. Python templates for front end</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgbfd4c79">4. Fortran helper/wrapper functions</a></li>
|
||||
<li><a href="#orgd568f3c">4. Fortran helper/wrapper functions</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org8333c1d" class="outline-2">
|
||||
<h2 id="org8333c1d"><span class="section-number-2">1</span> Coding conventions</h2>
|
||||
<div id="outline-container-org1e9450f" class="outline-2">
|
||||
<h2 id="org1e9450f"><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>
|
||||
@ -472,8 +472,8 @@ for the JavaScript code in this tag.
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org86411e7" class="outline-3">
|
||||
<h3 id="org86411e7"><span class="section-number-3">1.1</span> Memory allocation</h3>
|
||||
<div id="outline-container-orga29988b" class="outline-3">
|
||||
<h3 id="orga29988b"><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
|
||||
@ -508,8 +508,8 @@ The maximum string size for the filenames is 4096 characters.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgfaa6909" class="outline-2">
|
||||
<h2 id="orgfaa6909"><span class="section-number-2">2</span> Front end</h2>
|
||||
<div id="outline-container-org6d65809" class="outline-2">
|
||||
<h2 id="org6d65809"><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.
|
||||
@ -517,10 +517,10 @@ TREXIO front end is modular, which simplifies implementation of new back ends.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org500c687" class="outline-3">
|
||||
<h3 id="org500c687"><span class="section-number-3">2.1</span> Error handling</h3>
|
||||
<div id="outline-container-org3f51c78" class="outline-3">
|
||||
<h3 id="org3f51c78"><span class="section-number-3">2.1</span> Error handling</h3>
|
||||
<div class="outline-text-3" id="text-2-1">
|
||||
<table id="orgca665e1" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org7932333" 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-org33d43d5" class="outline-4">
|
||||
<h4 id="org33d43d5"><span class="section-number-4">2.1.1</span> Decoding errors</h4>
|
||||
<div id="outline-container-org6d78946" class="outline-4">
|
||||
<h4 id="org6d78946"><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-org5790b7d" class="outline-5">
|
||||
<h5 id="org5790b7d"><span class="section-number-5">2.1.1.1</span> C source code</h5>
|
||||
<div id="outline-container-orgfe481b7" class="outline-5">
|
||||
<h5 id="orgfe481b7"><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>*
|
||||
@ -872,8 +872,8 @@ The text strings are extracted from the previous table.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org2e427fd" class="outline-5">
|
||||
<h5 id="org2e427fd"><span class="section-number-5">2.1.1.2</span> Fortran interface</h5>
|
||||
<div id="outline-container-orgc0bbd34" class="outline-5">
|
||||
<h5 id="orgc0bbd34"><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>
|
||||
@ -889,8 +889,8 @@ The text strings are extracted from the previous table.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgc234861" class="outline-5">
|
||||
<h5 id="orgc234861"><span class="section-number-5">2.1.1.3</span> Python interface</h5>
|
||||
<div id="outline-container-org40cd4d1" class="outline-5">
|
||||
<h5 id="org40cd4d1"><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>):
|
||||
@ -929,8 +929,8 @@ The text strings are extracted from the previous table.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org72c0c90" class="outline-3">
|
||||
<h3 id="org72c0c90"><span class="section-number-3">2.2</span> Back ends</h3>
|
||||
<div id="outline-container-org0cb560b" class="outline-3">
|
||||
<h3 id="org0cb560b"><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:
|
||||
@ -954,8 +954,8 @@ lines that correspond to the <code>TREXIO_JSON</code> back end (not implemented
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orga37141f" class="outline-4">
|
||||
<h4 id="orga37141f"><span class="section-number-4">2.2.1</span> C</h4>
|
||||
<div id="outline-container-org4176049" class="outline-4">
|
||||
<h4 id="org4176049"><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>;
|
||||
@ -971,8 +971,8 @@ lines that correspond to the <code>TREXIO_JSON</code> back end (not implemented
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6ed185d" class="outline-4">
|
||||
<h4 id="org6ed185d"><span class="section-number-4">2.2.2</span> Fortran</h4>
|
||||
<div id="outline-container-org0d24ea9" class="outline-4">
|
||||
<h4 id="org0d24ea9"><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>
|
||||
@ -984,8 +984,8 @@ lines that correspond to the <code>TREXIO_JSON</code> back end (not implemented
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org98c597b" class="outline-4">
|
||||
<h4 id="org98c597b"><span class="section-number-4">2.2.3</span> Python</h4>
|
||||
<div id="outline-container-org08d7364" class="outline-4">
|
||||
<h4 id="org08d7364"><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>
|
||||
@ -999,8 +999,8 @@ lines that correspond to the <code>TREXIO_JSON</code> back end (not implemented
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org0c779da" class="outline-3">
|
||||
<h3 id="org0c779da"><span class="section-number-3">2.3</span> Read/write behavior</h3>
|
||||
<div id="outline-container-org1039f68" class="outline-3">
|
||||
<h3 id="org1039f68"><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
|
||||
@ -1028,8 +1028,8 @@ concurrent programs, the behavior is not specified.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-orga0ee255" class="outline-3">
|
||||
<h3 id="orga0ee255"><span class="section-number-3">2.4</span> TREXIO file type</h3>
|
||||
<div id="outline-container-orgd0e1b37" class="outline-3">
|
||||
<h3 id="orgd0e1b37"><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
|
||||
@ -1063,8 +1063,8 @@ TREXIO files will have as a first argument the TREXIO file handle.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd59c29e" class="outline-4">
|
||||
<h4 id="orgd59c29e"><span class="section-number-4">2.4.1</span> TREXIO<sub>File</sub> Python class</h4>
|
||||
<div id="outline-container-org3f19ed2" class="outline-4">
|
||||
<h4 id="org3f19ed2"><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>:
|
||||
@ -1137,8 +1137,8 @@ TREXIO files will have as a first argument the TREXIO file handle.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org24d23e9" class="outline-3">
|
||||
<h3 id="org24d23e9"><span class="section-number-3">2.5</span> Polymorphism of the file handle</h3>
|
||||
<div id="outline-container-org9d103df" class="outline-3">
|
||||
<h3 id="org9d103df"><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
|
||||
@ -1157,8 +1157,8 @@ corresponding types for all back ends can be safely casted to
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge917409" class="outline-3">
|
||||
<h3 id="orge917409"><span class="section-number-3">2.6</span> File opening</h3>
|
||||
<div id="outline-container-org855a482" class="outline-3">
|
||||
<h3 id="org855a482"><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.
|
||||
@ -1197,23 +1197,30 @@ renaming the <code>.txt</code> data files.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org416f068" class="outline-4">
|
||||
<h4 id="org416f068"><span class="section-number-4">2.6.1</span> C</h4>
|
||||
<div id="outline-container-org877c568" class="outline-4">
|
||||
<h4 id="org877c568"><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>*
|
||||
<span style="color: #0000ff;">trexio_open</span>(<span style="color: #a020f0;">const</span> <span style="color: #228b22;">char</span>* <span style="color: #a0522d;">file_name</span>, <span style="color: #a020f0;">const</span> <span style="color: #228b22;">char</span> <span style="color: #a0522d;">mode</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">back_end_t</span> <span style="color: #a0522d;">back_end</span>)
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">back_end_t</span> <span style="color: #a0522d;">back_end</span>, <span style="color: #228b22;">trexio_exit_code</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">rc_open</span>)
|
||||
{
|
||||
|
||||
<span style="color: #a020f0;">if</span> (file_name == <span style="color: #008b8b;">NULL</span>) <span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
|
||||
<span style="color: #a020f0;">if</span> (file_name[0] == <span style="color: #8b2252;">'\0'</span>) <span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
|
||||
<span style="color: #a020f0;">if</span> (file_name == <span style="color: #008b8b;">NULL</span> || file_name[0] == <span style="color: #8b2252;">'\0'</span>) {
|
||||
<span style="color: #a020f0;">if</span> (rc_open != <span style="color: #008b8b;">NULL</span>) *rc_open = TREXIO_INVALID_ARG_1;
|
||||
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
|
||||
}
|
||||
/* <span style="color: #b22222;">Check overflow in file_name </span>*/
|
||||
|
||||
<span style="color: #a020f0;">if</span> (back_end < 0) <span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
|
||||
<span style="color: #a020f0;">if</span> (back_end >= TREXIO_INVALID_BACK_END) <span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
|
||||
<span style="color: #a020f0;">if</span> (back_end < 0 || back_end >= TREXIO_INVALID_BACK_END) {
|
||||
<span style="color: #a020f0;">if</span> (rc_open != <span style="color: #008b8b;">NULL</span>) *rc_open = TREXIO_INVALID_ARG_3;
|
||||
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
|
||||
}
|
||||
|
||||
<span style="color: #a020f0;">if</span> (mode != <span style="color: #8b2252;">'r'</span> && mode != <span style="color: #8b2252;">'w'</span>) <span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
|
||||
<span style="color: #a020f0;">if</span> (mode != <span style="color: #8b2252;">'r'</span> && mode != <span style="color: #8b2252;">'w'</span>) {
|
||||
<span style="color: #a020f0;">if</span> (rc_open != <span style="color: #008b8b;">NULL</span>) *rc_open = TREXIO_INVALID_ARG_2;
|
||||
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
|
||||
}
|
||||
|
||||
<span style="color: #228b22;">trexio_t</span>* <span style="color: #a0522d;">result</span> = <span style="color: #008b8b;">NULL</span>;
|
||||
<span style="color: #228b22;">void</span>* <span style="color: #a0522d;">result_tmp</span> = <span style="color: #008b8b;">NULL</span>;
|
||||
@ -1238,17 +1245,18 @@ renaming the <code>.txt</code> data files.
|
||||
|
||||
assert (result != <span style="color: #008b8b;">NULL</span>); /* <span style="color: #b22222;">TODO: Error handling </span>*/
|
||||
|
||||
|
||||
/* <span style="color: #b22222;">Data for the parent type </span>*/
|
||||
|
||||
strncpy(result->file_name, file_name, TREXIO_MAX_FILENAME_LENGTH);
|
||||
<span style="color: #a020f0;">if</span> (result->file_name[TREXIO_MAX_FILENAME_LENGTH-1] != <span style="color: #8b2252;">'\0'</span>) {
|
||||
<span style="color: #a020f0;">if</span> (rc_open != <span style="color: #008b8b;">NULL</span>) *rc_open = TREXIO_INVALID_ARG_1;
|
||||
free(result);
|
||||
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
|
||||
}
|
||||
|
||||
strncpy(result->version, PACKAGE_VERSION, 16);
|
||||
<span style="color: #a020f0;">if</span> (result->version[15] != <span style="color: #8b2252;">'\0'</span>) {
|
||||
<span style="color: #a020f0;">if</span> (rc_open != <span style="color: #008b8b;">NULL</span>) *rc_open = TREXIO_FAILURE;
|
||||
free(result);
|
||||
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
|
||||
}
|
||||
@ -1286,12 +1294,14 @@ renaming the <code>.txt</code> data files.
|
||||
}
|
||||
|
||||
<span style="color: #a020f0;">if</span> (rc != TREXIO_SUCCESS) {
|
||||
<span style="color: #a020f0;">if</span> (rc_open != <span style="color: #008b8b;">NULL</span>) *rc_open = TREXIO_OPEN_ERROR;
|
||||
free(result);
|
||||
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
|
||||
}
|
||||
|
||||
rc = trexio_has_metadata_package_version(result);
|
||||
<span style="color: #a020f0;">if</span> (rc == TREXIO_FAILURE) {
|
||||
<span style="color: #a020f0;">if</span> (rc_open != <span style="color: #008b8b;">NULL</span>) *rc_open = TREXIO_OPEN_ERROR;
|
||||
free(result);
|
||||
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
|
||||
}
|
||||
@ -1315,6 +1325,7 @@ renaming the <code>.txt</code> data files.
|
||||
}
|
||||
|
||||
<span style="color: #a020f0;">if</span> (rc != TREXIO_SUCCESS) {
|
||||
<span style="color: #a020f0;">if</span> (rc_open != <span style="color: #008b8b;">NULL</span>) *rc_open = TREXIO_OPEN_ERROR;
|
||||
free(result);
|
||||
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
|
||||
}
|
||||
@ -1341,10 +1352,12 @@ renaming the <code>.txt</code> data files.
|
||||
}
|
||||
|
||||
<span style="color: #a020f0;">if</span> (rc != TREXIO_SUCCESS) {
|
||||
<span style="color: #a020f0;">if</span> (rc_open != <span style="color: #008b8b;">NULL</span>) *rc_open = TREXIO_LOCK_ERROR;
|
||||
free(result);
|
||||
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
|
||||
}
|
||||
|
||||
<span style="color: #a020f0;">if</span> (rc_open != <span style="color: #008b8b;">NULL</span>) *rc_open = TREXIO_SUCCESS;
|
||||
<span style="color: #a020f0;">return</span> result;
|
||||
}
|
||||
</pre>
|
||||
@ -1352,17 +1365,18 @@ renaming the <code>.txt</code> data files.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org44ce5c3" class="outline-4">
|
||||
<h4 id="org44ce5c3"><span class="section-number-4">2.6.2</span> Fortran</h4>
|
||||
<div id="outline-container-org704f1fb" class="outline-4">
|
||||
<h4 id="org704f1fb"><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>
|
||||
<span style="color: #228b22;">integer</span>(8) <span style="color: #a020f0;">function</span> <span style="color: #0000ff;">trexio_open_c</span> (filename, mode, backend) <span style="color: #a020f0;">bind</span>(C, name=<span style="color: #8b2252;">"trexio_open"</span>)
|
||||
<span style="color: #228b22;">integer</span>(8) <span style="color: #a020f0;">function</span> <span style="color: #0000ff;">trexio_open_c</span> (filename, mode, backend, rc_open) <span style="color: #a020f0;">bind</span>(C, name=<span style="color: #8b2252;">"trexio_open"</span>)
|
||||
<span style="color: #a020f0;">use</span>, <span style="color: #a020f0;">intrinsic</span> :: <span style="color: #0000ff;">iso_c_binding</span>
|
||||
<span style="color: #a020f0;">import</span>
|
||||
<span style="color: #228b22;">character</span>(kind=<span style="color: #008b8b;">c_char</span>), <span style="color: #a020f0;">dimension</span>(*) ::<span style="color: #a0522d;"> filename</span>
|
||||
<span style="color: #228b22;">character</span>, <span style="color: #a020f0;">intent</span>(in), <span style="color: #a020f0;">value</span> ::<span style="color: #a0522d;"> mode</span>
|
||||
<span style="color: #228b22;">integer</span>(trexio_backend), <span style="color: #a020f0;">intent</span>(in), <span style="color: #a020f0;">value</span> ::<span style="color: #a0522d;"> backend</span>
|
||||
<span style="color: #228b22;">integer</span>(trexio_exit_code), <span style="color: #a020f0;">intent</span>(out) ::<span style="color: #a0522d;"> rc_open</span>
|
||||
<span style="color: #a020f0;">end function</span> <span style="color: #0000ff;">trexio_open_c</span>
|
||||
<span style="color: #a020f0;">end interface</span>
|
||||
</pre>
|
||||
@ -1370,8 +1384,8 @@ renaming the <code>.txt</code> data files.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgfbcedfc" class="outline-4">
|
||||
<h4 id="orgfbcedfc"><span class="section-number-4">2.6.3</span> Python</h4>
|
||||
<div id="outline-container-orga1bd242" class="outline-4">
|
||||
<h4 id="orga1bd242"><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>):
|
||||
@ -1396,11 +1410,22 @@ renaming the <code>.txt</code> data files.
|
||||
<span style="color: #8b2252;"> >>> trex_file = tr_open("example.h5", "w", TREXIO_HDF5)</span>
|
||||
<span style="color: #8b2252;"> """</span>
|
||||
|
||||
# <span style="color: #b22222;">The new trexio_open function is capable of returning error code which SWIG can append to the output trexio_s file struct</span>
|
||||
# <span style="color: #b22222;">However, if trexio_s* == NULL, then SWIG returns only an error code rc_open instead of a list [trexio_s, rc_open]</span>
|
||||
# <span style="color: #b22222;">Thus, the following try/except sequence is needed</span>
|
||||
<span style="color: #a020f0;">try</span>:
|
||||
<span style="color: #a0522d;">trexio_file</span> = pytr.trexio_open(file_name, mode, back_end)
|
||||
<span style="color: #a020f0;">assert</span> trexio_file <span style="color: #a020f0;">is</span> <span style="color: #a020f0;">not</span> <span style="color: #008b8b;">None</span>
|
||||
<span style="color: #a0522d;">return_obj</span> = pytr.trexio_open(file_name, mode, back_end)
|
||||
<span style="color: #a020f0;">assert</span> return_obj <span style="color: #a020f0;">is</span> <span style="color: #a020f0;">not</span> <span style="color: #008b8b;">None</span>
|
||||
<span style="color: #a020f0;">if</span> <span style="color: #483d8b;">isinstance</span>(return_obj, <span style="color: #483d8b;">int</span>):
|
||||
<span style="color: #a020f0;">raise</span> Error(return_obj)
|
||||
<span style="color: #a020f0;">else</span>:
|
||||
<span style="color: #a0522d;">rc_open</span> = return_obj[1]
|
||||
# <span style="color: #b22222;">this is a sanity check in case the code evolves and SWIG issue is patched</span>
|
||||
<span style="color: #a020f0;">if</span> rc_open == TREXIO_SUCCESS:
|
||||
<span style="color: #a0522d;">trexio_file</span> = return_obj[0]
|
||||
<span style="color: #a020f0;">assert</span> trexio_file <span style="color: #a020f0;">is</span> <span style="color: #a020f0;">not</span> <span style="color: #008b8b;">None</span>
|
||||
<span style="color: #a020f0;">except</span> <span style="color: #228b22;">AssertionError</span>:
|
||||
<span style="color: #a020f0;">raise</span> <span style="color: #228b22;">Exception</span>(f<span style="color: #8b2252;">"Could not open TREXIO file {file_name} using trexio_open function. Please make sure that there are no typos in the file name."</span>)
|
||||
<span style="color: #a020f0;">raise</span> <span style="color: #228b22;">Exception</span>(f<span style="color: #8b2252;">"Could not open TREXIO file {file_name} using trexio_open function. The return value is None (NULL pointer)."</span>)
|
||||
|
||||
<span style="color: #a020f0;">return</span> trexio_file
|
||||
</pre>
|
||||
@ -1408,8 +1433,8 @@ renaming the <code>.txt</code> data files.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org67ab986" class="outline-4">
|
||||
<h4 id="org67ab986"><span class="section-number-4">2.6.4</span> Zero-based versus one-based arrays of indices</h4>
|
||||
<div id="outline-container-orgc600c47" class="outline-4">
|
||||
<h4 id="orgc600c47"><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
|
||||
@ -1442,8 +1467,8 @@ know if we need to shift by 1 arrays of indices.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org4a50e2f" class="outline-3">
|
||||
<h3 id="org4a50e2f"><span class="section-number-3">2.7</span> File closing</h3>
|
||||
<div id="outline-container-orgd5053ed" class="outline-3">
|
||||
<h3 id="orgd5053ed"><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.
|
||||
@ -1460,8 +1485,8 @@ output:
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org47cf699" class="outline-4">
|
||||
<h4 id="org47cf699"><span class="section-number-4">2.7.1</span> C</h4>
|
||||
<div id="outline-container-org6dd25e6" class="outline-4">
|
||||
<h4 id="org6dd25e6"><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>
|
||||
@ -1532,8 +1557,8 @@ output:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org76b3ace" class="outline-4">
|
||||
<h4 id="org76b3ace"><span class="section-number-4">2.7.2</span> Fortran</h4>
|
||||
<div id="outline-container-orgae99e4b" class="outline-4">
|
||||
<h4 id="orgae99e4b"><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>
|
||||
@ -1547,8 +1572,8 @@ output:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgb20ec13" class="outline-4">
|
||||
<h4 id="orgb20ec13"><span class="section-number-4">2.7.3</span> Python</h4>
|
||||
<div id="outline-container-org397e967" class="outline-4">
|
||||
<h4 id="org397e967"><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):
|
||||
@ -1570,12 +1595,12 @@ output:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgb6c5610" class="outline-2">
|
||||
<h2 id="orgb6c5610"><span class="section-number-2">3</span> Templates for front end</h2>
|
||||
<div id="outline-container-orgc9cf295" class="outline-2">
|
||||
<h2 id="orgc9cf295"><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-orgfd46f6b" class="outline-3">
|
||||
<h3 id="orgfd46f6b"><span class="section-number-3">3.1</span> Description</h3>
|
||||
<div id="outline-container-org80f6482" class="outline-3">
|
||||
<h3 id="org80f6482"><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>:
|
||||
@ -1796,12 +1821,12 @@ value will result in <code>TREXIO_INVALID_ARG_2</code> exit code.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf5b0ec7" class="outline-3">
|
||||
<h3 id="orgf5b0ec7"><span class="section-number-3">3.2</span> Templates for front end has/read/write a single numerical attribute</h3>
|
||||
<div id="outline-container-org5f19b1f" class="outline-3">
|
||||
<h3 id="org5f19b1f"><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-org208fee4" class="outline-4">
|
||||
<h4 id="org208fee4"><span class="section-number-4">3.2.1</span> Introduction</h4>
|
||||
<div id="outline-container-org939f045" class="outline-4">
|
||||
<h4 id="org939f045"><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,
|
||||
@ -1872,8 +1897,8 @@ namely single value of int/float types.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org2365b3e" class="outline-4">
|
||||
<h4 id="org2365b3e"><span class="section-number-4">3.2.2</span> C templates for front end</h4>
|
||||
<div id="outline-container-org50552af" class="outline-4">
|
||||
<h4 id="org50552af"><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
|
||||
@ -1887,12 +1912,12 @@ precision (see Table above).
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6b47a3b" class="outline-5">
|
||||
<h5 id="org6b47a3b"><span class="section-number-5">3.2.2.1</span> Function declarations</h5>
|
||||
<div id="outline-container-orgf561b12" class="outline-5">
|
||||
<h5 id="orgf561b12"><span class="section-number-5">3.2.2.1</span> Function declarations</h5>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org237c62c" class="outline-5">
|
||||
<h5 id="org237c62c"><span class="section-number-5">3.2.2.2</span> Source code for double precision functions</h5>
|
||||
<div id="outline-container-orgc963541" class="outline-5">
|
||||
<h5 id="orgc963541"><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>
|
||||
@ -1953,8 +1978,8 @@ precision (see Table above).
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org999d6c3" class="outline-5">
|
||||
<h5 id="org999d6c3"><span class="section-number-5">3.2.2.3</span> Source code for single precision functions</h5>
|
||||
<div id="outline-container-org6c066bb" class="outline-5">
|
||||
<h5 id="org6c066bb"><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>
|
||||
@ -2022,8 +2047,8 @@ precision (see Table above).
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org26d8210" class="outline-5">
|
||||
<h5 id="org26d8210"><span class="section-number-5">3.2.2.4</span> Source code for default functions</h5>
|
||||
<div id="outline-container-org6cf7937" class="outline-5">
|
||||
<h5 id="org6cf7937"><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>
|
||||
@ -2076,8 +2101,8 @@ precision (see Table above).
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf2cbdf2" class="outline-4">
|
||||
<h4 id="orgf2cbdf2"><span class="section-number-4">3.2.3</span> Fortran templates for front end</h4>
|
||||
<div id="outline-container-org9a40037" class="outline-4">
|
||||
<h4 id="org9a40037"><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.
|
||||
@ -2162,8 +2187,8 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge5872bb" class="outline-4">
|
||||
<h4 id="orge5872bb"><span class="section-number-4">3.2.4</span> Python templates for front end</h4>
|
||||
<div id="outline-container-org7ea777a" class="outline-4">
|
||||
<h4 id="org7ea777a"><span class="section-number-4">3.2.4</span> Python templates for front end</h4>
|
||||
<div class="outline-text-4" id="text-3-2-4">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-python"><span style="color: #a020f0;">def</span> <span style="color: #0000ff;">write_</span>$group_num$(trexio_file, num_w: $group_num_py_dtype$) -> <span style="color: #008b8b;">None</span>:
|
||||
@ -2248,12 +2273,12 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd2ea031" class="outline-3">
|
||||
<h3 id="orgd2ea031"><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-org75cb8fd" class="outline-3">
|
||||
<h3 id="org75cb8fd"><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-orgee0739a" class="outline-4">
|
||||
<h4 id="orgee0739a"><span class="section-number-4">3.3.1</span> Introduction</h4>
|
||||
<div id="outline-container-org6a86c77" class="outline-4">
|
||||
<h4 id="org6a86c77"><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.
|
||||
@ -2335,8 +2360,8 @@ This section concerns API calls related to datasets.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgdc30ab3" class="outline-4">
|
||||
<h4 id="orgdc30ab3"><span class="section-number-4">3.3.2</span> C templates for front end</h4>
|
||||
<div id="outline-container-org7995460" class="outline-4">
|
||||
<h4 id="org7995460"><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.
|
||||
@ -2347,13 +2372,13 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org201267c" class="outline-5">
|
||||
<h5 id="org201267c"><span class="section-number-5">3.3.2.1</span> Function declarations</h5>
|
||||
<div id="outline-container-orgc16256d" class="outline-5">
|
||||
<h5 id="orgc16256d"><span class="section-number-5">3.3.2.1</span> Function declarations</h5>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org7f2264b" class="outline-5">
|
||||
<h5 id="org7f2264b"><span class="section-number-5">3.3.2.2</span> Source code for double precision functions</h5>
|
||||
<div id="outline-container-org7d5fb95" class="outline-5">
|
||||
<h5 id="org7d5fb95"><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>
|
||||
@ -2481,8 +2506,8 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org3eb7e15" class="outline-5">
|
||||
<h5 id="org3eb7e15"><span class="section-number-5">3.3.2.3</span> Source code for single precision functions</h5>
|
||||
<div id="outline-container-orgb4481bd" class="outline-5">
|
||||
<h5 id="orgb4481bd"><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>
|
||||
@ -2623,11 +2648,11 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org0486967" class="outline-5">
|
||||
<h5 id="org0486967"><span class="section-number-5">3.3.2.4</span> Source code for memory-safe functions</h5>
|
||||
<div id="outline-container-orgc53c702" class="outline-5">
|
||||
<h5 id="orgc53c702"><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="org29a9bda"><span style="color: #228b22;">trexio_exit_code</span> <span style="color: #a0522d;">rc</span>;
|
||||
<pre class="src src-c" id="org5e1bc0d"><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>*/
|
||||
@ -2783,8 +2808,8 @@ rc = trexio_read_$group_dset_dim$_64(file, &($group_dset_dim$));
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgbc3f092" class="outline-5">
|
||||
<h5 id="orgbc3f092"><span class="section-number-5">3.3.2.5</span> Source code for default functions</h5>
|
||||
<div id="outline-container-org3233da0" class="outline-5">
|
||||
<h5 id="org3233da0"><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>
|
||||
@ -2858,8 +2883,8 @@ rc = trexio_read_$group_dset_dim$_64(file, &($group_dset_dim$));
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org1f61d7e" class="outline-4">
|
||||
<h4 id="org1f61d7e"><span class="section-number-4">3.3.3</span> Fortran templates for front end</h4>
|
||||
<div id="outline-container-orgd35b657" class="outline-4">
|
||||
<h4 id="orgd35b657"><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>.
|
||||
@ -2944,8 +2969,8 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge2bfe6a" class="outline-4">
|
||||
<h4 id="orge2bfe6a"><span class="section-number-4">3.3.4</span> Python templates for front end</h4>
|
||||
<div id="outline-container-org2d5a7b1" class="outline-4">
|
||||
<h4 id="org2d5a7b1"><span class="section-number-4">3.3.4</span> Python templates for front end</h4>
|
||||
<div class="outline-text-4" id="text-3-3-4">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-python"><span style="color: #a020f0;">def</span> <span style="color: #0000ff;">write_</span>$group_dset$(trexio_file, dset_w) -> <span style="color: #008b8b;">None</span>:
|
||||
@ -3140,8 +3165,8 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org659f3c1" class="outline-3">
|
||||
<h3 id="org659f3c1"><span class="section-number-3">3.4</span> Sparse data structures</h3>
|
||||
<div id="outline-container-org5bf7e26" class="outline-3">
|
||||
<h3 id="org5bf7e26"><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
|
||||
@ -3282,12 +3307,12 @@ For the values,
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org87def1b" class="outline-3">
|
||||
<h3 id="org87def1b"><span class="section-number-3">3.5</span> Templates for front end has/read/write a dataset of strings</h3>
|
||||
<div id="outline-container-orgba88ff0" class="outline-3">
|
||||
<h3 id="orgba88ff0"><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-orgb0a00cb" class="outline-4">
|
||||
<h4 id="orgb0a00cb"><span class="section-number-4">3.5.1</span> Introduction</h4>
|
||||
<div id="outline-container-org46dc1b8" class="outline-4">
|
||||
<h4 id="org46dc1b8"><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.
|
||||
@ -3327,8 +3352,8 @@ This section concerns API calls related to datasets of strings.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org3488fe4" class="outline-4">
|
||||
<h4 id="org3488fe4"><span class="section-number-4">3.5.2</span> C templates for front end</h4>
|
||||
<div id="outline-container-org70d1119" class="outline-4">
|
||||
<h4 id="org70d1119"><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
|
||||
@ -3336,12 +3361,12 @@ to/from the <code>TREXIO</code> file (except for <code>trexio_has_</code> functi
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org47e3782" class="outline-5">
|
||||
<h5 id="org47e3782"><span class="section-number-5">3.5.2.1</span> Function declarations</h5>
|
||||
<div id="outline-container-orgdcdd9cb" class="outline-5">
|
||||
<h5 id="orgdcdd9cb"><span class="section-number-5">3.5.2.1</span> Function declarations</h5>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge7a31a7" class="outline-5">
|
||||
<h5 id="orge7a31a7"><span class="section-number-5">3.5.2.2</span> Source code for default functions</h5>
|
||||
<div id="outline-container-orgf82cf7f" class="outline-5">
|
||||
<h5 id="orgf82cf7f"><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>
|
||||
@ -3583,8 +3608,8 @@ to/from the <code>TREXIO</code> file (except for <code>trexio_has_</code> functi
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgeb16281" class="outline-4">
|
||||
<h4 id="orgeb16281"><span class="section-number-4">3.5.3</span> Fortran templates for front end</h4>
|
||||
<div id="outline-container-orgedee2e5" class="outline-4">
|
||||
<h4 id="orgedee2e5"><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>.
|
||||
@ -3680,8 +3705,8 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org4d12235" class="outline-4">
|
||||
<h4 id="org4d12235"><span class="section-number-4">3.5.4</span> Python templates for front end</h4>
|
||||
<div id="outline-container-org78926b2" class="outline-4">
|
||||
<h4 id="org78926b2"><span class="section-number-4">3.5.4</span> Python templates for front end</h4>
|
||||
<div class="outline-text-4" id="text-3-5-4">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-python"><span style="color: #a020f0;">def</span> <span style="color: #0000ff;">write_</span>$group_dset$(trexio_file, dset_w: <span style="color: #483d8b;">list</span>) -> <span style="color: #008b8b;">None</span>:
|
||||
@ -3797,12 +3822,12 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge4feb79" class="outline-3">
|
||||
<h3 id="orge4feb79"><span class="section-number-3">3.6</span> Templates for front end has/read/write a single string attribute</h3>
|
||||
<div id="outline-container-org46ad0f6" class="outline-3">
|
||||
<h3 id="org46ad0f6"><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-orgc77a321" class="outline-4">
|
||||
<h4 id="orgc77a321"><span class="section-number-4">3.6.1</span> Introduction</h4>
|
||||
<div id="outline-container-orge8d4ce0" class="outline-4">
|
||||
<h4 id="orge8d4ce0"><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.
|
||||
@ -3842,16 +3867,16 @@ This section concerns API calls related to string attributes.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf7b8294" class="outline-4">
|
||||
<h4 id="orgf7b8294"><span class="section-number-4">3.6.2</span> C templates for front end</h4>
|
||||
<div id="outline-container-org747cee1" class="outline-4">
|
||||
<h4 id="org747cee1"><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-org14f3700" class="outline-5">
|
||||
<h5 id="org14f3700"><span class="section-number-5">3.6.2.1</span> Function declarations</h5>
|
||||
<div id="outline-container-org9d6776c" class="outline-5">
|
||||
<h5 id="org9d6776c"><span class="section-number-5">3.6.2.1</span> Function declarations</h5>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd07b730" class="outline-5">
|
||||
<h5 id="orgd07b730"><span class="section-number-5">3.6.2.2</span> Source code for default functions</h5>
|
||||
<div id="outline-container-org8ec874b" class="outline-5">
|
||||
<h5 id="org8ec874b"><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>
|
||||
@ -3951,8 +3976,8 @@ This section concerns API calls related to string attributes.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org862805e" class="outline-4">
|
||||
<h4 id="org862805e"><span class="section-number-4">3.6.3</span> Fortran templates for front end</h4>
|
||||
<div id="outline-container-org272d73f" class="outline-4">
|
||||
<h4 id="org272d73f"><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.
|
||||
@ -4029,8 +4054,8 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org2d66187" class="outline-4">
|
||||
<h4 id="org2d66187"><span class="section-number-4">3.6.4</span> Python templates for front end</h4>
|
||||
<div id="outline-container-org3bd04ca" class="outline-4">
|
||||
<h4 id="org3bd04ca"><span class="section-number-4">3.6.4</span> Python templates for front end</h4>
|
||||
<div class="outline-text-4" id="text-3-6-4">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-python"><span style="color: #a020f0;">def</span> <span style="color: #0000ff;">write_</span>$group_str$(trexio_file, str_w: <span style="color: #483d8b;">str</span>) -> <span style="color: #008b8b;">None</span>:
|
||||
@ -4120,8 +4145,8 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgbfd4c79" class="outline-2">
|
||||
<h2 id="orgbfd4c79"><span class="section-number-2">4</span> Fortran helper/wrapper functions</h2>
|
||||
<div id="outline-container-orgd568f3c" class="outline-2">
|
||||
<h2 id="orgd568f3c"><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.
|
||||
@ -4132,18 +4157,19 @@ Note, that Fortran interface calls the main <code>TREXIO</code> API, which is wr
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90"><span style="color: #a020f0;">contains</span>
|
||||
<span style="color: #228b22;">integer</span>(8) <span style="color: #a020f0;">function</span> <span style="color: #0000ff;">trexio_open</span> (filename, mode, backend)
|
||||
<span style="color: #228b22;">integer</span>(8) <span style="color: #a020f0;">function</span> <span style="color: #0000ff;">trexio_open</span> (filename, mode, backend, rc_open)
|
||||
<span style="color: #a020f0;">use</span>, <span style="color: #a020f0;">intrinsic</span> :: <span style="color: #0000ff;">iso_c_binding</span>, <span style="color: #a020f0;">only</span> : <span style="color: #008b8b;">c_null_char</span>
|
||||
<span style="color: #a020f0;">implicit</span> <span style="color: #228b22;">none</span>
|
||||
<span style="color: #228b22;">character</span>(len=*), <span style="color: #a020f0;">intent</span>(in) ::<span style="color: #a0522d;"> filename</span>
|
||||
<span style="color: #228b22;">character</span>, <span style="color: #a020f0;">intent</span>(in), <span style="color: #a020f0;">value</span> ::<span style="color: #a0522d;"> mode</span>
|
||||
<span style="color: #228b22;">integer</span>(trexio_backend), <span style="color: #a020f0;">intent</span>(in), <span style="color: #a020f0;">value</span> ::<span style="color: #a0522d;"> backend</span>
|
||||
<span style="color: #228b22;">integer</span>(trexio_exit_code), <span style="color: #a020f0;">intent</span>(out) ::<span style="color: #a0522d;"> rc_open</span>
|
||||
<span style="color: #228b22;">character</span>(len=<span style="color: #a020f0;">len_trim</span>(filename)+1) ::<span style="color: #a0522d;"> filename_c</span>
|
||||
<span style="color: #228b22;">integer</span> ::<span style="color: #a0522d;"> rc</span>
|
||||
<span style="color: #228b22;">integer</span>(trexio_exit_code) ::<span style="color: #a0522d;"> rc</span>
|
||||
|
||||
filename_c = <span style="color: #a020f0;">trim</span>(filename) // <span style="color: #008b8b;">c_null_char</span>
|
||||
trexio_open = trexio_open_c(filename_c, mode, backend)
|
||||
<span style="color: #a020f0;">if</span> (trexio_open == 0_8) <span style="color: #a020f0;">then</span>
|
||||
trexio_open = trexio_open_c(filename_c, mode, backend, rc_open)
|
||||
<span style="color: #a020f0;">if</span> (trexio_open == 0_8 <span style="color: #a020f0;">.or.</span> rc_open /= TREXIO_SUCCESS) <span style="color: #a020f0;">then</span>
|
||||
<span style="color: #a020f0;">return</span>
|
||||
<span style="color: #a020f0;">endif</span>
|
||||
rc = trexio_set_one_based(trexio_open)
|
||||
@ -4255,7 +4281,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-09-24 Fri 10:10</p>
|
||||
<p class="date">Created: 2021-09-24 Fri 10:46</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -3,7 +3,7 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2021-09-24 Fri 10:10 -->
|
||||
<!-- 2021-09-24 Fri 10:46 -->
|
||||
<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>
|
||||
@ -317,27 +317,27 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org6ce4ceb">1. HDF5 back end</a>
|
||||
<li><a href="#org4e238ff">1. HDF5 back end</a>
|
||||
<ul>
|
||||
<li><a href="#orgfa8475a">1.1. Template for HDF5 definitions</a></li>
|
||||
<li><a href="#org5add8c2">1.2. Template for HDF5 structures</a></li>
|
||||
<li><a href="#orged361ef">1.3. Template for HDF5 init/deinit</a></li>
|
||||
<li><a href="#orgad6dfa6">1.4. Template for HDF5 has/read/write the numerical attribute</a></li>
|
||||
<li><a href="#org9813459">1.5. Template for HDF5 has/read/write the dataset of numerical data</a></li>
|
||||
<li><a href="#orgf8babae">1.6. Template for HDF5 has/read/write the dataset of strings</a></li>
|
||||
<li><a href="#org36f25cd">1.7. Template for HDF5 has/read/write the string attribute</a></li>
|
||||
<li><a href="#org1902d20">1.1. Template for HDF5 definitions</a></li>
|
||||
<li><a href="#org8194f10">1.2. Template for HDF5 structures</a></li>
|
||||
<li><a href="#orgb28f387">1.3. Template for HDF5 init/deinit</a></li>
|
||||
<li><a href="#orgfaa8c6b">1.4. Template for HDF5 has/read/write the numerical attribute</a></li>
|
||||
<li><a href="#org8d8067d">1.5. Template for HDF5 has/read/write the dataset of numerical data</a></li>
|
||||
<li><a href="#org7989e0b">1.6. Template for HDF5 has/read/write the dataset of strings</a></li>
|
||||
<li><a href="#orgb4e071a">1.7. Template for HDF5 has/read/write the string attribute</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6ce4ceb" class="outline-2">
|
||||
<h2 id="org6ce4ceb"><span class="section-number-2">1</span> HDF5 back end</h2>
|
||||
<div id="outline-container-org4e238ff" class="outline-2">
|
||||
<h2 id="org4e238ff"><span class="section-number-2">1</span> HDF5 back end</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
</div>
|
||||
<div id="outline-container-orgfa8475a" class="outline-3">
|
||||
<h3 id="orgfa8475a"><span class="section-number-3">1.1</span> Template for HDF5 definitions</h3>
|
||||
<div id="outline-container-org1902d20" class="outline-3">
|
||||
<h3 id="org1902d20"><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>
|
||||
@ -349,8 +349,8 @@ for the JavaScript code in this tag.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org5add8c2" class="outline-3">
|
||||
<h3 id="org5add8c2"><span class="section-number-3">1.2</span> Template for HDF5 structures</h3>
|
||||
<div id="outline-container-org8194f10" class="outline-3">
|
||||
<h3 id="org8194f10"><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> {
|
||||
@ -364,8 +364,8 @@ for the JavaScript code in this tag.
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-orged361ef" class="outline-3">
|
||||
<h3 id="orged361ef"><span class="section-number-3">1.3</span> Template for HDF5 init/deinit</h3>
|
||||
<div id="outline-container-orgb28f387" class="outline-3">
|
||||
<h3 id="orgb28f387"><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>
|
||||
@ -445,8 +445,8 @@ for the JavaScript code in this tag.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgad6dfa6" class="outline-3">
|
||||
<h3 id="orgad6dfa6"><span class="section-number-3">1.4</span> Template for HDF5 has/read/write the numerical attribute</h3>
|
||||
<div id="outline-container-orgfaa8c6b" class="outline-3">
|
||||
<h3 id="orgfaa8c6b"><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>
|
||||
@ -540,8 +540,8 @@ for the JavaScript code in this tag.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org9813459" class="outline-3">
|
||||
<h3 id="org9813459"><span class="section-number-3">1.5</span> Template for HDF5 has/read/write the dataset of numerical data</h3>
|
||||
<div id="outline-container-org8d8067d" class="outline-3">
|
||||
<h3 id="org8d8067d"><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>
|
||||
@ -664,8 +664,8 @@ for the JavaScript code in this tag.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf8babae" class="outline-3">
|
||||
<h3 id="orgf8babae"><span class="section-number-3">1.6</span> Template for HDF5 has/read/write the dataset of strings</h3>
|
||||
<div id="outline-container-org7989e0b" class="outline-3">
|
||||
<h3 id="org7989e0b"><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>
|
||||
@ -870,8 +870,8 @@ for the JavaScript code in this tag.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org36f25cd" class="outline-3">
|
||||
<h3 id="org36f25cd"><span class="section-number-3">1.7</span> Template for HDF5 has/read/write the string attribute</h3>
|
||||
<div id="outline-container-orgb4e071a" class="outline-3">
|
||||
<h3 id="orgb4e071a"><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>
|
||||
@ -998,7 +998,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-09-24 Fri 10:10</p>
|
||||
<p class="date">Created: 2021-09-24 Fri 10:46</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -3,7 +3,7 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2021-09-24 Fri 10:10 -->
|
||||
<!-- 2021-09-24 Fri 10:46 -->
|
||||
<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>
|
||||
@ -317,26 +317,26 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#orgeb34938">1. TEXT back end</a>
|
||||
<li><a href="#org6948041">1. TEXT back end</a>
|
||||
<ul>
|
||||
<li><a href="#orgc48738a">1.1. Template for group-related structures in text back end</a></li>
|
||||
<li><a href="#org4eac29a">1.2. Template for general structure in text back end</a></li>
|
||||
<li><a href="#org68de1b7">1.3. Initialize function (constant part)</a></li>
|
||||
<li><a href="#org7c89560">1.4. Deinitialize function (templated part)</a></li>
|
||||
<li><a href="#org223d8cb">1.5. Template for text read struct</a></li>
|
||||
<li><a href="#orgac26166">1.6. Template for text flush struct</a></li>
|
||||
<li><a href="#org706ddf6">1.7. Template for text free memory</a></li>
|
||||
<li><a href="#orgb4c3557">1.8. Template for has/read/write the numerical attribute</a></li>
|
||||
<li><a href="#org863c47f">1.9. Template for has/read/write the dataset of numerical data</a></li>
|
||||
<li><a href="#org419e317">1.10. Template for has/read/write the dataset of strings</a></li>
|
||||
<li><a href="#org608a242">1.11. Template for has/read/write the string attribute</a></li>
|
||||
<li><a href="#org4d28c11">1.12. RDM struct (hard-coded)</a>
|
||||
<li><a href="#orgb3a4ee3">1.1. Template for group-related structures in text back end</a></li>
|
||||
<li><a href="#orga9c12f4">1.2. Template for general structure in text back end</a></li>
|
||||
<li><a href="#org198bd3b">1.3. Initialize function (constant part)</a></li>
|
||||
<li><a href="#org5f33f02">1.4. Deinitialize function (templated part)</a></li>
|
||||
<li><a href="#org3a85b88">1.5. Template for text read struct</a></li>
|
||||
<li><a href="#orgb8d9b4b">1.6. Template for text flush struct</a></li>
|
||||
<li><a href="#org820b858">1.7. Template for text free memory</a></li>
|
||||
<li><a href="#org3b50558">1.8. Template for has/read/write the numerical attribute</a></li>
|
||||
<li><a href="#orge0b0bc6">1.9. Template for has/read/write the dataset of numerical data</a></li>
|
||||
<li><a href="#org2133a0e">1.10. Template for has/read/write the dataset of strings</a></li>
|
||||
<li><a href="#org30e7044">1.11. Template for has/read/write the string attribute</a></li>
|
||||
<li><a href="#org025af16">1.12. RDM struct (hard-coded)</a>
|
||||
<ul>
|
||||
<li><a href="#org4395208">1.12.1. Read the complete struct</a></li>
|
||||
<li><a href="#org891a63c">1.12.2. Flush the complete struct</a></li>
|
||||
<li><a href="#org04b3416">1.12.3. Free memory</a></li>
|
||||
<li><a href="#orgb45b0ad">1.12.4. Read/Write the one<sub>e</sub> attribute</a></li>
|
||||
<li><a href="#orgd218b46">1.12.5. Read/Write the two<sub>e</sub> attribute</a></li>
|
||||
<li><a href="#org0f05042">1.12.1. Read the complete struct</a></li>
|
||||
<li><a href="#org8705c1b">1.12.2. Flush the complete struct</a></li>
|
||||
<li><a href="#orgbe964a5">1.12.3. Free memory</a></li>
|
||||
<li><a href="#org74e392f">1.12.4. Read/Write the one<sub>e</sub> attribute</a></li>
|
||||
<li><a href="#orged2ebb8">1.12.5. Read/Write the two<sub>e</sub> attribute</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@ -345,8 +345,8 @@ for the JavaScript code in this tag.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgeb34938" class="outline-2">
|
||||
<h2 id="orgeb34938"><span class="section-number-2">1</span> TEXT back end</h2>
|
||||
<div id="outline-container-org6948041" class="outline-2">
|
||||
<h2 id="org6948041"><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
|
||||
@ -367,8 +367,8 @@ The file is written when closed, or when the flush function is called.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgc48738a" class="outline-3">
|
||||
<h3 id="orgc48738a"><span class="section-number-3">1.1</span> Template for group-related structures in text back end</h3>
|
||||
<div id="outline-container-orgb3a4ee3" class="outline-3">
|
||||
<h3 id="orgb3a4ee3"><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 {
|
||||
@ -387,8 +387,8 @@ The file is written when closed, or when the flush function is called.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org4eac29a" class="outline-3">
|
||||
<h3 id="org4eac29a"><span class="section-number-3">1.2</span> Template for general structure in text back end</h3>
|
||||
<div id="outline-container-orga9c12f4" class="outline-3">
|
||||
<h3 id="orga9c12f4"><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> {
|
||||
@ -414,8 +414,8 @@ The file is written when closed, or when the flush function is called.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org68de1b7" class="outline-3">
|
||||
<h3 id="org68de1b7"><span class="section-number-3">1.3</span> Initialize function (constant part)</h3>
|
||||
<div id="outline-container-org198bd3b" class="outline-3">
|
||||
<h3 id="org198bd3b"><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>
|
||||
@ -516,8 +516,8 @@ The file is written when closed, or when the flush function is called.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org7c89560" class="outline-3">
|
||||
<h3 id="org7c89560"><span class="section-number-3">1.4</span> Deinitialize function (templated part)</h3>
|
||||
<div id="outline-container-org5f33f02" class="outline-3">
|
||||
<h3 id="org5f33f02"><span class="section-number-3">1.4</span> Deinitialize function (templated part)</h3>
|
||||
<div class="outline-text-3" id="text-1-4">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
||||
@ -542,8 +542,8 @@ The file is written when closed, or when the flush function is called.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org223d8cb" class="outline-3">
|
||||
<h3 id="org223d8cb"><span class="section-number-3">1.5</span> Template for text read struct</h3>
|
||||
<div id="outline-container-org3a85b88" class="outline-3">
|
||||
<h3 id="org3a85b88"><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*
|
||||
@ -837,8 +837,8 @@ trexio_text_read_$group$ (<span style="color: #228b22;">trexio_text_t</span>* <s
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgac26166" class="outline-3">
|
||||
<h3 id="orgac26166"><span class="section-number-3">1.6</span> Template for text flush struct</h3>
|
||||
<div id="outline-container-orgb8d9b4b" class="outline-3">
|
||||
<h3 id="orgb8d9b4b"><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>
|
||||
@ -903,8 +903,8 @@ trexio_text_read_$group$ (<span style="color: #228b22;">trexio_text_t</span>* <s
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org706ddf6" class="outline-3">
|
||||
<h3 id="org706ddf6"><span class="section-number-3">1.7</span> Template for text free memory</h3>
|
||||
<div id="outline-container-org820b858" class="outline-3">
|
||||
<h3 id="org820b858"><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.
|
||||
@ -949,8 +949,8 @@ Memory is allocated when reading. The following function frees memory.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgb4c3557" class="outline-3">
|
||||
<h3 id="orgb4c3557"><span class="section-number-3">1.8</span> Template for has/read/write the numerical attribute</h3>
|
||||
<div id="outline-container-org3b50558" class="outline-3">
|
||||
<h3 id="org3b50558"><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>
|
||||
@ -1013,8 +1013,8 @@ Memory is allocated when reading. The following function frees memory.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org863c47f" class="outline-3">
|
||||
<h3 id="org863c47f"><span class="section-number-3">1.9</span> Template for has/read/write the dataset of numerical data</h3>
|
||||
<div id="outline-container-orge0b0bc6" class="outline-3">
|
||||
<h3 id="orge0b0bc6"><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.
|
||||
@ -1110,8 +1110,8 @@ The <code>group_dset</code> array is assumed allocated with the appropriate size
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-org419e317" class="outline-3">
|
||||
<h3 id="org419e317"><span class="section-number-3">1.10</span> Template for has/read/write the dataset of strings</h3>
|
||||
<div id="outline-container-org2133a0e" class="outline-3">
|
||||
<h3 id="org2133a0e"><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.
|
||||
@ -1212,8 +1212,8 @@ The <code>group_dset</code> array is assumed allocated with the appropriate size
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-org608a242" class="outline-3">
|
||||
<h3 id="org608a242"><span class="section-number-3">1.11</span> Template for has/read/write the string attribute</h3>
|
||||
<div id="outline-container-org30e7044" class="outline-3">
|
||||
<h3 id="org30e7044"><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>
|
||||
@ -1287,12 +1287,12 @@ The <code>group_dset</code> array is assumed allocated with the appropriate size
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-org4d28c11" class="outline-3">
|
||||
<h3 id="org4d28c11"><span class="section-number-3">1.12</span> RDM struct (hard-coded)</h3>
|
||||
<div id="outline-container-org025af16" class="outline-3">
|
||||
<h3 id="org025af16"><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-org4395208" class="outline-4">
|
||||
<h4 id="org4395208"><span class="section-number-4">1.12.1</span> Read the complete struct</h4>
|
||||
<div id="outline-container-org0f05042" class="outline-4">
|
||||
<h4 id="org0f05042"><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>);
|
||||
@ -1387,8 +1387,8 @@ The <code>group_dset</code> array is assumed allocated with the appropriate size
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org891a63c" class="outline-4">
|
||||
<h4 id="org891a63c"><span class="section-number-4">1.12.2</span> Flush the complete struct</h4>
|
||||
<div id="outline-container-org8705c1b" class="outline-4">
|
||||
<h4 id="org8705c1b"><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>);
|
||||
@ -1430,8 +1430,8 @@ The <code>group_dset</code> array is assumed allocated with the appropriate size
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org04b3416" class="outline-4">
|
||||
<h4 id="org04b3416"><span class="section-number-4">1.12.3</span> Free memory</h4>
|
||||
<div id="outline-container-orgbe964a5" class="outline-4">
|
||||
<h4 id="orgbe964a5"><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.
|
||||
@ -1467,8 +1467,8 @@ Memory is allocated when reading. The followig function frees memory.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgb45b0ad" class="outline-4">
|
||||
<h4 id="orgb45b0ad"><span class="section-number-4">1.12.4</span> Read/Write the one<sub>e</sub> attribute</h4>
|
||||
<div id="outline-container-org74e392f" class="outline-4">
|
||||
<h4 id="org74e392f"><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.
|
||||
@ -1534,8 +1534,8 @@ The <code>one_e</code> array is assumed allocated with the appropriate size.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd218b46" class="outline-4">
|
||||
<h4 id="orgd218b46"><span class="section-number-4">1.12.5</span> Read/Write the two<sub>e</sub> attribute</h4>
|
||||
<div id="outline-container-orged2ebb8" class="outline-4">
|
||||
<h4 id="orged2ebb8"><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
|
||||
@ -1643,7 +1643,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-09-24 Fri 10:10</p>
|
||||
<p class="date">Created: 2021-09-24 Fri 10:46</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
118
trex.html
118
trex.html
@ -3,7 +3,7 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2021-09-24 Fri 10:10 -->
|
||||
<!-- 2021-09-24 Fri 10:46 -->
|
||||
<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>
|
||||
@ -339,28 +339,28 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org6ace8b1">1. Metadata (metadata group)</a></li>
|
||||
<li><a href="#org7131d20">2. Electron (electron group)</a></li>
|
||||
<li><a href="#orgbedb0a1">3. Nucleus (nucleus group)</a></li>
|
||||
<li><a href="#org7a0c603">4. Effective core potentials (ecp group)</a></li>
|
||||
<li><a href="#org43d2509">5. Basis set (basis group)</a></li>
|
||||
<li><a href="#orge262f06">6. Atomic orbitals (ao group)</a>
|
||||
<li><a href="#orge071f03">1. Metadata (metadata group)</a></li>
|
||||
<li><a href="#orga2ee45e">2. Electron (electron group)</a></li>
|
||||
<li><a href="#org73882e0">3. Nucleus (nucleus group)</a></li>
|
||||
<li><a href="#org7b7e7b5">4. Effective core potentials (ecp group)</a></li>
|
||||
<li><a href="#org23b79ad">5. Basis set (basis group)</a></li>
|
||||
<li><a href="#org73b83da">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="#org7baed18">7. Molecular orbitals (mo group)</a>
|
||||
<li><a href="#org06e53c5">7. Molecular orbitals (mo group)</a>
|
||||
<ul>
|
||||
<li><a href="#org0a9bbc6">7.1. One-electron integrals (<code>mo_1e_int</code> group)</a></li>
|
||||
<li><a href="#org56ad27c">7.2. Two-electron integrals (<code>mo_2e_int</code> group)</a></li>
|
||||
<li><a href="#orgdeb666d">7.1. One-electron integrals (<code>mo_1e_int</code> group)</a></li>
|
||||
<li><a href="#orgc9ba12b">7.2. Two-electron integrals (<code>mo_2e_int</code> group)</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org2ef3f55">8. <span class="todo TODO">TODO</span> Slater determinants</a></li>
|
||||
<li><a href="#orgb20d291">9. <span class="todo TODO">TODO</span> Reduced density matrices (rdm group)</a></li>
|
||||
<li><a href="#org67e7f16">10. Appendix</a>
|
||||
<li><a href="#org8c8ae43">8. <span class="todo TODO">TODO</span> Slater determinants</a></li>
|
||||
<li><a href="#org4b29da2">9. <span class="todo TODO">TODO</span> Reduced density matrices (rdm group)</a></li>
|
||||
<li><a href="#org085bd0a">10. Appendix</a>
|
||||
<ul>
|
||||
<li><a href="#org1a97c69">10.1. Python script from table to json</a></li>
|
||||
<li><a href="#org6fe99d1">10.1. Python script from table to json</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@ -402,8 +402,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-org6ace8b1" class="outline-2">
|
||||
<h2 id="org6ace8b1"><span class="section-number-2">1</span> Metadata (metadata group)</h2>
|
||||
<div id="outline-container-orge071f03" class="outline-2">
|
||||
<h2 id="orge071f03"><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
|
||||
@ -413,7 +413,7 @@ which have participated to the creation of the file, a list of
|
||||
authors of the file, and a textual description.
|
||||
</p>
|
||||
|
||||
<table id="orgd1d23de" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orged3df0d" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -480,15 +480,15 @@ authors of the file, and a textual description.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org7131d20" class="outline-2">
|
||||
<h2 id="org7131d20"><span class="section-number-2">2</span> Electron (electron group)</h2>
|
||||
<div id="outline-container-orga2ee45e" class="outline-2">
|
||||
<h2 id="orga2ee45e"><span class="section-number-2">2</span> Electron (electron group)</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
<p>
|
||||
We consider wave functions expressed in the spin-free formalism, where
|
||||
the number of ↑ and ↓ electrons is fixed.
|
||||
</p>
|
||||
|
||||
<table id="org5e26465" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org38267a6" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -527,15 +527,15 @@ the number of ↑ and ↓ electrons is fixed.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgbedb0a1" class="outline-2">
|
||||
<h2 id="orgbedb0a1"><span class="section-number-2">3</span> Nucleus (nucleus group)</h2>
|
||||
<div id="outline-container-org73882e0" class="outline-2">
|
||||
<h2 id="org73882e0"><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="org68dc17e" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org323e615" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -595,8 +595,8 @@ given in Cartesian \((x,y,z)\) format.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org7a0c603" class="outline-2">
|
||||
<h2 id="org7a0c603"><span class="section-number-2">4</span> Effective core potentials (ecp group)</h2>
|
||||
<div id="outline-container-org7b7e7b5" class="outline-2">
|
||||
<h2 id="org7b7e7b5"><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
|
||||
@ -624,7 +624,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="org2a29490" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orge12c8a5" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -733,8 +733,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-org43d2509" class="outline-2">
|
||||
<h2 id="org43d2509"><span class="section-number-2">5</span> Basis set (basis group)</h2>
|
||||
<div id="outline-container-org23b79ad" class="outline-2">
|
||||
<h2 id="org23b79ad"><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
|
||||
@ -787,7 +787,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="orgcc40fa4" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org18b2d99" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -956,8 +956,8 @@ prim_factor =
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge262f06" class="outline-2">
|
||||
<h2 id="orge262f06"><span class="section-number-2">6</span> Atomic orbitals (ao group)</h2>
|
||||
<div id="outline-container-org73b83da" class="outline-2">
|
||||
<h2 id="org73b83da"><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
|
||||
@ -1005,13 +1005,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="#org43d2509">Basis set</a> section) to \(\mathcal{N}_{z^2}\), which is the
|
||||
the <a href="#org23b79ad">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="org41f960f" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org32e547e" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1063,8 +1063,8 @@ introduced here should be \(\frac{\mathcal{N}_{xy}}{\mathcal{N}_{z^2}}\).
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orga756231" class="outline-3">
|
||||
<h3 id="ao_one_e"><a id="orga756231"></a><span class="section-number-3">6.1</span> One-electron integrals (<code>ao_1e_int</code> group)</h3>
|
||||
<div id="outline-container-org3d5d1ae" class="outline-3">
|
||||
<h3 id="ao_one_e"><a id="org3d5d1ae"></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}}
|
||||
@ -1082,7 +1082,7 @@ The one-electron integrals for a one-electron operator \(\hat{O}\) are
|
||||
over atomic orbitals.
|
||||
</p>
|
||||
|
||||
<table id="org03807cc" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org22d4741" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1149,8 +1149,8 @@ over atomic orbitals.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orged2c27b" class="outline-3">
|
||||
<h3 id="ao_two_e"><a id="orged2c27b"></a><span class="section-number-3">6.2</span> Two-electron integrals (<code>ao_2e_int</code> group)</h3>
|
||||
<div id="outline-container-org792b19c" class="outline-3">
|
||||
<h3 id="ao_two_e"><a id="org792b19c"></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
|
||||
@ -1171,7 +1171,7 @@ notation.
|
||||
\mathbf{r}_j \vert)}{\vert \mathbf{r}_i - \mathbf{r}_j \vert} \] : electron-electron long range potential</li>
|
||||
</ul>
|
||||
|
||||
<table id="org96bae30" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org70941a0" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1211,10 +1211,10 @@ notation.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org7baed18" class="outline-2">
|
||||
<h2 id="org7baed18"><span class="section-number-2">7</span> Molecular orbitals (mo group)</h2>
|
||||
<div id="outline-container-org06e53c5" class="outline-2">
|
||||
<h2 id="org06e53c5"><span class="section-number-2">7</span> Molecular orbitals (mo group)</h2>
|
||||
<div class="outline-text-2" id="text-7">
|
||||
<table id="orgfb122e3" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org085f5b4" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1280,8 +1280,8 @@ notation.
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org0a9bbc6" class="outline-3">
|
||||
<h3 id="org0a9bbc6"><span class="section-number-3">7.1</span> One-electron integrals (<code>mo_1e_int</code> group)</h3>
|
||||
<div id="outline-container-orgdeb666d" class="outline-3">
|
||||
<h3 id="orgdeb666d"><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
|
||||
@ -1289,7 +1289,7 @@ The operators as the same as those defined in the
|
||||
the basis of molecular orbitals.
|
||||
</p>
|
||||
|
||||
<table id="orgdd2cd7f" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org787b1b6" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1356,8 +1356,8 @@ the basis of molecular orbitals.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org56ad27c" class="outline-3">
|
||||
<h3 id="org56ad27c"><span class="section-number-3">7.2</span> Two-electron integrals (<code>mo_2e_int</code> group)</h3>
|
||||
<div id="outline-container-orgc9ba12b" class="outline-3">
|
||||
<h3 id="orgc9ba12b"><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
|
||||
@ -1365,7 +1365,7 @@ The operators as the same as those defined in the
|
||||
the basis of molecular orbitals.
|
||||
</p>
|
||||
|
||||
<table id="orgf067b44" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org0903526" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1405,13 +1405,13 @@ the basis of molecular orbitals.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org2ef3f55" class="outline-2">
|
||||
<h2 id="org2ef3f55"><span class="section-number-2">8</span> <span class="todo TODO">TODO</span> Slater determinants</h2>
|
||||
<div id="outline-container-org8c8ae43" class="outline-2">
|
||||
<h2 id="org8c8ae43"><span class="section-number-2">8</span> <span class="todo TODO">TODO</span> Slater determinants</h2>
|
||||
</div>
|
||||
<div id="outline-container-orgb20d291" class="outline-2">
|
||||
<h2 id="orgb20d291"><span class="section-number-2">9</span> <span class="todo TODO">TODO</span> Reduced density matrices (rdm group)</h2>
|
||||
<div id="outline-container-org4b29da2" class="outline-2">
|
||||
<h2 id="org4b29da2"><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="org451fbad" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org5c4d9de" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1464,15 +1464,15 @@ the basis of molecular orbitals.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org67e7f16" class="outline-2">
|
||||
<h2 id="org67e7f16"><span class="section-number-2">10</span> Appendix</h2>
|
||||
<div id="outline-container-org085bd0a" class="outline-2">
|
||||
<h2 id="org085bd0a"><span class="section-number-2">10</span> Appendix</h2>
|
||||
<div class="outline-text-2" id="text-10">
|
||||
</div>
|
||||
<div id="outline-container-org1a97c69" class="outline-3">
|
||||
<h3 id="org1a97c69"><span class="section-number-3">10.1</span> Python script from table to json</h3>
|
||||
<div id="outline-container-org6fe99d1" class="outline-3">
|
||||
<h3 id="org6fe99d1"><span class="section-number-3">10.1</span> Python script from table to json</h3>
|
||||
<div class="outline-text-3" id="text-10-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-python" id="orgf2be65c"><span style="color: #a020f0;">print</span>(<span style="color: #8b2252;">"""#+begin_src python :tangle trex.json"""</span>)
|
||||
<pre class="src src-python" id="orgc7efb1a"><span style="color: #a020f0;">print</span>(<span style="color: #8b2252;">"""#+begin_src python :tangle trex.json"""</span>)
|
||||
<span style="color: #a020f0;">print</span>(<span style="color: #8b2252;">""" "%s": {"""</span>%(title))
|
||||
<span style="color: #a0522d;">indent</span> = <span style="color: #8b2252;">" "</span>
|
||||
<span style="color: #a0522d;">f1</span> = 0 ; <span style="color: #a0522d;">f2</span> = 0 ; <span style="color: #a0522d;">f3</span> = 0
|
||||
@ -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-09-24 Fri 10:10</p>
|
||||
<p class="date">Created: 2021-09-24 Fri 10:46</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
Loading…
Reference in New Issue
Block a user