diff --git a/README.html b/README.html index a9af86f9..0191ea49 100644 --- a/README.html +++ b/README.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + TREXIO source code documentation @@ -406,7 +406,7 @@

TREXIO source code documentation

Author: TREX-CoE

-

Created: 2024-03-22 Fri 14:46

+

Created: 2024-05-13 Mon 13:15

Validate

diff --git a/examples.html b/examples.html index a6367ae5..a0fe114f 100644 --- a/examples.html +++ b/examples.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Examples @@ -346,61 +346,61 @@

Examples

Table of Contents

-
-

1 Writing nuclear coordinates

+
+

1 Writing nuclear coordinates

Here is a demonstration of how to use TREXIO to write the nuclear @@ -410,8 +410,8 @@

1 Writing nuclear coor

-
-

1.1 C

+
+

1.1 C

#include <stdio.h>
@@ -461,8 +461,8 @@ 

1.1 C

-
-

1.2 Python

+
+

1.2 Python

This code uses the TREXIO Python binding to create a new TREXIO file named @@ -509,8 +509,8 @@

1.2 Python

-
-

1.3 Fortran

+
+

1.3 Fortran

program trexio_water
@@ -567,12 +567,12 @@ 

1.3 Fortran

-
-

2 Accessing sparse quantities (integrals)

+
+

2 Accessing sparse quantities (integrals)

-
-

2.1 Fortran

+
+

2.1 Fortran

program print_energy
@@ -618,8 +618,8 @@ 

2.1 Fortran

-
-

2.1.1 Declare Temporary variables

+
+

2.1.1 Declare Temporary variables

integer                       :: i, j, k, l, m
@@ -634,8 +634,8 @@ 

2.1.1 Declare Temporar

-
-

2.1.2 Obtain the name of the TREXIO file from the command line, and open it for reading

+
+

2.1.2 Obtain the name of the TREXIO file from the command line, and open it for reading

call getarg(1, filename)
@@ -651,8 +651,8 @@ 

2.1.2 Obtain the name

-
-

2.1.3 Read the nuclear repulsion energy

+
+

2.1.3 Read the nuclear repulsion energy

rc = trexio_read_nucleus_repulsion(f, E_nn)
@@ -666,8 +666,8 @@ 

2.1.3 Read the nuclear

-
-

2.1.4 Read the number of molecular orbitals

+
+

2.1.4 Read the number of molecular orbitals

rc = trexio_read_mo_num(f, n)
@@ -681,8 +681,8 @@ 

2.1.4 Read the number

-
-

2.1.5 Allocate memory

+
+

2.1.5 Allocate memory

allocate( D(n,n), h0(n,n) )
@@ -694,8 +694,8 @@ 

2.1.5 Allocate memory<

-
-

2.1.6 Read one-electron quantities

+
+

2.1.6 Read one-electron quantities

rc = trexio_has_mo_1e_int_core_hamiltonian(f)
@@ -727,8 +727,8 @@ 

2.1.6 Read one-electro

-
-

2.1.7 Read two-electron quantities

+
+

2.1.7 Read two-electron quantities

Reading is done with OpenMP. Each thread reads its own buffer, and @@ -744,8 +744,8 @@

2.1.7 Read two-electro

-
-
2.1.7.1 Electron repulsion integrals
+
+
2.1.7.1 Electron repulsion integrals
rc = trexio_has_mo_2e_int_eri(f)
@@ -794,8 +794,8 @@ 
2.1.7.1 Electron repul
-
-
2.1.7.2 Reduced density matrix
+
+
2.1.7.2 Reduced density matrix
rc = trexio_has_rdm_2e(f)
@@ -839,8 +839,8 @@ 
2.1.7.2 Reduced densit
-
-

2.1.8 Compute the energy

+
+

2.1.8 Compute the energy

When the orbitals are real, we can use @@ -886,8 +886,8 @@

2.1.8 Compute the ener

-
-

2.1.9 Terminate

+
+

2.1.9 Terminate

  deallocate( D, h0, G, W )
@@ -899,8 +899,8 @@ 

2.1.9 Terminate

-
-

2.2 Python

+
+

2.2 Python

import sys
@@ -934,8 +934,8 @@ 

2.2 Python

-
-

2.2.1 Obtain the name of the TREXIO file from the command line, and open it for reading

+
+

2.2.1 Obtain the name of the TREXIO file from the command line, and open it for reading

filename = sys.argv[1]
@@ -945,8 +945,8 @@ 

2.2.1 Obtain the name

-
-

2.2.2 Read the nuclear repulsion energy

+
+

2.2.2 Read the nuclear repulsion energy

E_nn = trexio.read_nucleus_repulsion(f)
@@ -955,8 +955,8 @@ 

2.2.2 Read the nuclear

-
-

2.2.3 Read the number of molecular orbitals

+
+

2.2.3 Read the number of molecular orbitals

n = trexio.read_mo_num(f)
@@ -965,8 +965,8 @@ 

2.2.3 Read the number

-
-

2.2.4 Read one-electron quantities

+
+

2.2.4 Read one-electron quantities

if not trexio.has_mo_1e_int_core_hamiltonian(f):
@@ -985,12 +985,12 @@ 

2.2.4 Read one-electro

-
-

2.2.5 Read two-electron quantities

+
+

2.2.5 Read two-electron quantities

-
-
2.2.5.1 Electron repulsion integrals
+
+
2.2.5.1 Electron repulsion integrals
if not trexio.has_mo_2e_int_eri(f):
@@ -1020,8 +1020,8 @@ 
2.2.5.1 Electron repul
-
-
2.2.5.2 Reduced density matrix
+
+
2.2.5.2 Reduced density matrix
if not trexio.has_rdm_2e(f):
@@ -1043,8 +1043,8 @@ 
2.2.5.2 Reduced densit
-
-

2.2.6 Compute the energy

+
+

2.2.6 Compute the energy

When the orbitals are real, we can use @@ -1073,12 +1073,12 @@

2.2.6 Compute the ener

-
-

3 Reading determinants

+
+

3 Reading determinants

-
-

3.1 Fortran

+
+

3.1 Fortran

program test
@@ -1157,7 +1157,7 @@ 

