1
0
mirror of https://github.com/TREX-CoE/trexio.git synced 2024-12-23 21:04:08 +01:00

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

This commit is contained in:
q-posev 2022-02-16 13:52:14 +00:00
parent 14cbebd4b6
commit c2afeba05f
7 changed files with 635 additions and 626 deletions

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2022-02-04 Fri 10:23 -->
<!-- 2022-02-16 Wed 13:52 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>TREXIO source code documentation</title>
@ -347,7 +347,7 @@ and bug reports should be submitted at
</div>
<div id="postamble" class="status">
<p class="author">Author: TREX-CoE</p>
<p class="date">Created: 2022-02-04 Fri 10:23</p>
<p class="date">Created: 2022-02-16 Wed 13:52</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2022-02-04 Fri 10:23 -->
<!-- 2022-02-16 Wed 13:52 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Examples</title>
@ -333,24 +333,24 @@ for the JavaScript code in this tag.
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#orgcdd99ab">1. Accessing sparse quantities</a>
<li><a href="#org7e0e2cd">1. Accessing sparse quantities</a>
<ul>
<li><a href="#org780b647">1.1. Fortran</a>
<li><a href="#org1ae5306">1.1. Fortran</a>
<ul>
<li><a href="#orgb14d796">1.1.1. Declare Temporary variables</a></li>
<li><a href="#orga407be0">1.1.2. Obtain the name of the TREXIO file from the command line, and open it for reading</a></li>
<li><a href="#orgafb8235">1.1.3. Read the nuclear repulsion energy</a></li>
<li><a href="#orgd3b74d7">1.1.4. Read the number of molecular orbitals</a></li>
<li><a href="#orga18e91e">1.1.5. Allocate memory</a></li>
<li><a href="#org162d20b">1.1.6. Read one-electron quantities</a></li>
<li><a href="#org0e50d7d">1.1.7. Read two-electron quantities</a>
<li><a href="#orga06ba65">1.1.1. Declare Temporary variables</a></li>
<li><a href="#org26fbd98">1.1.2. Obtain the name of the TREXIO file from the command line, and open it for reading</a></li>
<li><a href="#org581bc5f">1.1.3. Read the nuclear repulsion energy</a></li>
<li><a href="#org86c4bf6">1.1.4. Read the number of molecular orbitals</a></li>
<li><a href="#org29cf69a">1.1.5. Allocate memory</a></li>
<li><a href="#org49a3da8">1.1.6. Read one-electron quantities</a></li>
<li><a href="#org844a9ca">1.1.7. Read two-electron quantities</a>
<ul>
<li><a href="#org1a1f58a">1.1.7.1. Electron repulsion integrals</a></li>
<li><a href="#orga0513c1">1.1.7.2. Reduced density matrix</a></li>
<li><a href="#org7febd4e">1.1.7.1. Electron repulsion integrals</a></li>
<li><a href="#orge7e02eb">1.1.7.2. Reduced density matrix</a></li>
</ul>
</li>
<li><a href="#orga5de481">1.1.8. Compute the energy</a></li>
<li><a href="#orgfd09a8d">1.1.9. Terminate</a></li>
<li><a href="#orgb23857e">1.1.8. Compute the energy</a></li>
<li><a href="#org4cec77e">1.1.9. Terminate</a></li>
</ul>
</li>
</ul>
@ -360,12 +360,12 @@ for the JavaScript code in this tag.
</div>
<div id="outline-container-orgcdd99ab" class="outline-2">
<h2 id="orgcdd99ab"><span class="section-number-2">1</span> Accessing sparse quantities</h2>
<div id="outline-container-org7e0e2cd" class="outline-2">
<h2 id="org7e0e2cd"><span class="section-number-2">1</span> Accessing sparse quantities</h2>
<div class="outline-text-2" id="text-1">
</div>
<div id="outline-container-org780b647" class="outline-3">
<h3 id="org780b647"><span class="section-number-3">1.1</span> Fortran</h3>
<div id="outline-container-org1ae5306" class="outline-3">
<h3 id="org1ae5306"><span class="section-number-3">1.1</span> Fortran</h3>
<div class="outline-text-3" id="text-1-1">
<div class="org-src-container">
<pre class="src src-f90"><span style="color: #a020f0;">program</span> <span style="color: #0000ff;">print_energy</span>
@ -411,8 +411,8 @@ One needs to read from the TREXIO file:
</div>
</div>
<div id="outline-container-orgb14d796" class="outline-4">
<h4 id="orgb14d796"><span class="section-number-4">1.1.1</span> Declare Temporary variables</h4>
<div id="outline-container-orga06ba65" class="outline-4">
<h4 id="orga06ba65"><span class="section-number-4">1.1.1</span> Declare Temporary variables</h4>
<div class="outline-text-4" id="text-1-1-1">
<div class="org-src-container">
<pre class="src src-f90"><span style="color: #228b22;">integer</span> ::<span style="color: #a0522d;"> i, j, k, l, m</span>
@ -427,8 +427,8 @@ One needs to read from the TREXIO file:
</div>
</div>
<div id="outline-container-orga407be0" class="outline-4">
<h4 id="orga407be0"><span class="section-number-4">1.1.2</span> Obtain the name of the TREXIO file from the command line, and open it for reading</h4>
<div id="outline-container-org26fbd98" class="outline-4">
<h4 id="org26fbd98"><span class="section-number-4">1.1.2</span> Obtain the name of the TREXIO file from the command line, and open it for reading</h4>
<div class="outline-text-4" id="text-1-1-2">
<div class="org-src-container">
<pre class="src src-f90"><span style="color: #a020f0;">call</span> <span style="color: #0000ff;">getarg</span>(1, filename)
@ -444,8 +444,8 @@ f = trexio_open (filename, <span style="color: #8b2252;">'r'</span>, TREXIO_HDF5
</div>
</div>
<div id="outline-container-orgafb8235" class="outline-4">
<h4 id="orgafb8235"><span class="section-number-4">1.1.3</span> Read the nuclear repulsion energy</h4>
<div id="outline-container-org581bc5f" class="outline-4">
<h4 id="org581bc5f"><span class="section-number-4">1.1.3</span> Read the nuclear repulsion energy</h4>
<div class="outline-text-4" id="text-1-1-3">
<div class="org-src-container">
<pre class="src src-f90">rc = trexio_read_nucleus_repulsion(f, E_nn)
@ -459,8 +459,8 @@ f = trexio_open (filename, <span style="color: #8b2252;">'r'</span>, TREXIO_HDF5
</div>
</div>
<div id="outline-container-orgd3b74d7" class="outline-4">
<h4 id="orgd3b74d7"><span class="section-number-4">1.1.4</span> Read the number of molecular orbitals</h4>
<div id="outline-container-org86c4bf6" class="outline-4">
<h4 id="org86c4bf6"><span class="section-number-4">1.1.4</span> Read the number of molecular orbitals</h4>
<div class="outline-text-4" id="text-1-1-4">
<div class="org-src-container">
<pre class="src src-f90">rc = trexio_read_mo_num(f, n)
@ -474,8 +474,8 @@ f = trexio_open (filename, <span style="color: #8b2252;">'r'</span>, TREXIO_HDF5
</div>
</div>
<div id="outline-container-orga18e91e" class="outline-4">
<h4 id="orga18e91e"><span class="section-number-4">1.1.5</span> Allocate memory</h4>
<div id="outline-container-org29cf69a" class="outline-4">
<h4 id="org29cf69a"><span class="section-number-4">1.1.5</span> Allocate memory</h4>
<div class="outline-text-4" id="text-1-1-5">
<div class="org-src-container">
<pre class="src src-f90"><span style="color: #a020f0;">allocate</span>( D(n,n), h0(n,n) )
@ -487,8 +487,8 @@ W(:,:,:,:) = 0.d0
</div>
</div>
<div id="outline-container-org162d20b" class="outline-4">
<h4 id="org162d20b"><span class="section-number-4">1.1.6</span> Read one-electron quantities</h4>
<div id="outline-container-org49a3da8" class="outline-4">
<h4 id="org49a3da8"><span class="section-number-4">1.1.6</span> Read one-electron quantities</h4>
<div class="outline-text-4" id="text-1-1-6">
<div class="org-src-container">
<pre class="src src-f90">rc = trexio_has_mo_1e_int_core_hamiltonian(f)
@ -520,8 +520,8 @@ rc = trexio_read_rdm_1e(f, D)
</div>
</div>
<div id="outline-container-org0e50d7d" class="outline-4">
<h4 id="org0e50d7d"><span class="section-number-4">1.1.7</span> Read two-electron quantities</h4>
<div id="outline-container-org844a9ca" class="outline-4">
<h4 id="org844a9ca"><span class="section-number-4">1.1.7</span> Read two-electron quantities</h4>
<div class="outline-text-4" id="text-1-1-7">
<p>
Reading is done with OpenMP. Each thread reads its own buffer, and
@ -537,8 +537,8 @@ to be protected in the critical section when modified.
</p>
</div>
<div id="outline-container-org1a1f58a" class="outline-5">
<h5 id="org1a1f58a"><span class="section-number-5">1.1.7.1</span> Electron repulsion integrals</h5>
<div id="outline-container-org7febd4e" class="outline-5">
<h5 id="org7febd4e"><span class="section-number-5">1.1.7.1</span> Electron repulsion integrals</h5>
<div class="outline-text-5" id="text-1-1-7-1">
<div class="org-src-container">
<pre class="src src-f90">rc = trexio_has_mo_2e_int_eri(f)
@ -587,8 +587,8 @@ icount = BUFSIZE
</div>
</div>
<div id="outline-container-orga0513c1" class="outline-5">
<h5 id="orga0513c1"><span class="section-number-5">1.1.7.2</span> Reduced density matrix</h5>
<div id="outline-container-orge7e02eb" class="outline-5">
<h5 id="orge7e02eb"><span class="section-number-5">1.1.7.2</span> Reduced density matrix</h5>
<div class="outline-text-5" id="text-1-1-7-2">
<div class="org-src-container">
<pre class="src src-f90">rc = trexio_has_rdm_2e(f)
@ -632,8 +632,8 @@ icount = bufsize
</div>
</div>
<div id="outline-container-orga5de481" class="outline-4">
<h4 id="orga5de481"><span class="section-number-4">1.1.8</span> Compute the energy</h4>
<div id="outline-container-orgb23857e" class="outline-4">
<h4 id="orgb23857e"><span class="section-number-4">1.1.8</span> Compute the energy</h4>
<div class="outline-text-4" id="text-1-1-8">
<p>
When the orbitals are real, we can use
@ -679,8 +679,8 @@ E = E + E_nn
</div>
</div>
<div id="outline-container-orgfd09a8d" class="outline-4">
<h4 id="orgfd09a8d"><span class="section-number-4">1.1.9</span> Terminate</h4>
<div id="outline-container-org4cec77e" class="outline-4">
<h4 id="org4cec77e"><span class="section-number-4">1.1.9</span> Terminate</h4>
<div class="outline-text-4" id="text-1-1-9">
<div class="org-src-container">
<pre class="src src-f90"> <span style="color: #a020f0;">deallocate</span>( D, h0, G, W )
@ -695,7 +695,7 @@ E = E + E_nn
</div>
<div id="postamble" class="status">
<p class="author">Author: TREX-CoE</p>
<p class="date">Created: 2022-02-04 Fri 10:23</p>
<p class="date">Created: 2022-02-16 Wed 13:52</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2022-02-04 Fri 10:23 -->
<!-- 2022-02-16 Wed 13:52 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>TREXIO source code documentation</title>
@ -347,7 +347,7 @@ and bug reports should be submitted at
</div>
<div id="postamble" class="status">
<p class="author">Author: TREX-CoE</p>
<p class="date">Created: 2022-02-04 Fri 10:23</p>
<p class="date">Created: 2022-02-16 Wed 13:52</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2022-02-04 Fri 10:23 -->
<!-- 2022-02-16 Wed 13:52 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>HDF5 back end</title>
@ -311,22 +311,22 @@ for the JavaScript code in this tag.
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#org966f1e0">1. Template for HDF5 definitions</a></li>
<li><a href="#org795f8cb">2. Template for HDF5 structures</a></li>
<li><a href="#orge780fa9">3. Template for HDF5 init/deinit</a></li>
<li><a href="#org8ab1695">4. Template for HDF5 has/read/write a numerical attribute</a></li>
<li><a href="#orgf943b38">5. Template for HDF5 has/read/write a dataset of numerical data</a></li>
<li><a href="#org4012d49">6. Template for HDF5 has/read/write a dataset of sparse data</a></li>
<li><a href="#orgc1dae91">7. Template for HDF5 has/read/write a dataset of strings</a></li>
<li><a href="#org14a0e23">8. Template for HDF5 has/read/write a string attribute</a></li>
<li><a href="#org90672aa">9. Template for HDF5 delete a group (UNSAFE mode)</a></li>
<li><a href="#org1e1fcfa">10. Helper functions</a></li>
<li><a href="#orgb1e560f">1. Template for HDF5 definitions</a></li>
<li><a href="#org416f7d4">2. Template for HDF5 structures</a></li>
<li><a href="#org62d7fa7">3. Template for HDF5 init/deinit</a></li>
<li><a href="#orgbfe05db">4. Template for HDF5 has/read/write a numerical attribute</a></li>
<li><a href="#orgb698d7f">5. Template for HDF5 has/read/write a dataset of numerical data</a></li>
<li><a href="#org9f925b2">6. Template for HDF5 has/read/write a dataset of sparse data</a></li>
<li><a href="#org7c4d338">7. Template for HDF5 has/read/write a dataset of strings</a></li>
<li><a href="#orgdff8d75">8. Template for HDF5 has/read/write a string attribute</a></li>
<li><a href="#org8243dac">9. Template for HDF5 delete a group (UNSAFE mode)</a></li>
<li><a href="#org2ebf198">10. Helper functions</a></li>
</ul>
</div>
</div>
<div id="outline-container-org966f1e0" class="outline-2">
<h2 id="org966f1e0"><span class="section-number-2">1</span> Template for HDF5 definitions</h2>
<div id="outline-container-orgb1e560f" class="outline-2">
<h2 id="orgb1e560f"><span class="section-number-2">1</span> Template for HDF5 definitions</h2>
<div class="outline-text-2" id="text-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>
@ -338,8 +338,8 @@ for the JavaScript code in this tag.
</div>
</div>
<div id="outline-container-org795f8cb" class="outline-2">
<h2 id="org795f8cb"><span class="section-number-2">2</span> Template for HDF5 structures</h2>
<div id="outline-container-org416f7d4" class="outline-2">
<h2 id="org416f7d4"><span class="section-number-2">2</span> Template for HDF5 structures</h2>
<div class="outline-text-2" id="text-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> {
@ -352,8 +352,8 @@ for the JavaScript code in this tag.
</div>
</div>
<div id="outline-container-orge780fa9" class="outline-2">
<h2 id="orge780fa9"><span class="section-number-2">3</span> Template for HDF5 init/deinit</h2>
<div id="outline-container-org62d7fa7" class="outline-2">
<h2 id="org62d7fa7"><span class="section-number-2">3</span> Template for HDF5 init/deinit</h2>
<div class="outline-text-2" id="text-3">
<div class="org-src-container">
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
@ -456,8 +456,8 @@ for the JavaScript code in this tag.
</div>
</div>
<div id="outline-container-org8ab1695" class="outline-2">
<h2 id="org8ab1695"><span class="section-number-2">4</span> Template for HDF5 has/read/write a numerical attribute</h2>
<div id="outline-container-orgbfe05db" class="outline-2">
<h2 id="orgbfe05db"><span class="section-number-2">4</span> Template for HDF5 has/read/write a numerical attribute</h2>
<div class="outline-text-2" id="text-4">
<div class="org-src-container">
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
@ -560,8 +560,8 @@ for the JavaScript code in this tag.
</div>
</div>
<div id="outline-container-orgf943b38" class="outline-2">
<h2 id="orgf943b38"><span class="section-number-2">5</span> Template for HDF5 has/read/write a dataset of numerical data</h2>
<div id="outline-container-orgb698d7f" class="outline-2">
<h2 id="orgb698d7f"><span class="section-number-2">5</span> Template for HDF5 has/read/write a dataset of numerical data</h2>
<div class="outline-text-2" id="text-5">
<div class="org-src-container">
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
@ -694,8 +694,8 @@ for the JavaScript code in this tag.
</div>
</div>
<div id="outline-container-org4012d49" class="outline-2">
<h2 id="org4012d49"><span class="section-number-2">6</span> Template for HDF5 has/read/write a dataset of sparse data</h2>
<div id="outline-container-org9f925b2" class="outline-2">
<h2 id="org9f925b2"><span class="section-number-2">6</span> Template for HDF5 has/read/write a dataset of sparse data</h2>
<div class="outline-text-2" id="text-6">
<p>
Sparse data is stored using extensible datasets of HDF5. Extensibility is required
@ -896,8 +896,8 @@ due to the fact that the sparse data will be written in chunks of user-defined s
</div>
</div>
<div id="outline-container-orgc1dae91" class="outline-2">
<h2 id="orgc1dae91"><span class="section-number-2">7</span> Template for HDF5 has/read/write a dataset of strings</h2>
<div id="outline-container-org7c4d338" class="outline-2">
<h2 id="org7c4d338"><span class="section-number-2">7</span> Template for HDF5 has/read/write a dataset of strings</h2>
<div class="outline-text-2" id="text-7">
<div class="org-src-container">
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
@ -1094,8 +1094,8 @@ due to the fact that the sparse data will be written in chunks of user-defined s
</div>
</div>
<div id="outline-container-org14a0e23" class="outline-2">
<h2 id="org14a0e23"><span class="section-number-2">8</span> Template for HDF5 has/read/write a string attribute</h2>
<div id="outline-container-orgdff8d75" class="outline-2">
<h2 id="orgdff8d75"><span class="section-number-2">8</span> Template for HDF5 has/read/write a string attribute</h2>
<div class="outline-text-2" id="text-8">
<div class="org-src-container">
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
@ -1221,8 +1221,8 @@ due to the fact that the sparse data will be written in chunks of user-defined s
</div>
</div>
</div>
<div id="outline-container-org90672aa" class="outline-2">
<h2 id="org90672aa"><span class="section-number-2">9</span> Template for HDF5 delete a group (UNSAFE mode)</h2>
<div id="outline-container-org8243dac" class="outline-2">
<h2 id="org8243dac"><span class="section-number-2">9</span> Template for HDF5 delete a group (UNSAFE mode)</h2>
<div class="outline-text-2" id="text-9">
<p>
<b><b>Note:</b></b> in early versions of the HDF5 library (v &lt; 1.10) unlinking an object was not working as expected
@ -1262,8 +1262,8 @@ Thus, any corrupted/lost file space will remain in the first file. The use of <c
</div>
</div>
<div id="outline-container-org1e1fcfa" class="outline-2">
<h2 id="org1e1fcfa"><span class="section-number-2">10</span> Helper functions</h2>
<div id="outline-container-org2ebf198" class="outline-2">
<h2 id="org2ebf198"><span class="section-number-2">10</span> Helper functions</h2>
<div class="outline-text-2" id="text-10">
<div class="org-src-container">
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
@ -1524,7 +1524,7 @@ Thus, any corrupted/lost file space will remain in the first file. The use of <c
</div>
<div id="postamble" class="status">
<p class="author">Author: TREX-CoE</p>
<p class="date">Created: 2022-02-04 Fri 10:23</p>
<p class="date">Created: 2022-02-16 Wed 13:52</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2022-02-04 Fri 10:23 -->
<!-- 2022-02-16 Wed 13:52 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>TEXT back end</title>
@ -311,29 +311,29 @@ for the JavaScript code in this tag.
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#orgfe5e94c">1. TEXT back end</a>
<li><a href="#org2b283a5">1. TEXT back end</a>
<ul>
<li><a href="#orgc9ed80e">1.1. Template for group-related structures in text back end</a></li>
<li><a href="#orgda41412">1.2. Template for general structure in text back end</a></li>
<li><a href="#org9ff3349">1.3. Initialize function (constant part)</a></li>
<li><a href="#orgb181f48">1.4. Deinitialize function (templated part)</a></li>
<li><a href="#org3d44f42">1.5. Template for text read a group</a></li>
<li><a href="#org8ebf193">1.6. Template for text flush a group</a></li>
<li><a href="#orgc501e50">1.7. Template for text free memory</a></li>
<li><a href="#org8a5dec1">1.8. Template for has/read/write a numerical attribute</a></li>
<li><a href="#org39dfd8c">1.9. Template for has/read/write a dataset of numerical data</a></li>
<li><a href="#org8df20be">1.10. Template for has/read/write a dataset of strings</a></li>
<li><a href="#org278f65a">1.11. Template for has/read/write a string attribute</a></li>
<li><a href="#org6deb4a7">1.12. Template for has/read/write the dataset of sparse data</a></li>
<li><a href="#org91b498a">1.13. Template for text delete a group (UNSAFE mode)</a></li>
<li><a href="#org3c6a7b3">1.1. Template for group-related structures in text back end</a></li>
<li><a href="#org1e07007">1.2. Template for general structure in text back end</a></li>
<li><a href="#orgad02bfb">1.3. Initialize function (constant part)</a></li>
<li><a href="#org76d4a60">1.4. Deinitialize function (templated part)</a></li>
<li><a href="#org70c9ff7">1.5. Template for text read a group</a></li>
<li><a href="#org4e4514c">1.6. Template for text flush a group</a></li>
<li><a href="#org5198ec7">1.7. Template for text free memory</a></li>
<li><a href="#orgb097852">1.8. Template for has/read/write a numerical attribute</a></li>
<li><a href="#org3df4185">1.9. Template for has/read/write a dataset of numerical data</a></li>
<li><a href="#orgb6b7c3a">1.10. Template for has/read/write a dataset of strings</a></li>
<li><a href="#org98e611c">1.11. Template for has/read/write a string attribute</a></li>
<li><a href="#orgaceea75">1.12. Template for has/read/write the dataset of sparse data</a></li>
<li><a href="#org0b87886">1.13. Template for text delete a group (UNSAFE mode)</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div id="outline-container-orgfe5e94c" class="outline-2">
<h2 id="orgfe5e94c"><span class="section-number-2">1</span> TEXT back end</h2>
<div id="outline-container-org2b283a5" class="outline-2">
<h2 id="org2b283a5"><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
@ -354,18 +354,18 @@ The file is written when closed, or when the flush function is called.
</p>
</div>
<div id="outline-container-orgc9ed80e" class="outline-3">
<h3 id="orgc9ed80e"><span class="section-number-3">1.1</span> Template for group-related structures in text back end</h3>
<div id="outline-container-org3c6a7b3" class="outline-3">
<h3 id="org3c6a7b3"><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 {
$group_num_dtype_double$ $group_num$;
bool $group_num$_isSet;
$group_dset_dtype$* $group_dset$;
<span style="color: #228b22;">uint32_t</span> <span style="color: #a0522d;">rank_$group_dset$</span>;
<span style="color: #228b22;">uint32_t</span> <span style="color: #a0522d;">to_flush</span>;
<span style="color: #228b22;">uint64_t</span> <span style="color: #a0522d;">dims_$group_dset$</span>[16];
<span style="color: #228b22;">uint64_t</span> <span style="color: #a0522d;">len_$group_str$</span>;
<span style="color: #228b22;">uint32_t</span> <span style="color: #a0522d;">rank_$group_dset$</span>;
<span style="color: #228b22;">uint32_t</span> <span style="color: #a0522d;">to_flush</span>;
bool $group_num$_isSet;
<span style="color: #228b22;">char</span>* $group_str$;
<span style="color: #228b22;">char</span> <span style="color: #a0522d;">file_name</span>[TREXIO_MAX_FILENAME_LENGTH];
} $group$_t;
@ -374,8 +374,8 @@ The file is written when closed, or when the flush function is called.
</div>
</div>
<div id="outline-container-orgda41412" class="outline-3">
<h3 id="orgda41412"><span class="section-number-3">1.2</span> Template for general structure in text back end</h3>
<div id="outline-container-org1e07007" class="outline-3">
<h3 id="org1e07007"><span class="section-number-3">1.2</span> Template for general structure in text back end</h3>
<div class="outline-text-3" id="text-1-2">
<div class="org-src-container">
<pre class="src src-c"><span style="color: #a020f0;">typedef</span> <span style="color: #a020f0;">struct</span> <span style="color: #228b22;">trexio_text_s</span> {
@ -388,8 +388,8 @@ The file is written when closed, or when the flush function is called.
</div>
</div>
<div id="outline-container-org9ff3349" class="outline-3">
<h3 id="org9ff3349"><span class="section-number-3">1.3</span> Initialize function (constant part)</h3>
<div id="outline-container-orgad02bfb" class="outline-3">
<h3 id="orgad02bfb"><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>
@ -532,8 +532,8 @@ The file is written when closed, or when the flush function is called.
</div>
</div>
<div id="outline-container-orgb181f48" class="outline-3">
<h3 id="orgb181f48"><span class="section-number-3">1.4</span> Deinitialize function (templated part)</h3>
<div id="outline-container-org76d4a60" class="outline-3">
<h3 id="org76d4a60"><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>
@ -555,8 +555,8 @@ The file is written when closed, or when the flush function is called.
</div>
</div>
<div id="outline-container-org3d44f42" class="outline-3">
<h3 id="org3d44f42"><span class="section-number-3">1.5</span> Template for text read a group</h3>
<div id="outline-container-org70c9ff7" class="outline-3">
<h3 id="org70c9ff7"><span class="section-number-3">1.5</span> Template for text read a group</h3>
<div class="outline-text-3" id="text-1-5">
<div class="org-src-container">
<pre class="src src-c">$group$_t*
@ -605,234 +605,243 @@ trexio_text_read_$group$ (<span style="color: #228b22;">trexio_text_t</span>* <s
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
/* <span style="color: #b22222;">Read the dimensioning variables </span>*/
<span style="color: #228b22;">int</span> <span style="color: #a0522d;">rc</span> = 0;
// <span style="color: #b22222;">START REPEAT GROUP_DSET_ALL</span>
rc = fscanf(f, <span style="color: #8b2252;">"%1023s"</span>, buffer);
<span style="color: #a020f0;">if</span> ((rc != 1) || (strcmp(buffer, <span style="color: #8b2252;">"rank_$group_dset$"</span>) != 0)) {
FREE(buffer);
fclose(f);
FREE($group$);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
rc = fscanf(f, <span style="color: #8b2252;">"%u"</span>, &amp;($group$-&gt;rank_$group_dset$));
<span style="color: #a020f0;">if</span> (rc != 1) {
FREE(buffer);
fclose(f);
FREE($group$);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
<span style="color: #228b22;">trexio_exit_code</span> <span style="color: #a0522d;">rc_free</span> = TREXIO_FAILURE;
/* <span style="color: #b22222;">workaround for the case of missing blocks in the file </span>*/
// <span style="color: #b22222;">START REPEAT GROUP_DSET_ALL</span>
<span style="color: #228b22;">uint64_t</span> <span style="color: #a0522d;">size_$group_dset$</span> = 0;
<span style="color: #a020f0;">if</span> ($group$-&gt;rank_$group_dset$ != 0) size_$group_dset$ = 1;
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">uint32_t</span> <span style="color: #a0522d;">i</span>=0; i&lt;$group$-&gt;rank_$group_dset$; ++i){
<span style="color: #228b22;">uint32_t</span> <span style="color: #a0522d;">j</span>=0;
rc = fscanf(f, <span style="color: #8b2252;">"%1023s %u"</span>, buffer, &amp;j);
<span style="color: #a020f0;">if</span> ((rc != 2) || (strcmp(buffer, <span style="color: #8b2252;">"dims_$group_dset$"</span>) != 0) || (j!=i)) {
FREE(buffer);
fclose(f);
FREE($group$);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
rc = fscanf(f, <span style="color: #8b2252;">"%"</span> SCNu64 <span style="color: #8b2252;">"\n"</span>, &amp;($group$-&gt;dims_$group_dset$[i]));
assert(!(rc != 1));
<span style="color: #a020f0;">if</span> (rc != 1) {
FREE(buffer);
fclose(f);
FREE($group$);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
size_$group_dset$ *= $group$-&gt;dims_$group_dset$[i];
}
// <span style="color: #b22222;">END REPEAT GROUP_DSET_ALL</span>
// <span style="color: #b22222;">START REPEAT GROUP_NUM</span>
/* <span style="color: #b22222;">Read data </span>*/
<span style="color: #228b22;">unsigned</span> <span style="color: #228b22;">int</span> $group_num$_isSet;
rc = fscanf(f, <span style="color: #8b2252;">"%1023s"</span>, buffer);
assert(!((rc != 1) || (strcmp(buffer, <span style="color: #8b2252;">"$group_num$_isSet"</span>) != 0)));
<span style="color: #a020f0;">if</span> ((rc != 1) || (strcmp(buffer, <span style="color: #8b2252;">"$group_num$_isSet"</span>) != 0)) {
FREE(buffer);
fclose(f);
FREE($group$);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
<span style="color: #a020f0;">while</span>(fscanf(f, <span style="color: #8b2252;">"%1023s"</span>, buffer) != EOF) {
/* <span style="color: #b22222;">additional parameter $group_num$_isSet is needed to suppress warning when fscanf into bool variable using %u or %d </span>*/
rc = fscanf(f, <span style="color: #8b2252;">"%u"</span>, &amp;($group_num$_isSet));
$group$-&gt;$group_num$_isSet = (bool) $group_num$_isSet;
assert(!(rc != 1));
<span style="color: #a020f0;">if</span> (rc != 1) {
FREE(buffer);
fclose(f);
FREE($group$);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
<span style="color: #a020f0;">if</span> (strcmp(buffer, <span style="color: #8b2252;">"EXIT"</span>) == 0) {
<span style="color: #a020f0;">break</span>;
// <span style="color: #b22222;">START REPEAT GROUP_DSET_ALL</span>
} <span style="color: #a020f0;">else</span> <span style="color: #a020f0;">if</span> (strcmp(buffer, <span style="color: #8b2252;">"rank_$group_dset$"</span>) == 0) {
<span style="color: #a020f0;">if</span> ($group$-&gt;$group_num$_isSet == <span style="color: #008b8b;">true</span>) {
rc = fscanf(f, <span style="color: #8b2252;">"%1023s"</span>, buffer);
assert(!((rc != 1) || (strcmp(buffer, <span style="color: #8b2252;">"$group_num$"</span>) != 0)));
<span style="color: #a020f0;">if</span> ((rc != 1) || (strcmp(buffer, <span style="color: #8b2252;">"$group_num$"</span>) != 0)) {
FREE(buffer);
fclose(f);
FREE($group$);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
rc = fscanf(f, <span style="color: #8b2252;">"%u"</span>, &amp;($group$-&gt;rank_$group_dset$));
<span style="color: #a020f0;">if</span> (rc != 1) {
FREE(buffer);
fclose(f);
/* <span style="color: #b22222;">Set pointer to the struct so that the garbage collector can do the job on file handle </span>*/
file-&gt;$group$ = $group$;
rc_free = trexio_text_free_$group$(file);
assert(rc_free == TREXIO_SUCCESS);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
rc = fscanf(f, <span style="color: #8b2252;">"%$group_num_format_scanf$"</span>, &amp;($group$-&gt;$group_num$));
assert(!(rc != 1));
<span style="color: #a020f0;">if</span> (rc != 1) {
FREE(buffer);
fclose(f);
FREE($group$);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
}
// <span style="color: #b22222;">END REPEAT GROUP_NUM</span>
<span style="color: #a020f0;">if</span> ($group$-&gt;rank_$group_dset$ != 0) size_$group_dset$ = 1UL;
// <span style="color: #b22222;">START REPEAT GROUP_ATTR_STR</span>
rc = fscanf(f, <span style="color: #8b2252;">"%1023s"</span>, buffer);
assert(!((rc != 1) || (strcmp(buffer, <span style="color: #8b2252;">"len_$group_str$"</span>) != 0)));
<span style="color: #a020f0;">if</span> ((rc != 1) || (strcmp(buffer, <span style="color: #8b2252;">"len_$group_str$"</span>) != 0)) {
FREE(buffer);
fclose(f);
FREE($group$);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">uint32_t</span> <span style="color: #a0522d;">i</span>=0; i&lt;$group$-&gt;rank_$group_dset$; ++i){
rc = fscanf(f, <span style="color: #8b2252;">"%"</span> SCNu64 <span style="color: #8b2252;">""</span>, &amp;($group$-&gt;len_$group_str$));
assert(!(rc != 1));
<span style="color: #a020f0;">if</span> (rc != 1) {
FREE(buffer);
fclose(f);
FREE($group$);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
<span style="color: #228b22;">uint32_t</span> <span style="color: #a0522d;">j</span>=0;
rc = fscanf(f, <span style="color: #8b2252;">"%1023s %u"</span>, buffer, &amp;j);
<span style="color: #a020f0;">if</span> ((rc != 2) || (strcmp(buffer, <span style="color: #8b2252;">"dims_$group_dset$"</span>) != 0) || (j!=i)) {
FREE(buffer);
fclose(f);
/* <span style="color: #b22222;">Set pointer to the struct so that the garbage collector can do the job on file handle </span>*/
file-&gt;$group$ = $group$;
rc_free = trexio_text_free_$group$(file);
assert(rc_free == TREXIO_SUCCESS);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
rc = fscanf(f, <span style="color: #8b2252;">"%1023s"</span>, buffer);
assert(!((rc != 1) || (strcmp(buffer, <span style="color: #8b2252;">"$group_str$"</span>) != 0)));
<span style="color: #a020f0;">if</span> ((rc != 1) || (strcmp(buffer, <span style="color: #8b2252;">"$group_str$"</span>) != 0)) {
FREE(buffer);
fclose(f);
FREE($group$-&gt;$group_str$);
FREE($group$);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
rc = fscanf(f, <span style="color: #8b2252;">"%"</span> SCNu64 <span style="color: #8b2252;">"\n"</span>, &amp;($group$-&gt;dims_$group_dset$[i]));
assert(!(rc != 1));
<span style="color: #a020f0;">if</span> (rc != 1) {
FREE(buffer);
fclose(f);
/* <span style="color: #b22222;">Set pointer to the struct so that the garbage collector can do the job on file handle </span>*/
file-&gt;$group$ = $group$;
rc_free = trexio_text_free_$group$(file);
assert(rc_free == TREXIO_SUCCESS);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
<span style="color: #a020f0;">if</span> ($group$-&gt;len_$group_str$ != 0) {
size_$group_dset$ *= $group$-&gt;dims_$group_dset$[i];
}
// <span style="color: #b22222;">END REPEAT GROUP_DSET_ALL</span>
// <span style="color: #b22222;">START REPEAT GROUP_DSET_NUM</span>
} <span style="color: #a020f0;">else</span> <span style="color: #a020f0;">if</span> (strcmp(buffer, <span style="color: #8b2252;">"$group_dset$"</span>) == 0) {
$group$-&gt;$group_str$ = CALLOC($group$-&gt;len_$group_str$, <span style="color: #228b22;">char</span>);
assert (!($group$-&gt;$group_str$ == <span style="color: #008b8b;">NULL</span>));
<span style="color: #a020f0;">if</span> ($group$-&gt;$group_str$ == <span style="color: #008b8b;">NULL</span>) {
FREE(buffer);
fclose(f);
FREE($group$-&gt;$group_str$);
FREE($group$);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
/* <span style="color: #b22222;">Allocate arrays </span>*/
$group$-&gt;$group_dset$ = CALLOC(size_$group_dset$, $group_dset_dtype$);
<span style="color: #a020f0;">if</span> ($group$-&gt;$group_dset$ == <span style="color: #008b8b;">NULL</span>) {
FREE(buffer);
fclose(f);
/* <span style="color: #b22222;">Set pointer to the struct so that the garbage collector can do the job on file handle </span>*/
file-&gt;$group$ = $group$;
rc_free = trexio_text_free_$group$(file);
assert(rc_free == TREXIO_SUCCESS);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
rc = fscanf(f, <span style="color: #8b2252;">" %1023[^\n]"</span>, $group$-&gt;$group_str$);
assert(!(rc != 1));
<span style="color: #a020f0;">if</span> (rc != 1) {
FREE(buffer);
fclose(f);
FREE($group$-&gt;$group_str$);
FREE($group$);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">uint64_t</span> <span style="color: #a0522d;">i</span>=0 ; i&lt;size_$group_dset$ ; ++i) {
rc = fscanf(f, <span style="color: #8b2252;">"%$group_dset_format_scanf$"</span>, &amp;($group$-&gt;$group_dset$[i]));
<span style="color: #a020f0;">if</span> (rc != 1) {
FREE(buffer);
fclose(f);
/* <span style="color: #b22222;">Set pointer to the struct so that the garbage collector can do the job on file handle </span>*/
file-&gt;$group$ = $group$;
rc_free = trexio_text_free_$group$(file);
assert(rc_free == TREXIO_SUCCESS);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
}
}
// <span style="color: #b22222;">END REPEAT GROUP_ATTR_STR</span>
// <span style="color: #b22222;">END REPEAT GROUP_DSET_NUM</span>
// <span style="color: #b22222;">START REPEAT GROUP_DSET_STR</span>
} <span style="color: #a020f0;">else</span> <span style="color: #a020f0;">if</span> (strcmp(buffer, <span style="color: #8b2252;">"$group_dset$"</span>) == 0) {
// <span style="color: #b22222;">START REPEAT GROUP_DSET_NUM</span>
/* <span style="color: #b22222;">Allocate arrays </span>*/
$group$-&gt;$group_dset$ = CALLOC(size_$group_dset$, $group_dset_dtype$);
assert (!($group$-&gt;$group_dset$ == <span style="color: #008b8b;">NULL</span>));
<span style="color: #a020f0;">if</span> ($group$-&gt;$group_dset$ == <span style="color: #008b8b;">NULL</span>) {
FREE(buffer);
fclose(f);
FREE($group$-&gt;$group_dset$);
FREE($group$);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
<span style="color: #a020f0;">if</span>(size_$group_dset$ != 0) {
/* <span style="color: #b22222;">Allocate arrays </span>*/
$group$-&gt;$group_dset$ = CALLOC(size_$group_dset$, $group_dset_dtype$);
<span style="color: #a020f0;">if</span> ($group$-&gt;$group_dset$ == <span style="color: #008b8b;">NULL</span>) {
FREE(buffer);
fclose(f);
/* <span style="color: #b22222;">Set pointer to the struct so that the garbage collector can do the job on file handle </span>*/
file-&gt;$group$ = $group$;
rc_free = trexio_text_free_$group$(file);
assert(rc_free == TREXIO_SUCCESS);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
rc = fscanf(f, <span style="color: #8b2252;">"%1023s"</span>, buffer);
assert(!((rc != 1) || (strcmp(buffer, <span style="color: #8b2252;">"$group_dset$"</span>) != 0)));
<span style="color: #a020f0;">if</span> ((rc != 1) || (strcmp(buffer, <span style="color: #8b2252;">"$group_dset$"</span>) != 0)) {
FREE(buffer);
fclose(f);
FREE($group$-&gt;$group_dset$);
FREE($group$);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
/* <span style="color: #b22222;">WARNING: this tmp array allows to avoid allocation of space for each element of array of string</span>
<span style="color: #b22222;"> BUT it's size has to be number_of_str*max_len_str where max_len_str is somewhat arbitrary, e.g. 32.</span>
<span style="color: #b22222;"> </span>*/
<span style="color: #228b22;">char</span>* <span style="color: #a0522d;">tmp_$group_dset$</span>;
tmp_$group_dset$ = CALLOC(size_$group_dset$*32, <span style="color: #228b22;">char</span>);
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">uint64_t</span> <span style="color: #a0522d;">i</span>=0 ; i&lt;size_$group_dset$ ; ++i) {
rc = fscanf(f, <span style="color: #8b2252;">"%$group_dset_format_scanf$"</span>, &amp;($group$-&gt;$group_dset$[i]));
assert(!(rc != 1));
<span style="color: #a020f0;">if</span> (rc != 1) {
FREE(buffer);
fclose(f);
FREE($group$-&gt;$group_dset$);
FREE($group$);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
}
// <span style="color: #b22222;">END REPEAT GROUP_DSET_NUM</span>
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">uint64_t</span> <span style="color: #a0522d;">i</span>=0 ; i&lt;size_$group_dset$ ; ++i) {
$group$-&gt;$group_dset$[i] = tmp_$group_dset$;
/* <span style="color: #b22222;">conventional fcanf with "%s" only return the string before the first space character</span>
<span style="color: #b22222;"> * to read string with spaces use "%[^\n]" possible with space before or after, i.e. " %[^\n]"</span>
<span style="color: #b22222;"> * Q: depending on what ? </span>*/
rc = fscanf(f, <span style="color: #8b2252;">" %1023[^\n]"</span>, tmp_$group_dset$);
assert(!(rc != 1));
<span style="color: #a020f0;">if</span> (rc != 1) {
FREE(buffer);
fclose(f);
/* <span style="color: #b22222;">Set pointer to the struct so that the garbage collector can do the job on file handle </span>*/
file-&gt;$group$ = $group$;
rc_free = trexio_text_free_$group$(file);
assert(rc_free == TREXIO_SUCCESS);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
// <span style="color: #b22222;">START REPEAT GROUP_DSET_STR</span>
rc = fscanf(f, <span style="color: #8b2252;">"%1023s"</span>, buffer);
assert(!((rc != 1) || (strcmp(buffer, <span style="color: #8b2252;">"$group_dset$"</span>) != 0)));
<span style="color: #a020f0;">if</span> ((rc != 1) || (strcmp(buffer, <span style="color: #8b2252;">"$group_dset$"</span>) != 0)) {
FREE(buffer);
fclose(f);
FREE($group$);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
<span style="color: #228b22;">size_t</span> <span style="color: #a0522d;">tmp_$group_dset$_len</span> = strlen($group$-&gt;$group_dset$[i]);
tmp_$group_dset$ += tmp_$group_dset$_len + 1;
}
}
/* <span style="color: #b22222;">Allocate arrays </span>*/
<span style="color: #a020f0;">if</span>(size_$group_dset$ != 0) {
$group$-&gt;$group_dset$ = CALLOC(size_$group_dset$, $group_dset_dtype$);
<span style="color: #a020f0;">if</span> ($group$-&gt;$group_dset$ == <span style="color: #008b8b;">NULL</span>) {
FREE(buffer);
fclose(f);
FREE($group$-&gt;$group_dset$);
FREE($group$);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
// <span style="color: #b22222;">END REPEAT GROUP_DSET_STR</span>
// <span style="color: #b22222;">START REPEAT GROUP_NUM</span>
} <span style="color: #a020f0;">else</span> <span style="color: #a020f0;">if</span> (strcmp(buffer, <span style="color: #8b2252;">"$group_num$_isSet"</span>) == 0) {
/* <span style="color: #b22222;">WARNING: this tmp array allows to avoid allocation of space for each element of array of string</span>
<span style="color: #b22222;"> BUT it's size has to be number_of_str*max_len_str where max_len_str is somewhat arbitrary, e.g. 32.</span>
<span style="color: #b22222;"> </span>*/
<span style="color: #228b22;">char</span>* <span style="color: #a0522d;">tmp_$group_dset$</span>;
tmp_$group_dset$ = CALLOC(size_$group_dset$*32, <span style="color: #228b22;">char</span>);
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">uint64_t</span> <span style="color: #a0522d;">i</span>=0 ; i&lt;size_$group_dset$ ; ++i) {
$group$-&gt;$group_dset$[i] = tmp_$group_dset$;
/* <span style="color: #b22222;">conventional fcanf with "%s" only return the string before the first space character</span>
<span style="color: #b22222;"> * to read string with spaces use "%[^\n]" possible with space before or after, i.e. " %[^\n]"</span>
<span style="color: #b22222;"> * Q: depending on what ? </span>*/
rc = fscanf(f, <span style="color: #8b2252;">" %1023[^\n]"</span>, tmp_$group_dset$);
<span style="color: #228b22;">unsigned</span> <span style="color: #228b22;">int</span> $group_num$_isSet;
/* <span style="color: #b22222;">additional parameter $group_num$_isSet is needed to suppress warning when fscanf into bool variable using %u or %d </span>*/
rc = fscanf(f, <span style="color: #8b2252;">"%u"</span>, &amp;($group_num$_isSet));
$group$-&gt;$group_num$_isSet = (bool) $group_num$_isSet;
assert(!(rc != 1));
<span style="color: #a020f0;">if</span> (rc != 1) {
FREE(buffer);
fclose(f);
FREE($group$-&gt;$group_dset$);
FREE($group$);
/* <span style="color: #b22222;">Set pointer to the struct so that the garbage collector can do the job on file handle </span>*/
file-&gt;$group$ = $group$;
rc_free = trexio_text_free_$group$(file);
assert(rc_free == TREXIO_SUCCESS);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
<span style="color: #228b22;">size_t</span> <span style="color: #a0522d;">tmp_$group_dset$_len</span> = strlen($group$-&gt;$group_dset$[i]);
tmp_$group_dset$ += tmp_$group_dset$_len + 1;
<span style="color: #a020f0;">if</span> ($group$-&gt;$group_num$_isSet == <span style="color: #008b8b;">true</span>) {
rc = fscanf(f, <span style="color: #8b2252;">"%1023s"</span>, buffer);
assert(!((rc != 1) || (strcmp(buffer, <span style="color: #8b2252;">"$group_num$"</span>) != 0)));
<span style="color: #a020f0;">if</span> ((rc != 1) || (strcmp(buffer, <span style="color: #8b2252;">"$group_num$"</span>) != 0)) {
FREE(buffer);
fclose(f);
/* <span style="color: #b22222;">Set pointer to the struct so that the garbage collector can do the job on file handle </span>*/
file-&gt;$group$ = $group$;
rc_free = trexio_text_free_$group$(file);
assert(rc_free == TREXIO_SUCCESS);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
rc = fscanf(f, <span style="color: #8b2252;">"%$group_num_format_scanf$"</span>, &amp;($group$-&gt;$group_num$));
assert(!(rc != 1));
<span style="color: #a020f0;">if</span> (rc != 1) {
FREE(buffer);
fclose(f);
/* <span style="color: #b22222;">Set pointer to the struct so that the garbage collector can do the job on file handle </span>*/
file-&gt;$group$ = $group$;
rc_free = trexio_text_free_$group$(file);
assert(rc_free == TREXIO_SUCCESS);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
}
// <span style="color: #b22222;">END REPEAT GROUP_NUM</span>
// <span style="color: #b22222;">START REPEAT GROUP_ATTR_STR</span>
} <span style="color: #a020f0;">else</span> <span style="color: #a020f0;">if</span> (strcmp(buffer, <span style="color: #8b2252;">"len_$group_str$"</span>) == 0) {
rc = fscanf(f, <span style="color: #8b2252;">"%"</span> SCNu64 <span style="color: #8b2252;">""</span>, &amp;($group$-&gt;len_$group_str$));
assert(!(rc != 1));
<span style="color: #a020f0;">if</span> (rc != 1) {
FREE(buffer);
fclose(f);
/* <span style="color: #b22222;">Set pointer to the struct so that the garbage collector can do the job on file handle </span>*/
file-&gt;$group$ = $group$;
rc_free = trexio_text_free_$group$(file);
assert(rc_free == TREXIO_SUCCESS);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
rc = fscanf(f, <span style="color: #8b2252;">"%1023s"</span>, buffer);
assert(!((rc != 1) || (strcmp(buffer, <span style="color: #8b2252;">"$group_str$"</span>) != 0)));
<span style="color: #a020f0;">if</span> ((rc != 1) || (strcmp(buffer, <span style="color: #8b2252;">"$group_str$"</span>) != 0)) {
FREE(buffer);
fclose(f);
/* <span style="color: #b22222;">Set pointer to the struct so that the garbage collector can do the job on file handle </span>*/
file-&gt;$group$ = $group$;
rc_free = trexio_text_free_$group$(file);
assert(rc_free == TREXIO_SUCCESS);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
<span style="color: #a020f0;">if</span> ($group$-&gt;len_$group_str$ != 0) {
$group$-&gt;$group_str$ = CALLOC($group$-&gt;len_$group_str$, <span style="color: #228b22;">char</span>);
assert (!($group$-&gt;$group_str$ == <span style="color: #008b8b;">NULL</span>));
<span style="color: #a020f0;">if</span> ($group$-&gt;$group_str$ == <span style="color: #008b8b;">NULL</span>) {
FREE(buffer);
fclose(f);
/* <span style="color: #b22222;">Set pointer to the struct so that the garbage collector can do the job on file handle </span>*/
file-&gt;$group$ = $group$;
rc_free = trexio_text_free_$group$(file);
assert(rc_free == TREXIO_SUCCESS);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
rc = fscanf(f, <span style="color: #8b2252;">" %1023[^\n]"</span>, $group$-&gt;$group_str$);
assert(!(rc != 1));
<span style="color: #a020f0;">if</span> (rc != 1) {
FREE(buffer);
fclose(f);
/* <span style="color: #b22222;">Set pointer to the struct so that the garbage collector can do the job on file handle </span>*/
file-&gt;$group$ = $group$;
rc_free = trexio_text_free_$group$(file);
assert(rc_free == TREXIO_SUCCESS);
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
}
}
// <span style="color: #b22222;">END REPEAT GROUP_ATTR_STR</span>
} <span style="color: #a020f0;">else</span> {
<span style="color: #a020f0;">continue</span>;
}
}
// <span style="color: #b22222;">END REPEAT GROUP_DSET_STR</span>
FREE(buffer);
fclose(f);
@ -848,8 +857,8 @@ trexio_text_read_$group$ (<span style="color: #228b22;">trexio_text_t</span>* <s
</div>
</div>
<div id="outline-container-org8ebf193" class="outline-3">
<h3 id="org8ebf193"><span class="section-number-3">1.6</span> Template for text flush a group</h3>
<div id="outline-container-org4e4514c" class="outline-3">
<h3 id="org4e4514c"><span class="section-number-3">1.6</span> Template for text flush a group</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>
@ -913,8 +922,8 @@ trexio_text_read_$group$ (<span style="color: #228b22;">trexio_text_t</span>* <s
</div>
</div>
<div id="outline-container-orgc501e50" class="outline-3">
<h3 id="orgc501e50"><span class="section-number-3">1.7</span> Template for text free memory</h3>
<div id="outline-container-org5198ec7" class="outline-3">
<h3 id="org5198ec7"><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.
@ -961,8 +970,8 @@ Memory is allocated when reading. The following function frees memory.
</div>
</div>
<div id="outline-container-org8a5dec1" class="outline-3">
<h3 id="org8a5dec1"><span class="section-number-3">1.8</span> Template for has/read/write a numerical attribute</h3>
<div id="outline-container-orgb097852" class="outline-3">
<h3 id="orgb097852"><span class="section-number-3">1.8</span> Template for has/read/write a 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>
@ -1025,8 +1034,8 @@ Memory is allocated when reading. The following function frees memory.
</div>
</div>
<div id="outline-container-org39dfd8c" class="outline-3">
<h3 id="org39dfd8c"><span class="section-number-3">1.9</span> Template for has/read/write a dataset of numerical data</h3>
<div id="outline-container-org3df4185" class="outline-3">
<h3 id="org3df4185"><span class="section-number-3">1.9</span> Template for has/read/write a 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.
@ -1122,8 +1131,8 @@ The <code>group_dset</code> array is assumed allocated with the appropriate size
</div>
</div>
</div>
<div id="outline-container-org8df20be" class="outline-3">
<h3 id="org8df20be"><span class="section-number-3">1.10</span> Template for has/read/write a dataset of strings</h3>
<div id="outline-container-orgb6b7c3a" class="outline-3">
<h3 id="orgb6b7c3a"><span class="section-number-3">1.10</span> Template for has/read/write a 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.
@ -1224,8 +1233,8 @@ The <code>group_dset</code> array is assumed allocated with the appropriate size
</div>
</div>
</div>
<div id="outline-container-org278f65a" class="outline-3">
<h3 id="org278f65a"><span class="section-number-3">1.11</span> Template for has/read/write a string attribute</h3>
<div id="outline-container-org98e611c" class="outline-3">
<h3 id="org98e611c"><span class="section-number-3">1.11</span> Template for has/read/write a 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>
@ -1299,8 +1308,8 @@ The <code>group_dset</code> array is assumed allocated with the appropriate size
</div>
</div>
</div>
<div id="outline-container-org6deb4a7" class="outline-3">
<h3 id="org6deb4a7"><span class="section-number-3">1.12</span> Template for has/read/write the dataset of sparse data</h3>
<div id="outline-container-orgaceea75" class="outline-3">
<h3 id="orgaceea75"><span class="section-number-3">1.12</span> Template for has/read/write the dataset of sparse data</h3>
<div class="outline-text-3" id="text-1-12">
<p>
Each sparse array is stored in a separate <code>.txt</code> file due to the fact that sparse I/O has to be decoupled
@ -1574,8 +1583,8 @@ User provides indices and values of the sparse array as two separate variables.
</div>
</div>
<div id="outline-container-org91b498a" class="outline-3">
<h3 id="org91b498a"><span class="section-number-3">1.13</span> Template for text delete a group (UNSAFE mode)</h3>
<div id="outline-container-org0b87886" class="outline-3">
<h3 id="org0b87886"><span class="section-number-3">1.13</span> Template for text delete a group (UNSAFE mode)</h3>
<div class="outline-text-3" id="text-1-13">
<div class="org-src-container">
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
@ -1606,7 +1615,7 @@ User provides indices and values of the sparse array as two separate variables.
</div>
<div id="postamble" class="status">
<p class="author">Author: TREX-CoE</p>
<p class="date">Created: 2022-02-04 Fri 10:23</p>
<p class="date">Created: 2022-02-16 Wed 13:52</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>

116
trex.html
View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2022-02-04 Fri 10:23 -->
<!-- 2022-02-16 Wed 13:52 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>TREX Configuration file</title>
@ -333,33 +333,33 @@ for the JavaScript code in this tag.
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#org79f2c2d">1. Metadata (metadata group)</a></li>
<li><a href="#org5b5d03b">2. Electron (electron group)</a></li>
<li><a href="#orga1d298b">3. Nucleus (nucleus group)</a></li>
<li><a href="#org8028638">4. Effective core potentials (ecp group)</a>
<li><a href="#org3a8ad6a">1. Metadata (metadata group)</a></li>
<li><a href="#org2f05f94">2. Electron (electron group)</a></li>
<li><a href="#org70c2027">3. Nucleus (nucleus group)</a></li>
<li><a href="#orgd2b2dd0">4. Effective core potentials (ecp group)</a>
<ul>
<li><a href="#org615b106">4.1. Example</a></li>
<li><a href="#orge301a99">4.1. Example</a></li>
</ul>
</li>
<li><a href="#org14af4ae">5. Basis set (basis group)</a>
<li><a href="#org74a3a63">5. Basis set (basis group)</a>
<ul>
<li><a href="#org2a093ba">5.1. Example</a></li>
<li><a href="#org615c5d4">5.1. Example</a></li>
</ul>
</li>
<li><a href="#orgb7615f7">6. Atomic orbitals (ao group)</a>
<li><a href="#org072996e">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="#orgd8ca012">7. Molecular orbitals (mo group)</a>
<li><a href="#org9781300">7. Molecular orbitals (mo group)</a>
<ul>
<li><a href="#orgf0dc92e">7.1. One-electron integrals (<code>mo_1e_int</code> group)</a></li>
<li><a href="#org0780632">7.2. Two-electron integrals (<code>mo_2e_int</code> group)</a></li>
<li><a href="#orgd258c0b">7.1. One-electron integrals (<code>mo_1e_int</code> group)</a></li>
<li><a href="#orgb9f5c74">7.2. Two-electron integrals (<code>mo_2e_int</code> group)</a></li>
</ul>
</li>
<li><a href="#orgd31d661">8. <span class="todo TODO">TODO</span> Slater determinants</a></li>
<li><a href="#org25c068c">9. Reduced density matrices (rdm group)</a></li>
<li><a href="#org4baa7ea">8. <span class="todo TODO">TODO</span> Slater determinants</a></li>
<li><a href="#orgc1cf92e">9. Reduced density matrices (rdm group)</a></li>
</ul>
</div>
</div>
@ -409,8 +409,8 @@ fetched using multiple function calls to perform I/O on buffers.
</p>
<div id="outline-container-org79f2c2d" class="outline-2">
<h2 id="org79f2c2d"><span class="section-number-2">1</span> Metadata (metadata group)</h2>
<div id="outline-container-org3a8ad6a" class="outline-2">
<h2 id="org3a8ad6a"><span class="section-number-2">1</span> Metadata (metadata group)</h2>
<div class="outline-text-2" id="text-1">
<p>
As we expect our files to be archived in open-data repositories, we
@ -420,7 +420,7 @@ which have participated to the creation of the file, a list of
authors of the file, and a textual description.
</p>
<table id="org5d1a0f4" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="orgabd6d58" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -501,15 +501,15 @@ then the <code>unsafe</code> attribute value can be manually overwritten (in uns
</div>
</div>
<div id="outline-container-org5b5d03b" class="outline-2">
<h2 id="org5b5d03b"><span class="section-number-2">2</span> Electron (electron group)</h2>
<div id="outline-container-org2f05f94" class="outline-2">
<h2 id="org2f05f94"><span class="section-number-2">2</span> Electron (electron group)</h2>
<div class="outline-text-2" id="text-2">
<p>
We consider wave functions expressed in the spin-free formalism, where
the number of &uarr; and &darr; electrons is fixed.
</p>
<table id="org2bd5097" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="orga4de617" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -548,15 +548,15 @@ the number of &uarr; and &darr; electrons is fixed.
</div>
</div>
<div id="outline-container-orga1d298b" class="outline-2">
<h2 id="orga1d298b"><span class="section-number-2">3</span> Nucleus (nucleus group)</h2>
<div id="outline-container-org70c2027" class="outline-2">
<h2 id="org70c2027"><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="org43615e5" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="org9a473ab" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -623,8 +623,8 @@ given in Cartesian \((x,y,z)\) format.
</div>
</div>
<div id="outline-container-org8028638" class="outline-2">
<h2 id="org8028638"><span class="section-number-2">4</span> Effective core potentials (ecp group)</h2>
<div id="outline-container-orgd2b2dd0" class="outline-2">
<h2 id="orgd2b2dd0"><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
@ -657,7 +657,7 @@ The functions \(V_{A\ell}\) are parameterized as:
See <a href="http://dx.doi.org/10.1063/1.4984046">http://dx.doi.org/10.1063/1.4984046</a> or <a href="https://doi.org/10.1063/1.5121006">https://doi.org/10.1063/1.5121006</a> for more info.
</p>
<table id="orgb5c9130" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="org76c244b" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -755,8 +755,8 @@ The latter causes issues when written before <code>ang_mom</code> in the TREXIO
</p>
</div>
<div id="outline-container-org615b106" class="outline-3">
<h3 id="org615b106"><span class="section-number-3">4.1</span> Example</h3>
<div id="outline-container-orge301a99" class="outline-3">
<h3 id="orge301a99"><span class="section-number-3">4.1</span> Example</h3>
<div class="outline-text-3" id="text-4-1">
<p>
For example, consider H<sub>2</sub> molecule with the following
@ -819,8 +819,8 @@ power = [
</div>
</div>
<div id="outline-container-org14af4ae" class="outline-2">
<h2 id="org14af4ae"><span class="section-number-2">5</span> Basis set (basis group)</h2>
<div id="outline-container-org74a3a63" class="outline-2">
<h2 id="org74a3a63"><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
@ -873,7 +873,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="org5276370" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="org0b5051d" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -967,8 +967,8 @@ All the basis set parameters are stored in one-dimensional arrays:
</table>
</div>
<div id="outline-container-org2a093ba" class="outline-3">
<h3 id="org2a093ba"><span class="section-number-3">5.1</span> Example</h3>
<div id="outline-container-org615c5d4" class="outline-3">
<h3 id="org615c5d4"><span class="section-number-3">5.1</span> Example</h3>
<div class="outline-text-3" id="text-5-1">
<p>
For example, consider H<sub>2</sub> with the following basis set (in GAMESS
@ -1046,8 +1046,8 @@ prim_factor =
</div>
</div>
<div id="outline-container-orgb7615f7" class="outline-2">
<h2 id="orgb7615f7"><span class="section-number-2">6</span> Atomic orbitals (ao group)</h2>
<div id="outline-container-org072996e" class="outline-2">
<h2 id="org072996e"><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
@ -1100,13 +1100,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="#org14af4ae">Basis set</a> section) to \(\mathcal{N}_{z^2}\), which is the
the <a href="#org74a3a63">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="org7102ac0" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="org084943a" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -1158,8 +1158,8 @@ introduced here should be \(\frac{\mathcal{N}_{xy}}{\mathcal{N}_{z^2}}\).
</table>
</div>
<div id="outline-container-org3f0ca1b" class="outline-3">
<h3 id="ao_one_e"><a id="org3f0ca1b"></a><span class="section-number-3">6.1</span> One-electron integrals (<code>ao_1e_int</code> group)</h3>
<div id="outline-container-org832b8db" class="outline-3">
<h3 id="ao_one_e"><a id="org832b8db"></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}}
@ -1177,7 +1177,7 @@ The one-electron integrals for a one-electron operator \(\hat{O}\) are
over atomic orbitals.
</p>
<table id="orgd7ec17f" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="orgc569c13" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -1244,8 +1244,8 @@ over atomic orbitals.
</div>
</div>
<div id="outline-container-orge72c642" class="outline-3">
<h3 id="ao_two_e"><a id="orge72c642"></a><span class="section-number-3">6.2</span> Two-electron integrals (<code>ao_2e_int</code> group)</h3>
<div id="outline-container-org317e5f8" class="outline-3">
<h3 id="ao_two_e"><a id="org317e5f8"></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
@ -1266,7 +1266,7 @@ notation.
\mathbf{r}_j \vert)}{\vert \mathbf{r}_i - \mathbf{r}_j \vert} \] : electron-electron long range potential</li>
</ul>
<table id="orgc706b40" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="org2c308db" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -1306,10 +1306,10 @@ notation.
</div>
</div>
<div id="outline-container-orgd8ca012" class="outline-2">
<h2 id="orgd8ca012"><span class="section-number-2">7</span> Molecular orbitals (mo group)</h2>
<div id="outline-container-org9781300" class="outline-2">
<h2 id="org9781300"><span class="section-number-2">7</span> Molecular orbitals (mo group)</h2>
<div class="outline-text-2" id="text-7">
<table id="org93f66ff" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="orgedd33a3" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -1375,8 +1375,8 @@ notation.
</table>
</div>
<div id="outline-container-orgf0dc92e" class="outline-3">
<h3 id="orgf0dc92e"><span class="section-number-3">7.1</span> One-electron integrals (<code>mo_1e_int</code> group)</h3>
<div id="outline-container-orgd258c0b" class="outline-3">
<h3 id="orgd258c0b"><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
@ -1384,7 +1384,7 @@ The operators as the same as those defined in the
the basis of molecular orbitals.
</p>
<table id="org62759d1" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="org38894b9" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -1451,8 +1451,8 @@ the basis of molecular orbitals.
</div>
</div>
<div id="outline-container-org0780632" class="outline-3">
<h3 id="org0780632"><span class="section-number-3">7.2</span> Two-electron integrals (<code>mo_2e_int</code> group)</h3>
<div id="outline-container-orgb9f5c74" class="outline-3">
<h3 id="orgb9f5c74"><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
@ -1460,7 +1460,7 @@ The operators as the same as those defined in the
the basis of molecular orbitals.
</p>
<table id="org38d1460" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="orgede5f9d" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -1500,11 +1500,11 @@ the basis of molecular orbitals.
</div>
</div>
<div id="outline-container-orgd31d661" class="outline-2">
<h2 id="orgd31d661"><span class="section-number-2">8</span> <span class="todo TODO">TODO</span> Slater determinants</h2>
<div id="outline-container-org4baa7ea" class="outline-2">
<h2 id="org4baa7ea"><span class="section-number-2">8</span> <span class="todo TODO">TODO</span> Slater determinants</h2>
</div>
<div id="outline-container-org25c068c" class="outline-2">
<h2 id="org25c068c"><span class="section-number-2">9</span> Reduced density matrices (rdm group)</h2>
<div id="outline-container-orgc1cf92e" class="outline-2">
<h2 id="orgc1cf92e"><span class="section-number-2">9</span> Reduced density matrices (rdm group)</h2>
<div class="outline-text-2" id="text-9">
<p>
The reduced density matrices are defined in the basis of molecular
@ -1557,7 +1557,7 @@ The total energy can be computed as:
\]
</p>
<table id="org9c7c453" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="org601923e" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -1640,7 +1640,7 @@ The total energy can be computed as:
</div>
<div id="postamble" class="status">
<p class="author">Author: TREX-CoE</p>
<p class="date">Created: 2022-02-04 Fri 10:23</p>
<p class="date">Created: 2022-02-16 Wed 13:52</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>