diff --git a/README.html b/README.html index 74b7df0..a4c3b49 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 @@ -347,7 +347,7 @@ and bug reports should be submitted at

Author: TREX-CoE

-

Created: 2022-01-19 Wed 14:14

+

Created: 2022-01-19 Wed 18:34

Validate

diff --git a/examples.html b/examples.html index ad3ff4c..286b6ff 100644 --- a/examples.html +++ b/examples.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Examples @@ -333,24 +333,24 @@ for the JavaScript code in this tag.

Table of Contents

-
-

1 Accessing sparse quantities

+
+

1 Accessing sparse quantities

-
-

1.1 Fortran

+
+

1.1 Fortran

program print_energy
@@ -411,8 +411,8 @@ One needs to read from the TREXIO file:
 
-
-

1.1.1 Declare Temporary variables

+
+

1.1.1 Declare Temporary variables

integer                       :: i, j, k, l, m
@@ -427,8 +427,8 @@ One needs to read from the TREXIO file:
 
-
-

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

+
+

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

call getarg(1, filename)
@@ -444,8 +444,8 @@ f = trexio_open (filename, 'r', TREXIO_HDF5
 
-
-

1.1.3 Read the nuclear repulsion energy

+
+

1.1.3 Read the nuclear repulsion energy

rc = trexio_read_nucleus_repulsion(f, E_nn)
@@ -459,8 +459,8 @@ f = trexio_open (filename, 'r', TREXIO_HDF5
 
-
-

1.1.4 Read the number of molecular orbitals

+
+

1.1.4 Read the number of molecular orbitals

rc = trexio_read_mo_num(f, n)
@@ -474,8 +474,8 @@ f = trexio_open (filename, 'r', TREXIO_HDF5
 
-
-

1.1.5 Allocate memory

+
+

1.1.5 Allocate memory

allocate( D(n,n), h0(n,n) )
@@ -487,8 +487,8 @@ W(:,:,:,:) = 0.d0
 
-
-

1.1.6 Read one-electron quantities

+
+

1.1.6 Read one-electron quantities

rc = trexio_has_mo_1e_int_core_hamiltonian(f)
@@ -520,8 +520,8 @@ rc = trexio_read_rdm_1e(f, D)
 
-
-

1.1.7 Read two-electron quantities

+
+

1.1.7 Read two-electron quantities

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.

-
-
1.1.7.1 Electron repulsion integrals
+
+
1.1.7.1 Electron repulsion integrals
rc = trexio_has_mo_2e_int_eri(f)
@@ -587,8 +587,8 @@ icount = BUFSIZE
 
-
-
1.1.7.2 Reduced density matrix
+
+
1.1.7.2 Reduced density matrix
rc = trexio_has_rdm_2e(f)
@@ -632,8 +632,8 @@ icount = bufsize
 
-
-

1.1.8 Compute the energy

+
+

1.1.8 Compute the energy

When the orbitals are real, we can use @@ -679,8 +679,8 @@ E = E + E_nn

-
-

1.1.9 Terminate

+
+

1.1.9 Terminate

  deallocate( D, h0, G, W )
@@ -695,7 +695,7 @@ E = E + E_nn
 

Author: TREX-CoE

-

Created: 2022-01-19 Wed 14:14

+

Created: 2022-01-19 Wed 18:34

Validate

diff --git a/index.html b/index.html index 74b7df0..a4c3b49 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 @@ -347,7 +347,7 @@ and bug reports should be submitted at

Author: TREX-CoE

-

Created: 2022-01-19 Wed 14:14

+

Created: 2022-01-19 Wed 18:34

Validate

diff --git a/templator_front.html b/templator_front.html index e207a7f..d967d91 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 @@ -333,144 +333,144 @@ for the JavaScript code in this tag.

Table of Contents

-
-

1 Coding conventions

+
+

1 Coding conventions

  • integer types will be defined using types given in stdint.h
  • @@ -485,8 +485,8 @@ for the JavaScript code in this tag.
-
-

1.1 Memory allocation

+
+

1.1 Memory allocation

Memory allocation of structures can be facilitated by using the @@ -521,8 +521,8 @@ The maximum string size for the filenames is 4096 characters.

-
-

2 Front end

+
+

2 Front end

All calls to TREXIO are thread-safe. @@ -530,10 +530,10 @@ TREXIO front end is modular, which simplifies implementation of new back ends.

-
-

2.1 Error handling

+
+

2.1 Error handling

- +
@@ -774,8 +774,8 @@ and the corresponding message are not propagated to the source code. -
-

2.1.1 Decoding errors

+
+

2.1.1 Decoding errors

The trexio_string_of_error converts an exit code into a string. The @@ -801,8 +801,8 @@ and the corresponding message are not propagated to the source code.

-
-
2.1.1.1 C source code
+
+
2.1.1.1 C source code
const char*
@@ -913,16 +913,16 @@ and the corresponding message are not propagated to the source code.
 
-
-
2.1.1.2 Fortran interface
+
+
2.1.1.2 Fortran interface
interface
    subroutine trexio_string_of_error (error, string) bind(C, name='trexio_string_of_error_f')
      use, intrinsic :: iso_c_binding
      import
-     integer (trexio_exit_code), intent(in), value :: error
-     character, intent(out) :: string(128)
+     integer(trexio_exit_code), intent(in), value :: error
+     character(kind=c_char), intent(out)          :: string(128)
    end subroutine trexio_string_of_error
 end interface
 
@@ -930,8 +930,8 @@ and the corresponding message are not propagated to the source code.
-
-
2.1.1.3 Python interface
+
+
2.1.1.3 Python interface
class Error(Exception):
@@ -970,8 +970,8 @@ and the corresponding message are not propagated to the source code.
 
-
-

2.2 Back ends

+
+

2.2 Back ends

TREXIO has several back ends: @@ -995,8 +995,8 @@ lines that correspond to the TREXIO_JSON back end (not implemented

-
-

2.2.1 C

+
+

2.2.1 C

typedef int32_t back_end_t;
@@ -1039,8 +1039,8 @@ This is useful due to the fact that HDF5 back end can be disabled at configure s
 
-
-

2.2.2 Fortran

+
+

2.2.2 Fortran

  integer(trexio_backend), parameter :: TREXIO_HDF5 = 0
@@ -1056,9 +1056,9 @@ The function below is a Fortran interface for the aforementioned C-compatible 
 
interface
-   logical function trexio_has_backend (back_end) bind(C)
+   logical(c_bool) function trexio_has_backend (back_end) bind(C)
      use, intrinsic :: iso_c_binding
-     integer(4), intent(in), value :: back_end
+     integer(c_int32_t), intent(in), value :: back_end
    end function trexio_has_backend
 end interface
 
@@ -1066,8 +1066,8 @@ The function below is a Fortran interface for the aforementioned C-compatible
-
-

2.2.3 Python

+
+

2.2.3 Python

# define TREXIO back ends
@@ -1081,8 +1081,8 @@ The function below is a Fortran interface for the aforementioned C-compatible 
 
-
-

2.3 Read/write behavior

+
+

2.3 Read/write behavior

Every time a reading function is called, the data is read from the @@ -1110,8 +1110,8 @@ concurrent programs, the behavior is not specified.

-
-

2.4 TREXIO file type

+
+

2.4 TREXIO file type

trexio_s is the the main type for TREXIO files, visible to the users @@ -1145,8 +1145,8 @@ TREXIO files will have as a first argument the TREXIO file handle.

-
-

2.4.1 TREXIOFile Python class

+
+

2.4.1 TREXIOFile Python class

class File:
@@ -1228,8 +1228,8 @@ TREXIO files will have as a first argument the TREXIO file handle.
 
-
-

2.5 Polymorphism of the file handle

+
+

2.5 Polymorphism of the file handle

Polymorphism of the trexio_t type is handled by ensuring that the @@ -1248,8 +1248,8 @@ corresponding types for all back ends can be safely casted to

-
-

2.6 File opening

+
+

2.6 File opening

trexio_open creates a new TREXIO file or opens existing one. @@ -1288,8 +1288,8 @@ renaming the .txt data files.

-
-

2.6.1 C

+
+

2.6.1 C

trexio_t*
@@ -1476,16 +1476,16 @@ renaming the .txt data files.
 
-
-

2.6.2 Fortran

+
+

2.6.2 Fortran

interface
-   integer(8) function trexio_open_c (filename, mode, backend, rc_open) bind(C, name="trexio_open")
+   integer(c_int64_t) function trexio_open_c (filename, mode, backend, rc_open) bind(C, name="trexio_open")
      use, intrinsic :: iso_c_binding
      import
      character(kind=c_char), dimension(*)       :: filename
-     character, intent(in), value               :: mode
+     character(kind=c_char), intent(in), value  :: mode
      integer(trexio_backend), intent(in), value :: backend
      integer(trexio_exit_code), intent(out)     :: rc_open
    end function trexio_open_c
@@ -1495,8 +1495,8 @@ renaming the .txt data files.
 
-
-

2.6.3 Python

+
+

2.6.3 Python

def _open(file_name: str, mode: str, back_end: int):
@@ -1544,8 +1544,8 @@ renaming the .txt data files.
 
-
-

2.6.4 Zero-based versus one-based arrays of indices

+
+

2.6.4 Zero-based versus one-based arrays of indices

Because arrays are zero-based in Fortran, we need to set a flag to @@ -1567,9 +1567,9 @@ know if we need to shift by 1 arrays of indices.

interface
-   integer function trexio_set_one_based(trex_file) bind(C)
+   integer(c_int32_t) function trexio_set_one_based(trex_file) bind(C)
      use, intrinsic :: iso_c_binding
-     integer(8), intent(in), value :: trex_file
+     integer(c_int64_t), intent(in), value :: trex_file
    end function trexio_set_one_based
 end interface
 
@@ -1578,8 +1578,8 @@ know if we need to shift by 1 arrays of indices.
-
-

2.7 File closing

+
+

2.7 File closing

trexio_close closes an existing trexio_t file. @@ -1596,8 +1596,8 @@ output:

-
-

2.7.1 C

+
+

2.7.1 C

trexio_exit_code
@@ -1678,14 +1678,14 @@ output:
 
-
-

2.7.2 Fortran

+
+

2.7.2 Fortran

interface
-   integer function trexio_close (trex_file) bind(C)
+   integer(c_int32_t) function trexio_close (trex_file) bind(C)
      use, intrinsic :: iso_c_binding
-     integer(8), intent(in), value :: trex_file
+     integer(c_int64_t), intent(in), value :: trex_file
    end function trexio_close
 end interface
 
@@ -1693,8 +1693,8 @@ output:
-
-

2.7.3 Python

+
+

2.7.3 Python

def _close(trexio_file):
@@ -1715,8 +1715,8 @@ output:
 
-
-

2.8 File existence

+
+

2.8 File existence

trexio_inquire check whether TREXIO file exists. @@ -1733,8 +1733,8 @@ output:

-
-

2.8.1 C

+
+

2.8.1 C

trexio_exit_code
@@ -1764,8 +1764,8 @@ output:
 
-
-

2.8.2 Fortran

+
+

2.8.2 Fortran

The function below is a C binding. @@ -1785,8 +1785,8 @@ The front end Fortran function for trexio_inquire can be found in t

-
-

2.8.3 Python

+
+

2.8.3 Python

def _inquire(file_name: str) -> bool:
@@ -1806,12 +1806,12 @@ The front end Fortran function for trexio_inquire can be found in t
 
-
-

3 Templates for front end

+
+

3 Templates for front end

-
-

3.1 Description

+
+

3.1 Description

Consider the following block of trex.json: @@ -1951,19 +1951,19 @@ each variable can be found below:

- + - + - + @@ -2032,12 +2032,12 @@ value will result in TREXIO_INVALID_ARG_2 exit code. -
-

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

+
+

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

-
-

3.2.1 Introduction

+
+

3.2.1 Introduction

This section concerns API calls related to numerical attributes, @@ -2108,8 +2108,8 @@ namely single value of int/float types.

-
-

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 @@ -2123,12 +2123,12 @@ precision (see Table above).

-
-
3.2.2.1 Function declarations
+
+
3.2.2.1 Function declarations
-
-
3.2.2.2 Source code for double precision functions
+
+
3.2.2.2 Source code for double precision functions
trexio_exit_code
@@ -2191,8 +2191,8 @@ precision (see Table above).
 
-
-
3.2.2.3 Source code for single precision functions
+
+
3.2.2.3 Source code for single precision functions
trexio_exit_code
@@ -2267,8 +2267,8 @@ precision (see Table above).
 
-
-
3.2.2.4 Source code for default functions
+
+
3.2.2.4 Source code for default functions
trexio_exit_code
@@ -2323,8 +2323,8 @@ precision (see Table above).
 
-
-

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. @@ -2333,9 +2333,9 @@ These templates are based on the use of iso_c_binding. Pointers hav

interface
-   integer function trexio_write_$group_num$_64 (trex_file, num) bind(C)
+   integer(c_int32_t) function trexio_write_$group_num$_64 (trex_file, num) bind(C)
      use, intrinsic :: iso_c_binding
-     integer(8), intent(in), value :: trex_file
+     integer(c_int64_t), intent(in), value :: trex_file
      $group_num_f_dtype_double$, intent(in), value :: num
    end function trexio_write_$group_num$_64
 end interface
@@ -2344,9 +2344,9 @@ These templates are based on the use of iso_c_binding. Pointers hav
 
 
interface
-   integer function trexio_read_$group_num$_64 (trex_file, num) bind(C)
+   integer(c_int32_t) function trexio_read_$group_num$_64 (trex_file, num) bind(C)
      use, intrinsic :: iso_c_binding
-     integer(8), intent(in), value :: trex_file
+     integer(c_int64_t), intent(in), value :: trex_file
      $group_num_f_dtype_double$, intent(out) :: num
    end function trexio_read_$group_num$_64
 end interface
@@ -2355,9 +2355,9 @@ These templates are based on the use of iso_c_binding. Pointers hav
 
 
interface
-   integer function trexio_write_$group_num$_32 (trex_file, num) bind(C)
+   integer(c_int32_t) function trexio_write_$group_num$_32 (trex_file, num) bind(C)
      use, intrinsic :: iso_c_binding
-     integer(8), intent(in), value :: trex_file
+     integer(c_int64_t), intent(in), value :: trex_file
      $group_num_f_dtype_single$, intent(in), value :: num
    end function trexio_write_$group_num$_32
 end interface
@@ -2366,9 +2366,9 @@ These templates are based on the use of iso_c_binding. Pointers hav
 
 
interface
-   integer function trexio_read_$group_num$_32 (trex_file, num) bind(C)
+   integer(c_int32_t) function trexio_read_$group_num$_32 (trex_file, num) bind(C)
      use, intrinsic :: iso_c_binding
-     integer(8), intent(in), value :: trex_file
+     integer(c_int64_t), intent(in), value :: trex_file
      $group_num_f_dtype_single$, intent(out) :: num
    end function trexio_read_$group_num$_32
 end interface
@@ -2377,9 +2377,9 @@ These templates are based on the use of iso_c_binding. Pointers hav
 
 
interface
-   integer function trexio_write_$group_num$ (trex_file, num) bind(C)
+   integer(c_int32_t) function trexio_write_$group_num$ (trex_file, num) bind(C)
      use, intrinsic :: iso_c_binding
-     integer(8), intent(in), value :: trex_file
+     integer(c_int64_t), intent(in), value :: trex_file
      $group_num_f_dtype_default$, intent(in), value :: num
    end function trexio_write_$group_num$
 end interface
@@ -2388,9 +2388,9 @@ These templates are based on the use of iso_c_binding. Pointers hav
 
 
interface
-   integer function trexio_read_$group_num$ (trex_file, num) bind(C)
+   integer(c_int32_t) function trexio_read_$group_num$ (trex_file, num) bind(C)
      use, intrinsic :: iso_c_binding
-     integer(8), intent(in), value :: trex_file
+     integer(c_int64_t), intent(in), value :: trex_file
      $group_num_f_dtype_default$, intent(out) :: num
    end function trexio_read_$group_num$
 end interface
@@ -2399,9 +2399,9 @@ These templates are based on the use of iso_c_binding. Pointers hav
 
 
interface
-   integer function trexio_has_$group_num$ (trex_file) bind(C)
+   integer(c_int32_t) function trexio_has_$group_num$ (trex_file) bind(C)
      use, intrinsic :: iso_c_binding
-     integer(8), intent(in), value :: trex_file
+     integer(c_int64_t), intent(in), value :: trex_file
    end function trexio_has_$group_num$
 end interface
 
@@ -2409,8 +2409,8 @@ These templates are based on the use of iso_c_binding. Pointers hav
-
-

3.2.4 Python templates for front end

+
+

3.2.4 Python templates for front end

def write_$group_num$(trexio_file, num_w: $group_num_py_dtype$) -> None:
@@ -2495,12 +2495,12 @@ These templates are based on the use of iso_c_binding. Pointers hav
 
-
-

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

+
+

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

-
-

3.3.1 Introduction

+
+

3.3.1 Introduction

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

-
-

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 functions can be found below. @@ -2594,12 +2594,12 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T

-
-
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
@@ -2762,8 +2762,8 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
 
-
-
3.3.2.3 Source code for single precision functions
+
+
3.3.2.3 Source code for single precision functions
trexio_exit_code
@@ -2914,11 +2914,11 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
 
-
-
3.3.2.4 Source code for memory-safe functions
+
+
3.3.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 */
@@ -3074,8 +3074,8 @@ rc = trexio_read_$group_dset_dim$_64(file, &($group_dset_dim$));
 
-
-
3.3.2.5 Source code for default functions
+
+
3.3.2.5 Source code for default functions
trexio_exit_code
@@ -3150,8 +3150,8 @@ rc = trexio_read_$group_dset_dim$_64(file, &($group_dset_dim$));
 
-
-

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. @@ -3160,9 +3160,9 @@ These templates are based on the use of iso_c_binding. Pointers hav

interface
-   integer function trexio_write_$group_dset$_64 (trex_file, dset) bind(C)
+   integer(c_int32_t) function trexio_write_$group_dset$_64 (trex_file, dset) bind(C)
      use, intrinsic :: iso_c_binding
-     integer(8), intent(in), value :: trex_file
+     integer(c_int64_t), intent(in), value :: trex_file
      $group_dset_f_dtype_double$, intent(in) :: dset$group_dset_f_dims$
    end function trexio_write_$group_dset$_64
 end interface
@@ -3171,9 +3171,9 @@ These templates are based on the use of iso_c_binding. Pointers hav
 
 
interface
-   integer function trexio_read_$group_dset$_64 (trex_file, dset) bind(C)
+   integer(c_int32_t) function trexio_read_$group_dset$_64 (trex_file, dset) bind(C)
      use, intrinsic :: iso_c_binding
-     integer(8), intent(in), value :: trex_file
+     integer(c_int64_t), intent(in), value :: trex_file
      $group_dset_f_dtype_double$, intent(out) :: dset$group_dset_f_dims$
    end function trexio_read_$group_dset$_64
 end interface
@@ -3182,9 +3182,9 @@ These templates are based on the use of iso_c_binding. Pointers hav
 
 
interface
-   integer function trexio_write_$group_dset$_32 (trex_file, dset) bind(C)
+   integer(c_int32_t) function trexio_write_$group_dset$_32 (trex_file, dset) bind(C)
      use, intrinsic :: iso_c_binding
-     integer(8), intent(in), value :: trex_file
+     integer(c_int64_t), intent(in), value :: trex_file
      $group_dset_f_dtype_single$, intent(in) :: dset$group_dset_f_dims$
    end function trexio_write_$group_dset$_32
 end interface
@@ -3193,9 +3193,9 @@ These templates are based on the use of iso_c_binding. Pointers hav
 
 
interface
-   integer function trexio_read_$group_dset$_32 (trex_file, dset) bind(C)
+   integer(c_int32_t) function trexio_read_$group_dset$_32 (trex_file, dset) bind(C)
      use, intrinsic :: iso_c_binding
-     integer(8), intent(in), value :: trex_file
+     integer(c_int64_t), intent(in), value :: trex_file
      $group_dset_f_dtype_single$, intent(out) :: dset$group_dset_f_dims$
    end function trexio_read_$group_dset$_32
 end interface
@@ -3204,9 +3204,9 @@ These templates are based on the use of iso_c_binding. Pointers hav
 
 
interface
-   integer function trexio_write_$group_dset$ (trex_file, dset) bind(C)
+   integer(c_int32_t) function trexio_write_$group_dset$ (trex_file, dset) bind(C)
      use, intrinsic :: iso_c_binding
-     integer(8), intent(in), value :: trex_file
+     integer(c_int64_t), intent(in), value :: trex_file
      $group_dset_f_dtype_default$, intent(in) :: dset$group_dset_f_dims$
    end function trexio_write_$group_dset$
 end interface
@@ -3215,9 +3215,9 @@ These templates are based on the use of iso_c_binding. Pointers hav
 
 
interface
-   integer function trexio_read_$group_dset$ (trex_file, dset) bind(C)
+   integer(c_int32_t) function trexio_read_$group_dset$ (trex_file, dset) bind(C)
      use, intrinsic :: iso_c_binding
-     integer(8), intent(in), value :: trex_file
+     integer(c_int64_t), intent(in), value :: trex_file
      $group_dset_f_dtype_default$, intent(out) :: dset$group_dset_f_dims$
    end function trexio_read_$group_dset$
 end interface
@@ -3226,9 +3226,9 @@ These templates are based on the use of iso_c_binding. Pointers hav
 
 
interface
-   integer function trexio_has_$group_dset$ (trex_file) bind(C)
+   integer(c_int32_t) function trexio_has_$group_dset$ (trex_file) bind(C)
      use, intrinsic :: iso_c_binding
-     integer(8), intent(in), value :: trex_file
+     integer(c_int64_t), intent(in), value :: trex_file
    end function trexio_has_$group_dset$
 end interface
 
@@ -3236,8 +3236,8 @@ These templates are based on the use of iso_c_binding. Pointers hav
-
-

3.3.4 Python templates for front end

+
+

3.3.4 Python templates for front end

def write_$group_dset$(trexio_file, dset_w) -> None:
@@ -3432,12 +3432,12 @@ These templates are based on the use of iso_c_binding. Pointers hav
 
-
-

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

+
+

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

-
-

3.4.1 Introduction

+
+

3.4.1 Introduction

Sparse data structures are used typically for large tensors such as @@ -3598,16 +3598,16 @@ This section concerns API calls related to sparse data structures.

-
-

3.4.2 C templates for front end

+
+

3.4.2 C templates for front end

-
-
3.4.2.1 Function declarations
+
+
3.4.2.1 Function declarations
-
-
3.4.2.2 Source code for default functions
+
+
3.4.2.2 Source code for default functions
trexio_exit_code trexio_read_safe_$group_dset$(trexio_t* const file,
@@ -3882,8 +3882,8 @@ This section concerns API calls related to sparse data structures.
 
-
-

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. @@ -3892,31 +3892,31 @@ These templates are based on the use of iso_c_binding. Pointers hav

interface
-   integer function trexio_write_$group_dset$ (trex_file, &
-                                               offset_file, buffer_size, &
-                                               index_sparse, value_sparse) bind(C)
+   integer(c_int32_t) function trexio_write_$group_dset$ (trex_file, &
+                                                          offset_file, buffer_size, &
+                                                          index_sparse, value_sparse) bind(C)
      use, intrinsic :: iso_c_binding
-     integer(8), intent(in), value :: trex_file
-     integer(8), intent(in), value :: offset_file
-     integer(8), intent(in), value :: buffer_size
-     integer(4), intent(in)        :: index_sparse(*)
-     double precision, intent(in)  :: value_sparse(*)
+     integer(c_int64_t), intent(in), value :: trex_file
+     integer(c_int64_t), intent(in), value :: offset_file
+     integer(c_int64_t), intent(in), value :: buffer_size
+     integer(c_int32_t), intent(in)        :: index_sparse(*)
+     real(c_double), intent(in)            :: value_sparse(*)
    end function trexio_write_$group_dset$
 end interface
 
 interface
-   integer function trexio_write_safe_$group_dset$ (trex_file, &
-                                                    offset_file, buffer_size, &
-                                                    index_sparse, index_size, &
-                                                    value_sparse, value_size) bind(C)
+   integer(c_int32_t) function trexio_write_safe_$group_dset$ (trex_file, &
+                                                               offset_file, buffer_size, &
+                                                               index_sparse, index_size, &
+                                                               value_sparse, value_size) bind(C)
      use, intrinsic :: iso_c_binding
-     integer(8), intent(in), value :: trex_file
-     integer(8), intent(in), value :: offset_file
-     integer(8), intent(in), value :: buffer_size
-     integer(4), intent(in)        :: index_sparse(*)
-     integer(8), intent(in), value :: index_size
-     double precision, intent(in)  :: value_sparse(*)
-     integer(8), intent(in), value :: value_size
+     integer(c_int64_t), intent(in), value :: trex_file
+     integer(c_int64_t), intent(in), value :: offset_file
+     integer(c_int64_t), intent(in), value :: buffer_size
+     integer(c_int32_t), intent(in)        :: index_sparse(*)
+     integer(c_int64_t), intent(in), value :: index_size
+     real(c_double), intent(in)            :: value_sparse(*)
+     integer(c_int64_t), intent(in), value :: value_size
    end function trexio_write_safe_$group_dset$
 end interface
 
@@ -3924,31 +3924,31 @@ These templates are based on the use of iso_c_binding. Pointers hav
interface
-   integer function trexio_read_$group_dset$ (trex_file, &
-                                              offset_file, buffer_size, &
-                                              index_sparse, value_sparse) bind(C)
+   integer(c_int32_t) function trexio_read_$group_dset$ (trex_file, &
+                                                         offset_file, buffer_size, &
+                                                         index_sparse, value_sparse) bind(C)
      use, intrinsic :: iso_c_binding
-     integer(8), intent(in), value :: trex_file
-     integer(8), intent(in), value :: offset_file
-     integer(8), intent(inout)     :: buffer_size
-     integer(4), intent(out)       :: index_sparse(*)
-     double precision, intent(out) :: value_sparse(*)
+     integer(c_int64_t), intent(in), value :: trex_file
+     integer(c_int64_t), intent(in), value :: offset_file
+     integer(c_int64_t), intent(inout)     :: buffer_size
+     integer(c_int32_t), intent(out)       :: index_sparse(*)
+     real(c_double), intent(out)           :: value_sparse(*)
    end function trexio_read_$group_dset$
 end interface
 
 interface
-   integer function trexio_read_safe_$group_dset$ (trex_file, &
-                                                   offset_file, buffer_size, &
-                                                   index_sparse, index_size, &
-                                                   value_sparse, value_size) bind(C)
+   integer(c_int32_t) function trexio_read_safe_$group_dset$ (trex_file, &
+                                                              offset_file, buffer_size, &
+                                                              index_sparse, index_size, &
+                                                              value_sparse, value_size) bind(C)
      use, intrinsic :: iso_c_binding
-     integer(8), intent(in), value :: trex_file
-     integer(8), intent(in), value :: offset_file
-     integer(8), intent(inout)     :: buffer_size
-     integer(4), intent(out)       :: index_sparse(*)
-     integer(8), intent(in), value :: index_size
-     double precision, intent(out) :: value_sparse(*)
-     integer(8), intent(in), value :: value_size
+     integer(c_int64_t), intent(in), value :: trex_file
+     integer(c_int64_t), intent(in), value :: offset_file
+     integer(c_int64_t), intent(inout)     :: buffer_size
+     integer(c_int32_t), intent(out)       :: index_sparse(*)
+     integer(c_int64_t), intent(in), value :: index_size
+     real(c_double), intent(out)           :: value_sparse(*)
+     integer(c_int64_t), intent(in), value :: value_size
    end function trexio_read_safe_$group_dset$
 end interface
 
@@ -3956,11 +3956,11 @@ These templates are based on the use of iso_c_binding. Pointers hav
interface
-   integer function trexio_read_$group_dset$_size (trex_file, &
-                                                   size_max) bind(C)
+   integer(c_int32_t) function trexio_read_$group_dset$_size (trex_file, &
+                                                              size_max) bind(C)
      use, intrinsic :: iso_c_binding
-     integer(8), intent(in), value :: trex_file
-     integer(8), intent(out) :: size_max
+     integer(c_int64_t), intent(in), value :: trex_file
+     integer(c_int64_t), intent(out)       :: size_max
    end function trexio_read_$group_dset$_size
 end interface
 
@@ -3968,9 +3968,9 @@ These templates are based on the use of iso_c_binding. Pointers hav
interface
-   integer function trexio_has_$group_dset$ (trex_file) bind(C)
+   integer(c_int32_t) function trexio_has_$group_dset$ (trex_file) bind(C)
      use, intrinsic :: iso_c_binding
-     integer(8), intent(in), value :: trex_file
+     integer(c_int64_t), intent(in), value :: trex_file
    end function trexio_has_$group_dset$
 end interface
 
@@ -3978,8 +3978,8 @@ These templates are based on the use of iso_c_binding. Pointers hav
-
-

3.4.4 Python templates for front end

+
+

3.4.4 Python templates for front end

def write_$group_dset$(trexio_file: File, offset_file: int, buffer_size: int, indices: list, values: list) -> None:
@@ -4200,12 +4200,12 @@ These templates are based on the use of iso_c_binding. Pointers hav
 
-
-

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

+
+

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

-
-

3.5.1 Introduction

+
+

3.5.1 Introduction

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

-
-

3.5.2 C templates for front end

+
+

3.5.2 C templates for front end

First parameter is the TREXIO file handle. Second parameter is the variable to be written/read @@ -4254,12 +4254,12 @@ to/from the TREXIO file (except for trexio_has_ functi

-
-
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
@@ -4509,8 +4509,8 @@ to/from the TREXIO file (except for trexio_has_ functi
 
-
-

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. @@ -4519,11 +4519,11 @@ These templates are based on the use of iso_c_binding. Pointers hav

interface
-   integer function trexio_write_$group_dset$_low (trex_file, dset, max_str_len) bind(C)
+   integer(c_int32_t) function trexio_write_$group_dset$_low (trex_file, dset, max_str_len) bind(C)
      use, intrinsic :: iso_c_binding
-     integer(8), intent(in), value :: trex_file
-     character, intent(in) :: dset(*)
-     integer(4), intent(in), value :: max_str_len
+     integer(c_int64_t), intent(in), value :: trex_file
+     character(kind=c_char), intent(in)    :: dset(*)
+     integer(c_int32_t), intent(in), value :: max_str_len
    end function trexio_write_$group_dset$_low
 end interface
 
@@ -4531,11 +4531,11 @@ These templates are based on the use of iso_c_binding. Pointers hav
interface
-   integer function trexio_read_$group_dset$_low (trex_file, dset, max_str_len) bind(C)
+   integer(c_int32_t) function trexio_read_$group_dset$_low (trex_file, dset, max_str_len) bind(C)
      use, intrinsic :: iso_c_binding
-     integer(8), intent(in), value :: trex_file
-     character, intent(out) :: dset(*)
-     integer(4), intent(in), value :: max_str_len
+     integer(c_int64_t), intent(in), value  :: trex_file
+     character(kind=c_char), intent(out)    :: dset(*)
+     integer(c_int32_t), intent(in), value  :: max_str_len
    end function trexio_read_$group_dset$_low
 end interface
 
@@ -4543,9 +4543,9 @@ These templates are based on the use of iso_c_binding. Pointers hav
interface
-   integer function trexio_has_$group_dset$ (trex_file) bind(C)
+   integer(c_int32_t) function trexio_has_$group_dset$ (trex_file) bind(C)
      use, intrinsic :: iso_c_binding
-     integer(8), intent(in), value :: trex_file
+     integer(c_int64_t), intent(in), value :: trex_file
    end function trexio_has_$group_dset$
 end interface
 
@@ -4554,8 +4554,8 @@ These templates are based on the use of iso_c_binding. Pointers hav
integer function trexio_read_$group_dset$ (trex_file, dset, max_str_len)
   implicit none
-  integer(8), intent(in), value :: trex_file
-  integer(4), intent(in), value :: max_str_len
+  integer(8), intent(in), value   :: trex_file
+  integer(4), intent(in), value   :: max_str_len
   character(len=*), intent(inout) :: dset(*)
 
   character, allocatable :: str_compiled(:)
@@ -4586,7 +4586,7 @@ These templates are based on the use of iso_c_binding. Pointers hav
   implicit none
   integer(8), intent(in), value :: trex_file
   integer(4), intent(in), value :: max_str_len
-  character(len=*), intent(in) :: dset(*)
+  character(len=*), intent(in)  :: dset(*)
 
   character(len=:), allocatable :: str_compiled
   integer(8) :: $group_dset_dim$
@@ -4606,8 +4606,8 @@ These templates are based on the use of iso_c_binding. Pointers hav
 
-
-

3.5.4 Python templates for front end

+
+

3.5.4 Python templates for front end

def write_$group_dset$(trexio_file, dset_w: list) -> None:
@@ -4723,12 +4723,12 @@ These templates are based on the use of iso_c_binding. Pointers hav
 
-
-

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

+
+

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

-
-

3.6.1 Introduction

+
+

3.6.1 Introduction

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

-
-

3.6.2 C templates for front end

+
+

3.6.2 C templates for front end

-
-
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
@@ -4881,8 +4881,8 @@ This section concerns API calls related to string attributes.
 
-
-

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. @@ -4892,12 +4892,12 @@ These templates are based on the use of iso_c_binding. Pointers hav

interface
-   integer function trexio_write_$group_str$_c (trex_file, str, max_str_len) &
-           bind(C, name="trexio_write_$group_str$")
+   integer(c_int32_t) function trexio_write_$group_str$_c (trex_file, str, max_str_len) &
+                      bind(C, name="trexio_write_$group_str$")
      use, intrinsic :: iso_c_binding
-     integer(8), intent(in), value :: trex_file
-     character, intent(in) :: str(*)
-     integer(4), intent(in), value :: max_str_len
+     integer(c_int64_t), intent(in), value :: trex_file
+     character(kind=c_char), intent(in)    :: str(*)
+     integer(c_int32_t), intent(in), value :: max_str_len
    end function trexio_write_$group_str$_c
 end interface
 
@@ -4905,12 +4905,12 @@ These templates are based on the use of iso_c_binding. Pointers hav
interface
-   integer function trexio_read_$group_str$_c (trex_file, str, max_str_len) &
-           bind(C, name="trexio_read_$group_str$")
+   integer(c_int32_t) function trexio_read_$group_str$_c (trex_file, str, max_str_len) &
+                      bind(C, name="trexio_read_$group_str$")
      use, intrinsic :: iso_c_binding
-     integer(8), intent(in), value :: trex_file
-     character, intent(out) :: str(*)
-     integer(4), intent(in), value :: max_str_len
+     integer(c_int64_t), intent(in), value :: trex_file
+     character(kind=c_char), intent(out)   :: str(*)
+     integer(c_int32_t), intent(in), value  :: max_str_len
    end function trexio_read_$group_str$_c
 end interface
 
@@ -4918,9 +4918,9 @@ These templates are based on the use of iso_c_binding. Pointers hav
interface
-   integer function trexio_has_$group_str$ (trex_file) bind(C)
+   integer(c_int32_t) function trexio_has_$group_str$ (trex_file) bind(C)
      use, intrinsic :: iso_c_binding
-     integer(8), intent(in), value :: trex_file
+     integer(c_int64_t), intent(in), value :: trex_file
    end function trexio_has_$group_str$
 end interface
 
@@ -4945,7 +4945,7 @@ These templates are based on the use of iso_c_binding. Pointers hav implicit none integer(8), intent(in), value :: trex_file integer(4), intent(in), value :: max_str_len - character(len=*), intent(in) :: str + character(len=*), intent(in) :: str character(len=len_trim(str)+1) :: str_c @@ -4959,8 +4959,8 @@ These templates are based on the use of iso_c_binding. Pointers hav
-
-

3.6.4 Python templates for front end

+
+

3.6.4 Python templates for front end

def write_$group_str$(trexio_file, str_w: str) -> None:
@@ -5050,8 +5050,8 @@ These templates are based on the use of iso_c_binding. Pointers hav
 
-
-

4 Fortran helper/wrapper functions

+
+

4 Fortran helper/wrapper functions

The function below adapts the original C-based trexio_open for Fortran. @@ -5069,7 +5069,7 @@ Note, that Fortran interface calls the main TREXIO API, which is wr character, intent(in), value :: mode integer(trexio_backend), intent(in), value :: backend integer(trexio_exit_code), intent(out) :: rc_open - character(len=len_trim(filename)+1) :: filename_c + character(len=len_trim(filename)+1) :: filename_c integer(trexio_exit_code) :: rc filename_c = trim(filename) // c_null_char @@ -5121,7 +5121,7 @@ C API. This is needed due to the fact that strings in C are terminated by integer, intent(in), value :: max_len_str ! maximum length of a string in an array character(len=*), intent(in) :: str_array(*) character(len=:), allocatable, intent(out) :: str_res - integer :: i + integer(8) :: i str_res = '' do i = 1, max_num_str @@ -5142,18 +5142,16 @@ The subroutine below does the reverse tranformation from one big string with del implicit none integer(8), 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 - character, intent(in) :: str_flat(*) - character(len=*), intent(inout) :: str_array(*) + integer, intent(in), value :: max_len_str ! maximum length of a string in an array + character, intent(in) :: str_flat(*) + character(len=*), intent(inout) :: str_array(*) character(len=max_len_str) :: tmp_str - integer :: i, j, k, ind, offset - integer(8) :: len_flat + integer(8) :: len_flat, i, j, k, ind len_flat = (max_len_str+1)*max_num_str + 1 ind=1 - offset=1 do i=1,max_num_str k = 1 tmp_str='' @@ -5166,7 +5164,6 @@ The subroutine below does the reverse tranformation from one big string with del k = k + 1 enddo str_array(i)=tmp_str - offset=ind enddo end subroutine trexio_str2strarray @@ -5184,8 +5181,8 @@ two code are identical, i.e. if the assert statement pass.

subroutine trexio_assert(trexio_rc, check_rc, success_message)
   implicit none
 
-  integer, intent(in), value   :: trexio_rc
-  integer, intent(in), value   :: check_rc
+  integer, intent(in), value :: trexio_rc
+  integer, intent(in), value :: check_rc
   character(len=*), intent(in), optional  :: success_message
 
   character*(128) :: str
@@ -5195,7 +5192,7 @@ two code are identical, i.e. if the assert statement pass.
   else
     call trexio_string_of_error(trexio_rc, str)
     print *, trim(str)
-    call exit(1)
+    error stop 1
   endif
 
 end subroutine trexio_assert
@@ -5206,7 +5203,7 @@ two code are identical, i.e. if the assert statement pass.
 

Author: TREX-CoE

-

Created: 2022-01-19 Wed 14:14

+

Created: 2022-01-19 Wed 18:34

Validate

diff --git a/templator_hdf5.html b/templator_hdf5.html index 780ce3e..1a3c97f 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 @@ -311,29 +311,29 @@ for the JavaScript code in this tag.

Table of Contents

-
-

1 HDF5 back end

+
+

1 HDF5 back end

-
-

1.1 Template for HDF5 definitions

+
+

1.1 Template for HDF5 definitions

#define $GROUP$_GROUP_NAME          "$group$"
@@ -345,8 +345,8 @@ for the JavaScript code in this tag.
 
-
-

1.2 Template for HDF5 structures

+
+

1.2 Template for HDF5 structures

typedef struct trexio_hdf5_s {
@@ -359,8 +359,8 @@ for the JavaScript code in this tag.
 
-
-

1.3 Template for HDF5 init/deinit

+
+

1.3 Template for HDF5 init/deinit

trexio_exit_code
@@ -460,8 +460,8 @@ for the JavaScript code in this tag.
 
-
-

1.4 Template for HDF5 has/read/write the numerical attribute

+
+

1.4 Template for HDF5 has/read/write the numerical attribute

trexio_exit_code
@@ -555,8 +555,8 @@ for the JavaScript code in this tag.
 
-
-

1.5 Template for HDF5 has/read/write the dataset of numerical data

+
+

1.5 Template for HDF5 has/read/write the dataset of numerical data

trexio_exit_code
@@ -678,8 +678,8 @@ for the JavaScript code in this tag.
 
-
-

1.6 Template for HDF5 has/read/write the dataset of sparse data

+
+

1.6 Template for HDF5 has/read/write the dataset of sparse data

Sparse data is stored using extensible datasets of HDF5. Extensibility is required @@ -880,8 +880,8 @@ due to the fact that the sparse data will be written in chunks of user-defined s

-
-

1.7 Template for HDF5 has/read/write the dataset of strings

+
+

1.7 Template for HDF5 has/read/write the dataset of strings

trexio_exit_code
@@ -1085,8 +1085,8 @@ due to the fact that the sparse data will be written in chunks of user-defined s
 
-
-

1.8 Template for HDF5 has/read/write the string attribute

+
+

1.8 Template for HDF5 has/read/write the string attribute

trexio_exit_code
@@ -1208,8 +1208,8 @@ due to the fact that the sparse data will be written in chunks of user-defined s
 
-
-

1.9 Helper functions

+
+

1.9 Helper functions

trexio_exit_code
@@ -1471,7 +1471,7 @@ due to the fact that the sparse data will be written in chunks of user-defined s
 

Author: TREX-CoE

-

Created: 2022-01-19 Wed 14:14

+

Created: 2022-01-19 Wed 18:34

Validate

diff --git a/templator_text.html b/templator_text.html index 4bac26b..cbd3e84 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 @@ -311,28 +311,28 @@ for the JavaScript code in this tag.

Table of Contents

-
-

1 TEXT back end

+
+

1 TEXT back end

The "file" produced by the text back end is a directory with one @@ -353,8 +353,8 @@ The file is written when closed, or when the flush function is called.

-
-

1.1 Template for group-related structures in text back end

+
+

1.1 Template for group-related structures in text back end

typedef struct $group$_s {
@@ -373,8 +373,8 @@ The file is written when closed, or when the flush function is called.
 
-
-

1.2 Template for general structure in text back end

+
+

1.2 Template for general structure in text back end

typedef struct trexio_text_s {
@@ -387,8 +387,8 @@ The file is written when closed, or when the flush function is called.
 
-
-

1.3 Initialize function (constant part)

+
+

1.3 Initialize function (constant part)

trexio_exit_code
@@ -531,8 +531,8 @@ The file is written when closed, or when the flush function is called.
 
-
-

1.4 Deinitialize function (templated part)

+
+

1.4 Deinitialize function (templated part)

trexio_exit_code
@@ -554,8 +554,8 @@ The file is written when closed, or when the flush function is called.
 
-
-

1.5 Template for text read struct

+
+

1.5 Template for text read struct

$group$_t*
@@ -847,8 +847,8 @@ trexio_text_read_$group$ (trexio_text_t* 
 
-
-

1.6 Template for text flush struct

+
+

1.6 Template for text flush struct

trexio_exit_code
@@ -913,8 +913,8 @@ trexio_text_read_$group$ (trexio_text_t* 
 
-
-

1.7 Template for text free memory

+
+

1.7 Template for text free memory

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

-
-

1.8 Template for has/read/write the numerical attribute

+
+

1.8 Template for has/read/write the numerical attribute

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

1.9 Template for has/read/write the dataset of numerical data

+
+

1.9 Template for has/read/write the dataset of numerical data

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

-
-

1.10 Template for has/read/write the dataset of strings

+
+

1.10 Template for has/read/write the dataset of strings

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

-
-

1.11 Template for has/read/write the string attribute

+
+

1.11 Template for has/read/write the string attribute

trexio_exit_code
@@ -1297,8 +1297,8 @@ The group_dset array is assumed allocated with the appropriate size
 
-
-

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

+
+

1.12 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 @@ -1575,7 +1575,7 @@ User provides indices and values of the sparse array as two separate variables.

Author: TREX-CoE

-

Created: 2022-01-19 Wed 14:14

+

Created: 2022-01-19 Wed 18:34

Validate

diff --git a/trex.html b/trex.html index f2b2377..522e393 100644 --- a/trex.html +++ b/trex.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + TREX Configuration file @@ -333,33 +333,33 @@ for the JavaScript code in this tag.

Table of Contents

@@ -409,8 +409,8 @@ fetched using multiple function calls to perform I/O on buffers.

-
-

1 Metadata (metadata group)

+
+

1 Metadata (metadata group)

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.

-
$group_dset_f_dtype_default$ Default datatype of the dataset [Fortran]real(8)/integer(4)real(c_double)/integer(c_int32_t)
$group_dset_f_dtype_single$ Single precision datatype of the dataset [Fortran]real(4)/integer(4)real(c_float)/integer(c_int32_t)
$group_dset_f_dtype_double$ Double precision datatype of the dataset [Fortran]real(8)/integer(8)real(c_double)/integer(c_int64_t)
+
@@ -487,15 +487,15 @@ authors of the file, and a textual description. -
-

2 Electron (electron group)

+
+

2 Electron (electron group)

We consider wave functions expressed in the spin-free formalism, where the number of ↑ and ↓ electrons is fixed.

-
+
@@ -534,15 +534,15 @@ the number of ↑ and ↓ electrons is fixed. -
-

3 Nucleus (nucleus group)

+
+

3 Nucleus (nucleus group)

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

-
+
@@ -609,8 +609,8 @@ given in Cartesian \((x,y,z)\) format. -
-

4 Effective core potentials (ecp group)

+
+

4 Effective core potentials (ecp group)

An effective core potential (ECP) \(V_A^{\text{ECP}}\) replacing the @@ -643,7 +643,7 @@ The functions \(V_{A\ell}\) are parameterized as: See http://dx.doi.org/10.1063/1.4984046 or https://doi.org/10.1063/1.5121006 for more info.

-
+
@@ -741,8 +741,8 @@ The latter causes issues when written before ang_mom in the TREXIO

-
-

4.1 Example

+
+

4.1 Example

For example, consider H2 molecule with the following @@ -805,8 +805,8 @@ power = [

-
-

5 Basis set (basis group)

+
+

5 Basis set (basis group)

We consider here basis functions centered on nuclei. Hence, we enable @@ -859,7 +859,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:

-
+
@@ -953,8 +953,8 @@ All the basis set parameters are stored in one-dimensional arrays:
-
-

5.1 Example

+
+

5.1 Example

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

-
-

6 Atomic orbitals (ao group)

+
+

6 Atomic orbitals (ao group)

Going from the atomic basis set to AOs implies a systematic @@ -1085,13 +1085,13 @@ shell, as in the GAMESS convention where

In such a case, one should set the normalization of the shell (in -the Basis set section) to \(\mathcal{N}_{z^2}\), which is the +the Basis set 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}}\).

- +
@@ -1143,8 +1143,8 @@ introduced here should be \(\frac{\mathcal{N}_{xy}}{\mathcal{N}_{z^2}}\).
-
-

6.1 One-electron integrals (ao_1e_int group)

+
+

6.1 One-electron integrals (ao_1e_int group)

  • \[ \hat{V}_{\text{ne}} = \sum_{A=1}^{N_\text{nucl}} @@ -1162,7 +1162,7 @@ The one-electron integrals for a one-electron operator \(\hat{O}\) are over atomic orbitals.

    - +
    @@ -1229,8 +1229,8 @@ over atomic orbitals. -
    -

    6.2 Two-electron integrals (ao_2e_int group)

    +
    +

    6.2 Two-electron integrals (ao_2e_int group)

    The two-electron integrals for a two-electron operator \(\hat{O}\) are @@ -1251,7 +1251,7 @@ notation. \mathbf{r}_j \vert)}{\vert \mathbf{r}_i - \mathbf{r}_j \vert} \] : electron-electron long range potential -

    +
    @@ -1291,10 +1291,10 @@ notation. -
    -

    7 Molecular orbitals (mo group)

    +
    +

    7 Molecular orbitals (mo group)

    -
    +
    @@ -1360,8 +1360,8 @@ notation.
-
-

7.1 One-electron integrals (mo_1e_int group)

+
+

7.1 One-electron integrals (mo_1e_int group)

The operators as the same as those defined in the @@ -1369,7 +1369,7 @@ The operators as the same as those defined in the the basis of molecular orbitals.

- +
@@ -1436,8 +1436,8 @@ the basis of molecular orbitals. -
-

7.2 Two-electron integrals (mo_2e_int group)

+
+

7.2 Two-electron integrals (mo_2e_int group)

The operators as the same as those defined in the @@ -1445,7 +1445,7 @@ The operators as the same as those defined in the the basis of molecular orbitals.

-
+
@@ -1485,11 +1485,11 @@ the basis of molecular orbitals. -
-

8 TODO Slater determinants

+
+

8 TODO Slater determinants

-
-

9 Reduced density matrices (rdm group)

+
+

9 Reduced density matrices (rdm group)

The reduced density matrices are defined in the basis of molecular @@ -1542,7 +1542,7 @@ The total energy can be computed as: \]

-
+
@@ -1625,7 +1625,7 @@ The total energy can be computed as:

Author: TREX-CoE

-

Created: 2022-01-19 Wed 14:14

+

Created: 2022-01-19 Wed 18:34

Validate