3.1 Fortran

Author: TREX-CoE

-

Created: 2024-03-22 Fri 14:46

+

Created: 2024-05-13 Mon 13:15

Validate

diff --git a/index.html b/index.html index a9af86f9..0191ea49 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + TREXIO source code documentation @@ -406,7 +406,7 @@

TREXIO source code documentation

Author: TREX-CoE

-

Created: 2024-03-22 Fri 14:46

+

Created: 2024-05-13 Mon 13:15

Validate

diff --git a/intro.html b/intro.html index d11970ce..54b3d816 100644 --- a/intro.html +++ b/intro.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Motivation @@ -384,7 +384,7 @@

Motivation

Author: TREX-CoE

-

Created: 2024-03-22 Fri 14:46

+

Created: 2024-05-13 Mon 13:15

Validate

diff --git a/lib.html b/lib.html index 3028f229..98a39be8 100644 --- a/lib.html +++ b/lib.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + The TREXIO library @@ -346,19 +346,19 @@

The TREXIO library

Table of Contents

-
-

1 Format specification

+
+

1 Format specification

@@ -388,8 +388,8 @@

1 Format specification

-
-

1.1 Organization of the data

+
+

1.1 Organization of the data

The data in TREXIO are organized into groups, each containing @@ -405,8 +405,8 @@

1.1 Organization of th

-
-

1.2 Data types

+
+

1.2 Data types

So that TREXIO can be used in any language, we use a limited number @@ -473,8 +473,8 @@

1.2 Data types

-
-

2 The TREXIO library

+
+

2 The TREXIO library

@@ -497,8 +497,8 @@

2 The TREXIO library

-
-

2.1 The front-end

+
+

2.1 The front-end

By using the TREXIO library, users can store and extract data in a @@ -539,8 +539,8 @@

2.1 The front-end

-
-

2.2 The back-end

+
+

2.2 The back-end

At present, TREXIO supports two back-ends: one relying only on the @@ -610,8 +610,8 @@

2.2 The back-end

-
-

2.3 Supported languages

+
+

2.3 Supported languages

One of the main benefits of using C as the interface for a library is @@ -668,8 +668,8 @@

2.3 Supported language

-
-

2.4 Source code generation and documentation

+
+

2.4 Source code generation and documentation

Source code generation is a valuable technique that can significantly @@ -723,8 +723,8 @@

2.4 Source code genera

-
-

2.5 Availability

+
+

2.5 Availability

The TREXIO library is designed to be portable and easy to install @@ -754,7 +754,7 @@

2.5 Availability

Author: TREX-CoE

-

Created: 2024-03-22 Fri 14:46

+

Created: 2024-05-13 Mon 13:15

Validate

diff --git a/templator_front.html b/templator_front.html index bc3f037d..26957b2e 100644 --- a/templator_front.html +++ b/templator_front.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Front end API @@ -346,207 +346,207 @@

Front end API

Table of Contents

-
-

1 Coding conventions

+
+

1 Coding conventions

  • integer types will be defined using types given in stdint.h
  • @@ -561,8 +561,8 @@

    1 Coding conventions

-
-

1.1 Memory allocation

+
+

1.1 Memory allocation

Memory allocation of structures can be facilitated by using the @@ -598,8 +598,8 @@

1.1 Memory allocation<

-
-

2 Front end

+
+

2 Front end

All calls to TREXIO are thread-safe. @@ -607,10 +607,10 @@

2 Front end

-
-

2.1 Error handling

+
+

2.1 Error handling

- +
@@ -905,8 +905,8 @@

2.1 Error handling

-
-

2.1.1 Decoding errors

+
+

2.1.1 Decoding errors

The trexio_string_of_error converts an exit code into a string. The @@ -932,8 +932,8 @@

2.1.1 Decoding errors<

-
-
2.1.1.1 C source code
+
+
2.1.1.1 C source code
const char*
@@ -1071,8 +1071,8 @@ 
2.1.1.1 C source code<
-
-
2.1.1.2 Fortran interface
+
+
2.1.1.2 Fortran interface
interface
@@ -1088,8 +1088,8 @@ 
2.1.1.2 Fortran interf
-
-
2.1.1.3 Python interface
+
+
2.1.1.3 Python interface
class Error(Exception):
@@ -1122,8 +1122,8 @@ 
2.1.1.3 Python interfa
-
-

2.2 Back ends

+
+

2.2 Back ends

TREXIO has several back ends: @@ -1152,8 +1152,8 @@

2.2 Back ends

-
-

2.2.1 C

+
+

2.2.1 C

typedef int32_t back_end_t;
@@ -1202,8 +1202,8 @@ 

2.2.1 C

-
-

2.2.2 Fortran

+
+

2.2.2 Fortran

  integer(trexio_back_end_t), parameter :: TREXIO_HDF5 = 0
@@ -1242,8 +1242,8 @@ 

2.2.2 Fortran

-
-

2.2.3 Python

+
+

2.2.3 Python

# define TREXIO back ends
@@ -1258,8 +1258,8 @@ 

2.2.3 Python

-
-

2.3 Read/write behavior

+
+

2.3 Read/write behavior

Every time a reading function is called, the data is read from the @@ -1288,8 +1288,8 @@

2.3 Read/write behavio

-
-

2.4 TREXIO file type

+
+

2.4 TREXIO file type

trexio_s is the the main type for TREXIO files, visible to the users @@ -1453,8 +1453,8 @@

2.4 TREXIO file type

-
-

2.5 File opening

+
+

2.5 File opening

trexio_open creates a new TREXIO file or opens the existing one. @@ -1510,8 +1510,8 @@

2.5 File opening

-
-

2.5.1 C

+
+

2.5.1 C

trexio_t*
@@ -1828,8 +1828,8 @@ 

2.5.1 C

-
-

2.5.2 Fortran

+
+

2.5.2 Fortran

interface
@@ -1847,8 +1847,8 @@ 

2.5.2 Fortran

-
-

2.5.3 Python

+
+

2.5.3 Python

def _open(file_name: str, mode: str, back_end: int):
@@ -1896,8 +1896,8 @@ 

2.5.3 Python

-
-

2.5.4 Zero-based versus one-based arrays of indices

+
+

2.5.4 Zero-based versus one-based arrays of indices

Because arrays are zero-based in Fortran, we need to set a flag to @@ -1930,8 +1930,8 @@

2.5.4 Zero-based versu

-
-

2.6 File closing

+
+

2.6 File closing

trexio_close closes an existing trexio_t file. @@ -1948,8 +1948,8 @@

2.6 File closing

-
-

2.6.1 C

+
+

2.6.1 C

trexio_exit_code
@@ -2034,8 +2034,8 @@ 

2.6.1 C

-
-

2.6.2 Fortran

+
+

2.6.2 Fortran

interface
@@ -2050,8 +2050,8 @@ 

2.6.2 Fortran

-
-

2.6.3 Python

+
+

2.6.3 Python

def _close(trexio_file):
@@ -2069,8 +2069,8 @@ 

2.6.3 Python

-
-

2.7 File flushing

+
+

2.7 File flushing

trexio_flush flushes all buffers into the trexio_t file. @@ -2087,8 +2087,8 @@

2.7 File flushing

-
-

2.7.1 C

+
+

2.7.1 C

trexio_exit_code
@@ -2129,8 +2129,8 @@ 

2.7.1 C

-
-

2.7.2 Fortran

+
+

2.7.2 Fortran

interface
@@ -2145,8 +2145,8 @@ 

2.7.2 Fortran

-
-

2.7.3 Python

+
+

2.7.3 Python

def flush(trexio_file):
@@ -2164,8 +2164,8 @@ 

2.7.3 Python

-
-

2.8 File existence

+
+

2.8 File existence

trexio_inquire check whether TREXIO file exists. @@ -2202,8 +2202,8 @@

2.8 File existence

-
-

2.8.1 C

+
+

2.8.1 C

trexio_exit_code
@@ -2233,8 +2233,8 @@ 

2.8.1 C

-
-

2.8.2 Fortran

+
+

2.8.2 Fortran

The function below is a C binding. @@ -2254,8 +2254,8 @@

2.8.2 Fortran

-
-

2.8.3 Python

+
+

2.8.3 Python

def _inquire(file_name: str) -> bool:
@@ -2274,8 +2274,8 @@ 

2.8.3 Python

-
-

2.9 File copy

+
+

2.9 File copy

trexio_cp copies a TREXIO file using cp. The destination file @@ -2298,8 +2298,8 @@

2.9 File copy

-
-

2.9.1 C

+
+

2.9.1 C

@@ -2372,8 +2372,8 @@ 

2.9.1 C

-
-

2.9.2 Fortran

+
+

2.9.2 Fortran

interface
@@ -2388,8 +2388,8 @@ 

2.9.2 Fortran

-
-

2.9.3 Python

+
+

2.9.3 Python

def _cp(source: str, destination: str):
@@ -2421,8 +2421,8 @@ 

2.9.3 Python

-
-

2.10 File state

+
+

2.10 File state

Note: the use of the functions below is discouraged as of version 2.3.0. @@ -2459,8 +2459,8 @@

2.10 File state

-
-

2.10.1 C

+
+

2.10.1 C

trexio_exit_code
@@ -2504,8 +2504,8 @@ 

2.10.1 C

-
-

2.10.2 Fortran

+
+

2.10.2 Fortran

interface
@@ -2530,8 +2530,8 @@ 

2.10.2 Fortran

-
-

2.10.3 Python

+
+

2.10.3 Python

See TREXIO File Python class. @@ -2540,8 +2540,8 @@

2.10.3 Python

-
-

2.11 Tasks to be done before closing

+
+

2.11 Tasks to be done before closing

trexio_exit_code
@@ -2642,12 +2642,12 @@ 

2.11 Tasks to be done

-
-

3 Templates for front end

+
+

3 Templates for front end

-
-

3.1 Description

+
+

3.1 Description

Consider the following block of trex.json: @@ -2868,12 +2868,12 @@

3.1 Description

-
-

3.2 Templates for front end hasgroup functions

+
+

3.2 Templates for front end hasgroup functions

-
-

3.2.1 Introduction

+
+

3.2.1 Introduction

This section concerns API calls related to TREXIO groups @@ -2903,8 +2903,8 @@

3.2.1 Introduction

-
-

3.2.2 C templates for front end

+
+

3.2.2 C templates for front end

The C templates that correspond to each of the abovementioned @@ -2913,12 +2913,12 @@

3.2.2 C templates for

-
-
3.2.2.1 Function declarations
+
+
3.2.2.1 Function declarations
-
-
3.2.2.2 Source code
+
+
3.2.2.2 Source code
trexio_exit_code
@@ -2955,8 +2955,8 @@ 
3.2.2.2 Source code
-
-

3.2.3 Fortran templates for front end

+
+

3.2.3 Fortran templates for front end

The Fortran templates that provide an access to the C API calls from Fortran. @@ -2976,8 +2976,8 @@

3.2.3 Fortran template

-
-

3.2.4 Python templates for front end

+
+

3.2.4 Python templates for front end

def has_$group$(trexio_file) -> bool:
@@ -3004,12 +3004,12 @@ 

3.2.4 Python templates

-
-

3.3 Templates for front end has/read/write a single numerical attribute

+
+

3.3 Templates for front end has/read/write a single numerical attribute

-
-

3.3.1 Introduction

+
+

3.3.1 Introduction

This section concerns API calls related to numerical attributes, @@ -3080,8 +3080,8 @@

3.3.1 Introduction

-
-

3.3.2 C templates for front end

+
+

3.3.2 C templates for front end

The C templates that correspond to each of the abovementioned @@ -3095,12 +3095,12 @@

3.3.2 C templates for

-
-
3.3.2.1 Function declarations
+
+
3.3.2.1 Function declarations
-
-
3.3.2.2 Source code for double precision functions
+
+
3.3.2.2 Source code for double precision functions
trexio_exit_code
@@ -3181,8 +3181,8 @@ 
3.3.2.2 Source code fo
-
-
3.3.2.3 Source code for single precision functions
+
+
3.3.2.3 Source code for single precision functions
trexio_exit_code
@@ -3270,8 +3270,8 @@ 
3.3.2.3 Source code fo
-
-
3.3.2.4 Source code for default functions
+
+
3.3.2.4 Source code for default functions
trexio_exit_code
@@ -3326,8 +3326,8 @@ 
3.3.2.4 Source code fo
-
-

3.3.3 Fortran templates for front end

+
+

3.3.3 Fortran templates for front end

The Fortran templates that provide an access to the C API calls from Fortran. @@ -3419,8 +3419,8 @@

3.3.3 Fortran template

-
-

3.3.4 Python templates for front end

+
+

3.3.4 Python templates for front end

def write_$group_num$(trexio_file, num_w: $group_num_py_dtype$) -> None:
@@ -3493,12 +3493,12 @@ 

3.3.4 Python templates

-
-

3.4 Templates for front end has/read/write a dataset of numerical data

+
+

3.4 Templates for front end has/read/write a dataset of numerical data

-
-

3.4.1 Introduction

+
+

3.4.1 Introduction

This section concerns API calls related to datasets. @@ -3580,8 +3580,8 @@

3.4.1 Introduction

-
-

3.4.2 C templates for front end

+
+

3.4.2 C templates for front end

The C templates that correspond to each of the abovementioned functions can be found below. @@ -3592,12 +3592,12 @@

3.4.2 C templates for

-
-
3.4.2.1 Function declarations
+
+
3.4.2.1 Function declarations
-
-
3.4.2.2 Source code for double precision functions
+
+
3.4.2.2 Source code for double precision functions
trexio_exit_code
@@ -3760,8 +3760,8 @@ 
3.4.2.2 Source code fo
-
-
3.4.2.3 Source code for single precision functions
+
+
3.4.2.3 Source code for single precision functions
trexio_exit_code
@@ -3912,11 +3912,11 @@ 
3.4.2.3 Source code fo
-
-
3.4.2.4 Source code for memory-safe functions
+
+
3.4.2.4 Source code for memory-safe functions
-
trexio_exit_code rc;
+
trexio_exit_code rc;
 int64_t $group_dset_dim$ = 0;
 
 /* Error handling for this call is added by the generator */
@@ -4072,8 +4072,8 @@ 
3.4.2.4 Source code fo
-
-
3.4.2.5 Source code for default functions
+
+
3.4.2.5 Source code for default functions
trexio_exit_code
@@ -4148,8 +4148,8 @@ 
3.4.2.5 Source code fo
-
-

3.4.3 Fortran templates for front end

+
+

3.4.3 Fortran templates for front end

The Fortran templates that provide an access to the C API calls from Fortran. @@ -4241,8 +4241,8 @@

3.4.3 Fortran template

-
-

3.4.4 Python templates for front end

+
+

3.4.4 Python templates for front end

def write_$group_dset$(trexio_file, dset_w) -> None:
@@ -4414,12 +4414,12 @@ 

3.4.4 Python templates

-
-

3.5 Templates for front end has/read/write a dataset of sparse data

+
+

3.5 Templates for front end has/read/write a dataset of sparse data

-
-

3.5.1 Introduction

+
+

3.5.1 Introduction

Sparse data structures are used typically for large tensors such as @@ -4580,16 +4580,16 @@

3.5.1 Introduction

-
-

3.5.2 C templates for front end

+
+

3.5.2 C templates for front end

-
-
3.5.2.1 Function declarations
+
+
3.5.2.1 Function declarations
-
-
3.5.2.2 Source code for default functions
+
+
3.5.2.2 Source code for default functions
trexio_exit_code trexio_read_safe_$group_dset$(trexio_t* const file,
@@ -4892,8 +4892,8 @@ 
3.5.2.2 Source code fo
-
-

3.5.3 Fortran templates for front end

+
+

3.5.3 Fortran templates for front end

The Fortran templates that provide an access to the C API calls from Fortran. @@ -4994,8 +4994,8 @@

3.5.3 Fortran template

-
-

3.5.4 Python templates for front end

+
+

3.5.4 Python templates for front end

def write_$group_dset$(trexio_file: File, offset_file: int, buffer_size: int, indices: list, values: list) -> None:
@@ -5197,12 +5197,12 @@ 

3.5.4 Python templates

-
-

3.6 Templates for front end has/read/write a dataset of strings

+
+

3.6 Templates for front end has/read/write a dataset of strings

-
-

3.6.1 Introduction

+
+

3.6.1 Introduction

This section concerns API calls related to datasets of strings. @@ -5242,8 +5242,8 @@

3.6.1 Introduction

-
-

3.6.2 C templates for front end

+
+

3.6.2 C templates for front end

First parameter is the TREXIO file handle. Second parameter is the variable to be written/read @@ -5251,12 +5251,12 @@

3.6.2 C templates for

-
-
3.6.2.1 Function declarations
+
+
3.6.2.1 Function declarations
-
-
3.6.2.2 Source code for default functions
+
+
3.6.2.2 Source code for default functions
trexio_exit_code
@@ -5506,8 +5506,8 @@ 
3.6.2.2 Source code fo
-
-

3.6.3 Fortran templates for front end

+
+

3.6.3 Fortran templates for front end

The Fortran templates that provide an access to the C API calls from Fortran. @@ -5596,7 +5596,7 @@

3.6.3 Fortran template if (rc /= TREXIO_SUCCESS) then trexio_write_$group_dset$ = rc else - call trexio_strarray2str(dset, $group_dset_dim$, max_str_len, str_compiled) + call trexio_strarray2str(dset, $group_dset_dim$, str_compiled) trexio_write_$group_dset$ = trexio_write_$group_dset$_low(trex_file, str_compiled, max_str_len) endif @@ -5606,8 +5606,8 @@

3.6.3 Fortran template

-
-

3.6.4 Python templates for front end

+
+

3.6.4 Python templates for front end

def write_$group_dset$(trexio_file, dset_w: list) -> None:
@@ -5708,8 +5708,8 @@ 

3.6.4 Python templates

-
-

3.7 Templates for front end has/read/write a buffered vector

+
+

3.7 Templates for front end has/read/write a buffered vector

This corresponds to the buffer data type and is particularly useful for incremental additiona of values like @@ -5774,8 +5774,8 @@

3.7 Templates for fron

-
-

3.7.1 C source code

+
+

3.7.1 C source code

trexio_exit_code
@@ -5953,8 +5953,8 @@ 

3.7.1 C source code

-
-

3.7.2 Fortran interface

+
+

3.7.2 Fortran interface

The Fortran templates that provide an access to the C API calls from Fortran. @@ -6042,8 +6042,8 @@

3.7.2 Fortran interfac

-
-

3.7.3 Python interface

+
+

3.7.3 Python interface

def write_$group_dset$(trexio_file: File, offset_file: int, buffer_size: int, dset) -> None:
@@ -6194,12 +6194,12 @@ 

3.7.3 Python interface

-
-

3.8 Templates for front end has/read/write a single string attribute

+
+

3.8 Templates for front end has/read/write a single string attribute

-
-

3.8.1 Introduction

+
+

3.8.1 Introduction

This section concerns API calls related to string attributes. @@ -6239,16 +6239,16 @@

3.8.1 Introduction

-
-

3.8.2 C templates for front end

+
+

3.8.2 C templates for front end

-
-
3.8.2.1 Function declarations
+
+
3.8.2.1 Function declarations
-
-
3.8.2.2 Source code for default functions
+
+
3.8.2.2 Source code for default functions
trexio_exit_code
@@ -6352,8 +6352,8 @@ 
3.8.2.2 Source code fo
-
-

3.8.3 Fortran templates for front end

+
+

3.8.3 Fortran templates for front end

The Fortran templates that provide an access to the C API calls from Fortran. @@ -6433,8 +6433,8 @@

3.8.3 Fortran template

-
-

3.8.4 Python templates for front end

+
+

3.8.4 Python templates for front end

def write_$group_str$(trexio_file, str_w: str) -> None:
@@ -6509,12 +6509,12 @@ 

3.8.4 Python templates

-
-

3.9 Templates for front end delete an entire group (UNSAFE MODE)

+
+

3.9 Templates for front end delete an entire group (UNSAFE MODE)

-
-

3.9.1 Introduction

+
+

3.9.1 Introduction

This section concerns API calls related to string attributes. @@ -6544,8 +6544,8 @@

3.9.1 Introduction

-
-

3.9.2 C templates for front end

+
+

3.9.2 C templates for front end

trexio_exit_code
@@ -6580,8 +6580,8 @@ 

3.9.2 C templates for

-
-

3.9.3 Fortran templates for front end

+
+

3.9.3 Fortran templates for front end

The Fortran templates that provide an access to the C API calls from Fortran. @@ -6601,8 +6601,8 @@

3.9.3 Fortran template

-
-

3.9.4 Python templates for front end

+
+

3.9.4 Python templates for front end

def delete_$group$(trexio_file) -> None:
@@ -6628,8 +6628,8 @@ 

3.9.4 Python templates

-
-

4 Source code for the determinant part

+
+

4 Source code for the determinant part

Storage of the determinants is a particular case, @@ -6680,8 +6680,8 @@

4 Source code for the

-
-

4.0.1 C source code

+
+

4.0.1 C source code

trexio_exit_code
@@ -6881,8 +6881,8 @@ 

4.0.1 C source code

-
-

4.0.2 Fortran interface

+
+

4.0.2 Fortran interface

The Fortran templates that provide an access to the C API calls from Fortran. @@ -6969,8 +6969,8 @@

4.0.2 Fortran interfac

-
-

4.0.3 Python interface

+
+

4.0.3 Python interface

def write_determinant_list(trexio_file: File, offset_file: int, buffer_size: int, determinants: list) -> None:
@@ -7152,8 +7152,8 @@ 

4.0.3 Python interface

-
-

5 General helper functions

+
+

5 General helper functions

This section contains general helper functions like trexio_info. @@ -7205,8 +7205,8 @@

5 General helper funct

-
-

5.1 C

+
+

5.1 C

trexio_exit_code trexio_info(void);
@@ -7657,14 +7657,14 @@ 

5.1 C

-
-

5.2 Fortran

+
+

5.2 Fortran

interface
-   integer function trexio_info () bind(C)
+   integer(c_int32_t) function trexio_info_c () bind(C, name="trexio_info")
      use, intrinsic :: iso_c_binding
-   end function trexio_info
+   end function trexio_info_c
 end interface
 
@@ -7792,8 +7792,8 @@

5.2 Fortran

-
-

5.3 Python

+
+

5.3 Python

def info():
@@ -7994,9 +7994,18 @@ 

5.3 Python

-
-

6 Fortran helper/wrapper functions

+
+

6 Fortran helper/wrapper functions

+
+
contains
+   integer function trexio_info ()
+     implicit none
+     trexio_info = trexio_info_c()
+   end function trexio_info
+
+
+

The function below adapts the original C-based trexio_open for Fortran. This is needed due to the fact that strings in C are terminated by NULL character \0 @@ -8005,28 +8014,27 @@

6 Fortran helper/wrapp

-
contains
-   integer(trexio_t) function trexio_open (filename, mode, back_end, rc_open)
-     use, intrinsic :: iso_c_binding, only : c_null_char
-     implicit none
-     character(len=*), intent(in)                    :: filename
-     character, intent(in), value                    :: mode
-     integer(trexio_back_end_t), intent(in), value   :: back_end
-     integer(trexio_exit_code), intent(out)          :: rc_open
-     character(len=len_trim(filename)+1)             :: filename_c
-     integer(trexio_exit_code) :: rc
-
-     filename_c = trim(filename) // c_null_char
-     trexio_open = trexio_open_c(filename_c, mode, back_end, rc_open)
-     if (trexio_open == 0_8 .or. rc_open /= TREXIO_SUCCESS) then
-       return
-     endif
-     rc = trexio_set_one_based(trexio_open)
-     if (rc /= TREXIO_SUCCESS) then
-        rc = trexio_close(trexio_open)
-        trexio_open = 0_8
-     endif
-   end function trexio_open
+
integer(trexio_t) function trexio_open (filename, mode, back_end, rc_open)
+  use, intrinsic :: iso_c_binding, only : c_null_char
+  implicit none
+  character(len=*), intent(in)                    :: filename
+  character, intent(in), value                    :: mode
+  integer(trexio_back_end_t), intent(in), value   :: back_end
+  integer(trexio_exit_code), intent(out)          :: rc_open
+  character(len=len_trim(filename)+1)             :: filename_c
+  integer(trexio_exit_code) :: rc
+
+  filename_c = trim(filename) // c_null_char
+  trexio_open = trexio_open_c(filename_c, mode, back_end, rc_open)
+  if (trexio_open == 0_8 .or. rc_open /= TREXIO_SUCCESS) then
+    return
+  endif
+  rc = trexio_set_one_based(trexio_open)
+  if (rc /= TREXIO_SUCCESS) then
+     rc = trexio_close(trexio_open)
+     trexio_open = 0_8
+  endif
+end function trexio_open
 
@@ -8154,12 +8162,11 @@

6 Fortran helper/wrapp

-
subroutine trexio_strarray2str(str_array, max_num_str, max_len_str, str_res)
+
subroutine trexio_strarray2str(str_array, max_num_str, str_res)
   use, intrinsic :: iso_c_binding, only : c_null_char
   implicit none
 
-  integer(c_int64_t), intent(in), value   :: max_num_str  ! number of elements in strign array
-  integer, intent(in), value   :: max_len_str  ! maximum length of a string in an array
+  integer(c_int64_t), intent(in), value   :: max_num_str  ! number of elements in string array
   character(len=*), intent(in)  :: str_array(*)
   character(len=:), allocatable, intent(out) :: str_res
   integer(c_int64_t) :: i
@@ -8244,7 +8251,7 @@ 

6 Fortran helper/wrapp

Author: TREX-CoE

-

Created: 2024-03-22 Fri 14:46

+

Created: 2024-05-13 Mon 13:15

Validate

diff --git a/templator_hdf5.html b/templator_hdf5.html index bad4fcb5..39630252 100644 --- a/templator_hdf5.html +++ b/templator_hdf5.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + HDF5 back end @@ -324,25 +324,25 @@

HDF5 back end

Table of Contents

-
-

1 Template for HDF5 definitions

+
+

1 Template for HDF5 definitions

#define $GROUP$_GROUP_NAME          "$group$"
@@ -354,8 +354,8 @@ 

1 Template for HDF5 de

-
-

2 Template for HDF5 structures

+
+

2 Template for HDF5 structures

Polymorphism of the trexio_t type is handled by ensuring that the @@ -375,8 +375,8 @@

2 Template for HDF5 st

-
-

3 Template for HDF5 init/deinit

+
+

3 Template for HDF5 init/deinit

trexio_exit_code
@@ -496,8 +496,8 @@ 

3 Template for HDF5 in

-
-

4 Template for HDF5 has a group

+
+

4 Template for HDF5 has a group

trexio_exit_code
@@ -527,8 +527,8 @@ 

4 Template for HDF5 ha

-
-

5 Template for HDF5 has/read/write a numerical attribute

+
+

5 Template for HDF5 has/read/write a numerical attribute

trexio_exit_code
@@ -632,8 +632,8 @@ 

5 Template for HDF5 ha

-
-

6 Template for HDF5 has/read/write a dataset of numerical data

+
+

6 Template for HDF5 has/read/write a dataset of numerical data

trexio_exit_code
@@ -770,8 +770,8 @@ 

6 Template for HDF5 ha

-
-

7 Template for HDF5 has/read/write a dataset of sparse data

+
+

7 Template for HDF5 has/read/write a dataset of sparse data

Sparse data is stored using extensible datasets of HDF5. Extensibility is required @@ -976,8 +976,8 @@

7 Template for HDF5 ha

-
-

8 Template for HDF5 has/read/write a dataset of buffered vectors

+
+

8 Template for HDF5 has/read/write a dataset of buffered vectors

Chunked I/O in HDF5 for buffered data. @@ -1111,8 +1111,8 @@

8 Template for HDF5 ha

-
-

9 Template for HDF5 has/read/write a dataset of strings

+
+

9 Template for HDF5 has/read/write a dataset of strings

trexio_exit_code
@@ -1309,8 +1309,8 @@ 

9 Template for HDF5 ha

-
-

10 Template for HDF5 has/read/write a string attribute

+
+

10 Template for HDF5 has/read/write a string attribute

trexio_exit_code
@@ -1437,8 +1437,8 @@ 

10 Template for HDF5 h

-
-

11 Template for HDF5 delete a group (UNSAFE mode)

+
+

11 Template for HDF5 delete a group (UNSAFE mode)

Note: in early versions of the HDF5 library (v < 1.10) unlinking an object was not working as expected @@ -1478,8 +1478,8 @@

11 Template for HDF5 d

-
-

12 Source code for the determinant part

+
+

12 Source code for the determinant part

Each array is stored in a separate HDF5 dataset due to the fact that determinant I/O has to be decoupled. @@ -1581,8 +1581,8 @@

12 Source code for the

-
-

13 Helper functions

+
+

13 Helper functions

trexio_exit_code
@@ -1850,7 +1850,7 @@ 

13 Helper functions

Author: TREX-CoE

-

Created: 2024-03-22 Fri 14:46

+

Created: 2024-05-13 Mon 13:15

Validate

diff --git a/templator_text.html b/templator_text.html index f47f888c..b0340acf 100644 --- a/templator_text.html +++ b/templator_text.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + TEXT back end @@ -324,23 +324,23 @@

TEXT back end

Table of Contents

@@ -362,8 +362,8 @@

Table of Contents

The file is written when closed, or when the flush function is called.

-
-

1 Template for group-related structures in text back end

+
+

1 Template for group-related structures in text back end

typedef struct $group$_s {
@@ -382,8 +382,8 @@ 

1 Template for group-r

-
-

2 Template for general structure in text back end

+
+

2 Template for general structure in text back end

Polymorphism of the trexio_t type is handled by ensuring that the @@ -403,8 +403,8 @@

2 Template for general

-
-

3 Initialize function (constant part)

+
+

3 Initialize function (constant part)

bool
@@ -601,8 +601,8 @@ 

3 Initialize function

-
-

4 Deinitialize function (templated part)

+
+

4 Deinitialize function (templated part)

trexio_exit_code
@@ -624,8 +624,8 @@ 

4 Deinitialize functio

-
-

5 Flush function (templated part)

+
+

5 Flush function (templated part)

trexio_exit_code
@@ -648,8 +648,8 @@ 

5 Flush function (temp

-
-

6 Template for text read a group

+
+

6 Template for text read a group

$group$_t*
@@ -875,8 +875,8 @@ 

6 Template for text re

-
-

7 Template for text has a group

+
+

7 Template for text has a group

trexio_exit_code
@@ -916,8 +916,8 @@ 

7 Template for text ha

-
-

8 Template for text flush a group

+
+

8 Template for text flush a group

trexio_exit_code
@@ -981,8 +981,8 @@ 

8 Template for text fl

-
-

9 Template for text free memory

+
+

9 Template for text free memory

Memory is allocated when reading. The following function frees memory. @@ -1051,8 +1051,8 @@

9 Template for text fr

-
-

10 Template for has/read/write a numerical attribute

+
+

10 Template for has/read/write a numerical attribute

trexio_exit_code
@@ -1115,8 +1115,8 @@ 

10 Template for has/re

-
-

11 Template for has/read/write a dataset of numerical data

+
+

11 Template for has/read/write a dataset of numerical data

The group_dset array is assumed allocated with the appropriate size. @@ -1212,8 +1212,8 @@

11 Template for has/re

-
-

12 Template for has/read/write a dataset of strings

+
+

12 Template for has/read/write a dataset of strings

The group_dset array is assumed allocated with the appropriate size. @@ -1314,8 +1314,8 @@

12 Template for has/re

-
-

13 Template for has/read/write a string attribute

+
+

13 Template for has/read/write a string attribute

trexio_exit_code
@@ -1389,8 +1389,8 @@ 

13 Template for has/re

-
-

14 Template for has/read/write the dataset of sparse data

+
+

14 Template for has/read/write the dataset of sparse data

Each sparse array is stored in a separate .txt file due to the fact that sparse I/O has to be decoupled @@ -1680,8 +1680,8 @@

14 Template for has/re

-
-

15 Template for has/read/write a buffered vector

+
+

15 Template for has/read/write a buffered vector

Each array is stored in a separate .txt file due to the fact that buffered I/O has to be decoupled @@ -1911,8 +1911,8 @@

15 Template for has/re

-
-

16 Template for text delete a group (UNSAFE mode)

+
+

16 Template for text delete a group (UNSAFE mode)

trexio_exit_code
@@ -1940,8 +1940,8 @@ 

16 Template for text d

-
-

17 Source code for the determinant part

+
+

17 Source code for the determinant part

Each array is stored in a separate .txt file due to the fact that determinant I/O has to be decoupled @@ -2133,7 +2133,7 @@

17 Source code for the

Author: TREX-CoE

-

Created: 2024-03-22 Fri 14:46

+

Created: 2024-05-13 Mon 13:15

Validate

diff --git a/trex.html b/trex.html index ddb03467..b22c6e7c 100644 --- a/trex.html +++ b/trex.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Data stored in TREXIO @@ -346,71 +346,71 @@

Data stored in TREXIO

Table of Contents

@@ -432,8 +432,8 @@

Table of Contents

A[i,j+1] are contiguous.

-
-

1 Metadata (metadata group)

+
+

1 Metadata (metadata group)

As we expect TREXIO files to be archived in open-data repositories, @@ -443,7 +443,7 @@

1 Metadata (metadata g the file, and a textual description.

- +
@@ -536,19 +536,19 @@

1 Metadata (metadata g -
-

2 System

+
+

2 System

-
-

2.1 Nucleus (nucleus group)

+
+

2.1 Nucleus (nucleus group)

The nuclei are considered as fixed point charges. Coordinates are given in Cartesian \((x,y,z)\) format.

-

+
@@ -633,15 +633,15 @@

2.1 Nucleus (nucleus g -
-

2.2 Cell (cell group)

+
+

2.2 Cell (cell group)

3 Lattice vectors to define a box containing the system, for example used in periodic calculations.

-

+
@@ -725,15 +725,15 @@

2.2 Cell (cell group)< -
-

2.3 Periodic boundary calculations (pbc group)

+
+

2.3 Periodic boundary calculations (pbc group)

A single $k$-point per TREXIO file can be stored. The $k$-point is defined in this group.

-

+
@@ -777,8 +777,8 @@

2.3 Periodic boundary -
-

2.4 Electron (electron group)

+
+

2.4 Electron (electron group)

The chemical system consists of nuclei and electrons, where the @@ -797,7 +797,7 @@

2.4 Electron (electron

-

+
@@ -849,8 +849,8 @@

2.4 Electron (electron -
-

2.5 Ground or excited states (state group)

+
+

2.5 Ground or excited states (state group)

This group contains information about excited states. Since only a @@ -867,7 +867,7 @@

2.5 Ground or excited The id and current_label attributes need to be specified for each file.

-

+
@@ -944,16 +944,16 @@

2.5 Ground or excited -
-

3 Basis functions

+
+

3 Basis functions

-
-

3.1 Basis set (basis group)

+
+

3.1 Basis set (basis group)

-
-

3.1.1 Gaussian and Slater-type orbitals

+
+

3.1.1 Gaussian and Slater-type orbitals

We consider here basis functions centered on nuclei. Hence, it is @@ -1007,8 +1007,8 @@

3.1.1 Gaussian and Sla

-
-

3.1.2 Numerical orbitals

+
+

3.1.2 Numerical orbitals

Trexio supports numerical atom centered orbitals. The implementation is @@ -1072,8 +1072,8 @@

3.1.2 Numerical orbita

-
-

3.1.3 Plane waves

+
+

3.1.3 Plane waves

A plane wave is defined as @@ -1094,10 +1094,10 @@

3.1.3 Plane waves

-
-

3.1.4 Data definitions

+
+

3.1.4 Data definitions

-

+
@@ -1317,8 +1317,8 @@

3.1.4 Data definitions -
-

3.1.5 Example

+
+

3.1.5 Example

For example, consider H2 with the following basis set (in GAMESS @@ -1396,8 +1396,8 @@

3.1.5 Example

-
-

3.2 Effective core potentials (ecp group)

+
+

3.2 Effective core potentials (ecp group)

An effective core potential (ECP) \(V_A^{\text{ECP}}\) replacing the @@ -1431,7 +1431,7 @@

3.2 Effective core pot See http://dx.doi.org/10.1063/1.4984046 or https://doi.org/10.1063/1.5121006 for more info.

-

+
@@ -1546,8 +1546,8 @@

3.2 Effective core pot

-
-

3.2.1 Example

+
+

3.2.1 Example

For example, consider H2 molecule with the following @@ -1610,8 +1610,8 @@

3.2.1 Example

-
-

3.3 Numerical integration grid (grid group)

+
+

3.3 Numerical integration grid (grid group)

In some applications, such as DFT calculations, integrals have to @@ -1626,7 +1626,7 @@

3.3 Numerical integrat Feel free to submit a PR if you find missing options/functionalities.

-

+
@@ -1759,12 +1759,12 @@

3.3 Numerical integrat -
-

4 Orbitals

+
+

4 Orbitals

-
-

4.1 Atomic orbitals (ao group)

+
+

4.1 Atomic orbitals (ao group)

AOs are defined as @@ -1845,7 +1845,7 @@

4.1 Atomic orbitals (a

-

+
@@ -1904,7 +1904,7 @@

4.1 Atomic orbitals (a

-
+

4.1.1 One-electron integrals (ao_1e_int group)

    @@ -1922,7 +1922,7 @@

    4.1.1 One-electron integ over atomic orbitals.

    - +
    @@ -2030,7 +2030,7 @@

    4.1.1 One-electron integ -
    +

    4.1.2 Two-electron integrals (ao_2e_int group)

    @@ -2056,7 +2056,7 @@

    4.1.2 Two-electron integ \]

    -

    +
    @@ -2133,10 +2133,10 @@

    4.1.2 Two-electron integ -
    -

    4.2 Molecular orbitals (mo group)

    +
    +

    4.2 Molecular orbitals (mo group)

    -

    +
    @@ -2235,8 +2235,8 @@

    4.2 Molecular orbitals

-
-

4.2.1 One-electron integrals (mo_1e_int group)

+
+

4.2.1 One-electron integrals (mo_1e_int group)

The operators as the same as those defined in the @@ -2244,7 +2244,7 @@

4.2.1 One-electron int the basis of molecular orbitals.

- +
@@ -2352,8 +2352,8 @@

4.2.1 One-electron int -
-

4.2.2 Two-electron integrals (mo_2e_int group)

+
+

4.2.2 Two-electron integrals (mo_2e_int group)

The operators are the same as those defined in the @@ -2361,7 +2361,7 @@

4.2.2 Two-electron int the basis of molecular orbitals.

-

+
@@ -2439,12 +2439,12 @@

4.2.2 Two-electron int -
-

5 Multi-determinant information

+
+

5 Multi-determinant information

-
-

5.1 Slater determinants (determinant group)

+
+

5.1 Slater determinants (determinant group)

The configuration interaction (CI) wave function \(\Psi\) @@ -2486,7 +2486,7 @@

5.1 Slater determinant An illustration on how to read determinants is presented in the examples.

-

+
@@ -2538,8 +2538,8 @@

5.1 Slater determinant -
-

5.2 Configuration state functions (csf group)

+
+

5.2 Configuration state functions (csf group)

The configuration interaction (CI) wave function \(\Psi\) can be @@ -2561,7 +2561,7 @@

5.2 Configuration stat the basis of Slater determinants.

-

+
@@ -2613,8 +2613,8 @@

5.2 Configuration stat -
-

5.3 Amplitudes (amplitude group)

+
+

5.3 Amplitudes (amplitude group)

The wave function may be expressed in terms of action of the cluster @@ -2685,7 +2685,7 @@

5.3 Amplitudes (amplit
  • \(\dots\)
  • -

    +
    @@ -2777,8 +2777,8 @@

    5.3 Amplitudes (amplit -
    -

    5.4 Reduced density matrices (rdm group)

    +
    +

    5.4 Reduced density matrices (rdm group)

    The reduced density matrices are defined in the basis of molecular @@ -2850,7 +2850,7 @@

    5.4 Reduced density ma \(g_{ik}(\mathbf{r}_1) = \phi_i(\mathbf{r}_1) \phi_k(\mathbf{r}_1)\).

    -

    +
    @@ -3015,12 +3015,12 @@

    5.4 Reduced density ma -
    -

    6 Correlation factors

    +
    +

    6 Correlation factors

    -
    -

    6.1 Jastrow factor (jastrow group)

    +
    +

    6.1 Jastrow factor (jastrow group)

    The Jastrow factor is an $N$-electron function which multiplies the CI @@ -3045,8 +3045,8 @@

    6.1 Jastrow factor (ja

    -
    -

    6.1.1 CHAMP

    +
    +

    6.1.1 CHAMP

    The first form of Jastrow factor is the one used in @@ -3147,8 +3147,8 @@

    6.1.1 CHAMP

    -
    -

    6.1.2 Mu

    +
    +

    6.1.2 Mu

    Mu-Jastrow is based on a one-parameter correlation factor that has @@ -3245,10 +3245,10 @@

    6.1.2 Mu

    -
    -

    6.1.3 Table of values

    +
    +

    6.1.3 Table of values

    -

    +
    @@ -3366,8 +3366,8 @@

    6.1.3 Table of values< -
    -

    7 Quantum Monte Carlo data (qmc group)

    +
    +

    7 Quantum Monte Carlo data (qmc group)

    In quantum Monte Carlo calculations, the wave function is evaluated @@ -3381,7 +3381,7 @@

    7 Quantum Monte Carlo of $↑$-spin and then all the $↓$-spin.

    -

    +
    @@ -3443,7 +3443,7 @@

    7 Quantum Monte Carlo

    Author: TREX-CoE

    -

    Created: 2024-03-22 Fri 14:46

    +

    Created: 2024-05-13 Mon 13:15

    Validate