diff --git a/README.html b/README.html index e14bdc5..4ecc2a7 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 @@ -383,7 +383,7 @@ The TREXIO library is licensed under the open-source 3-clause BSD license.

Author: TREX-CoE

-

Created: 2023-02-27 Mon 14:49

+

Created: 2023-02-28 Tue 08:45

Validate

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

Table of Contents

-
-

1 Writing nuclear coordinates

+
+

1 Writing nuclear coordinates

Here is a demonstration of how to use TREXIO to write the nuclear @@ -395,8 +395,8 @@ as well as the necessary TREXIO functions to perform these actions.

-
-

1.1 C

+
+

1.1 C

#include <stdio.h>
@@ -446,8 +446,8 @@ as well as the necessary TREXIO functions to perform these actions.
 
-
-

1.2 Python

+
+

1.2 Python

This code uses the TREXIO Python binding to create a new TREXIO file named @@ -494,8 +494,8 @@ coordinates of the system.

-
-

1.3 Fortran

+
+

1.3 Fortran

program trexio_water
@@ -552,12 +552,12 @@ coordinates of the system.
 
-
-

2 Accessing sparse quantities (integrals)

+
+

2 Accessing sparse quantities (integrals)

-
-

2.1 Fortran

+
+

2.1 Fortran

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

2.1.1 Declare Temporary variables

+
+

2.1.1 Declare Temporary variables

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

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)
@@ -636,8 +636,8 @@ f = trexio_open (filename, 'r', TREXIO_HDF5
 
-
-

2.1.3 Read the nuclear repulsion energy

+
+

2.1.3 Read the nuclear repulsion energy

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

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)
@@ -666,8 +666,8 @@ f = trexio_open (filename, 'r', TREXIO_HDF5
 
-
-

2.1.5 Allocate memory

+
+

2.1.5 Allocate memory

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

2.1.6 Read one-electron quantities

+
+

2.1.6 Read one-electron quantities

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

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 @@ -729,8 +729,8 @@ to be protected in the critical section when modified.

-
-
2.1.7.1 Electron repulsion integrals
+
+
2.1.7.1 Electron repulsion integrals
rc = trexio_has_mo_2e_int_eri(f)
@@ -779,8 +779,8 @@ icount = BUFSIZE
 
-
-
2.1.7.2 Reduced density matrix
+
+
2.1.7.2 Reduced density matrix
rc = trexio_has_rdm_2e(f)
@@ -824,8 +824,8 @@ icount = bufsize
 
-
-

2.1.8 Compute the energy

+
+

2.1.8 Compute the energy

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

-
-

2.1.9 Terminate

+
+

2.1.9 Terminate

  deallocate( D, h0, G, W )
@@ -885,12 +885,12 @@ E = E + E_nn
 
-
-

3 Reading determinants

+
+

3 Reading determinants

-
-

3.1 Fortran

+
+

3.1 Fortran

program test
@@ -969,7 +969,7 @@ end
 

Author: TREX-CoE

-

Created: 2023-02-27 Mon 14:49

+

Created: 2023-02-28 Tue 08:45

Validate

diff --git a/index.html b/index.html index e14bdc5..4ecc2a7 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 @@ -383,7 +383,7 @@ The TREXIO library is licensed under the open-source 3-clause BSD license.

Author: TREX-CoE

-

Created: 2023-02-27 Mon 14:49

+

Created: 2023-02-28 Tue 08:45

Validate

diff --git a/intro.html b/intro.html index 51d75de..5394a5a 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 @@ still lacking, and the purpose of the TREXIO library is to fill this gap.

Author: TREX-CoE

-

Created: 2023-02-27 Mon 14:49

+

Created: 2023-02-28 Tue 08:45

Validate

diff --git a/lib.html b/lib.html index cdafb6d..497daf0 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 @@ for the JavaScript code in this tag.

Table of Contents

-
-

1 Format specification

+
+

1 Format specification

@@ -388,8 +388,8 @@ calculation are stored.

-
-

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 @@ number of nuclei.

-
-

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 @@ with the same name suffixed by _im.

-
-

2 The TREXIO library

+
+

2 The TREXIO library

@@ -497,8 +497,8 @@ interface between the library and the physical storage.

-
-

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 @@ made are safe.

-
-

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 @@ repositories.

-
-

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 @@ via the Binder platform.

-
-

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 @@ regardless of their programming skills.

-
-

2.5 Availability

+
+

2.5 Availability

The TREXIO library is designed to be portable and easy to install @@ -754,7 +754,7 @@ are available in Ubuntu 23.04.

Author: TREX-CoE

-

Created: 2023-02-27 Mon 14:49

+

Created: 2023-02-28 Tue 08:45

Validate

diff --git a/templator_front.html b/templator_front.html index 1f52df2..2209727 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 @@ 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
  • @@ -561,8 +561,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 @@ -598,8 +598,8 @@ The maximum string size for the filenames is 4096 characters.

-
-

2 Front end

+
+

2 Front end

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

-
-

2.1 Error handling

+
+

2.1 Error handling

- +
@@ -905,8 +905,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 @@ -932,8 +932,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*
@@ -1071,8 +1071,8 @@ and the corresponding message are not propagated to the source code.
 
-
-
2.1.1.2 Fortran interface
+
+
2.1.1.2 Fortran interface
interface
@@ -1088,8 +1088,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):
@@ -1122,8 +1122,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: @@ -1152,8 +1152,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;
@@ -1202,8 +1202,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_back_end_t), parameter :: TREXIO_HDF5 = 0
@@ -1244,8 +1244,8 @@ consistency, in version 2.2 it was renamed trexio_has_back_end.
 
-
-

2.2.3 Python

+
+

2.2.3 Python

# define TREXIO back ends
@@ -1260,8 +1260,8 @@ consistency, in version 2.2 it was renamed trexio_has_back_end.
 
-
-

2.3 Read/write behavior

+
+

2.3 Read/write behavior

Every time a reading function is called, the data is read from the @@ -1290,8 +1290,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 @@ -1447,8 +1447,8 @@ to work with TREXIO files.

-
-

2.5 File opening

+
+

2.5 File opening

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

-
-

2.5.1 C

+
+

2.5.1 C

trexio_t*
@@ -1822,8 +1822,8 @@ renaming the .txt data files.
 
-
-

2.5.2 Fortran

+
+

2.5.2 Fortran

interface
@@ -1841,8 +1841,8 @@ renaming the .txt data files.
 
-
-

2.5.3 Python

+
+

2.5.3 Python

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

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 @@ -1924,8 +1924,8 @@ know if we need to shift by 1 arrays of indices.

-
-

2.6 File closing

+
+

2.6 File closing

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

-
-

2.6.1 C

+
+

2.6.1 C

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

2.6.2 Fortran

+
+

2.6.2 Fortran

interface
@@ -2044,8 +2044,8 @@ output:
 
-
-

2.6.3 Python

+
+

2.6.3 Python

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

2.7 File flushing

+
+

2.7 File flushing

trexio_flush flushes all buffers into the trexio_t file. @@ -2081,8 +2081,8 @@ output:

-
-

2.7.1 C

+
+

2.7.1 C

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

2.7.2 Fortran

+
+

2.7.2 Fortran

interface
@@ -2139,8 +2139,8 @@ output:
 
-
-

2.7.3 Python

+
+

2.7.3 Python

def flush(trexio_file):
@@ -2158,8 +2158,8 @@ output:
 
-
-

2.8 File existence

+
+

2.8 File existence

trexio_inquire check whether TREXIO file exists. @@ -2196,8 +2196,8 @@ You can see examples of both functionalities in test_f.f90 (search

-
-

2.8.1 C

+
+

2.8.1 C

trexio_exit_code
@@ -2227,8 +2227,8 @@ You can see examples of both functionalities in test_f.f90  (search
 
-
-

2.8.2 Fortran

+
+

2.8.2 Fortran

The function below is a C binding. @@ -2248,8 +2248,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:
@@ -2268,8 +2268,8 @@ The front end Fortran function for trexio_inquire can be found in t
 
-
-

2.9 File copy

+
+

2.9 File copy

trexio_cp copies a TREXIO file using cp. @@ -2291,8 +2291,8 @@ The front end Fortran function for trexio_inquire can be found in t

-
-

2.9.1 C

+
+

2.9.1 C

@@ -2365,8 +2365,8 @@ The front end Fortran function for trexio_inquire can be found in t
 
-
-

2.9.2 Fortran

+
+

2.9.2 Fortran

interface
@@ -2381,8 +2381,8 @@ The front end Fortran function for trexio_inquire can be found in t
 
-
-

2.9.3 Python

+
+

2.9.3 Python

def _cp(source: str, destination: str):
@@ -2414,8 +2414,8 @@ The front end Fortran function for trexio_inquire can be found in t
 
-
-

2.10 File state

+
+

2.10 File state

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

-
-

2.10.1 C

+
+

2.10.1 C

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

2.10.2 Fortran

+
+

2.10.2 Fortran

interface
@@ -2515,8 +2515,8 @@ output:
 
-
-

2.10.3 Python

+
+

2.10.3 Python

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

-
-

2.11 Tasks to be done before closing

+
+

2.11 Tasks to be done before closing

trexio_exit_code
@@ -2627,12 +2627,12 @@ See TREXIO File Python class.
 
-
-

3 Templates for front end

+
+

3 Templates for front end

-
-

3.1 Description

+
+

3.1 Description

Consider the following block of trex.json: @@ -2853,12 +2853,12 @@ value will result in TREXIO_INVALID_ARG_2 exit code.

-
-

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 @@ -2888,8 +2888,8 @@ This section concerns API calls related to TREXIO groups

-
-

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 @@ -2898,12 +2898,12 @@ handle.

-
-
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
@@ -2940,8 +2940,8 @@ handle.
 
-
-

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. @@ -2961,8 +2961,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 has_$group$(trexio_file) -> bool:
@@ -2989,12 +2989,12 @@ These templates are based on the use of iso_c_binding. Pointers hav
 
-
-

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, @@ -3065,8 +3065,8 @@ namely single value of int/float types.

-
-

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

-
-
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
@@ -3149,8 +3149,8 @@ precision (see Table above).
 
-
-
3.3.2.3 Source code for single precision functions
+
+
3.3.2.3 Source code for single precision functions
trexio_exit_code
@@ -3226,8 +3226,8 @@ precision (see Table above).
 
-
-
3.3.2.4 Source code for default functions
+
+
3.3.2.4 Source code for default functions
trexio_exit_code
@@ -3282,8 +3282,8 @@ precision (see Table above).
 
-
-

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. @@ -3375,8 +3375,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_num$(trexio_file, num_w: $group_num_py_dtype$) -> None:
@@ -3449,12 +3449,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 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. @@ -3536,8 +3536,8 @@ This section concerns API calls related to datasets.

-
-

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. @@ -3548,12 +3548,12 @@ The basic (non-suffixed) API call on datasets deals with real(cdouble

-
-
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
@@ -3716,8 +3716,8 @@ The basic (non-suffixed) API call on datasets deals with real(cdouble
 
-
-
3.4.2.3 Source code for single precision functions
+
+
3.4.2.3 Source code for single precision functions
trexio_exit_code
@@ -3868,11 +3868,11 @@ The basic (non-suffixed) API call on datasets deals with real(cdouble
 
-
-
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 */
@@ -4028,8 +4028,8 @@ rc = trexio_read_$group_dset_dim$_64(file, &($group_dset_dim$));
 
-
-
3.4.2.5 Source code for default functions
+
+
3.4.2.5 Source code for default functions
trexio_exit_code
@@ -4104,8 +4104,8 @@ rc = trexio_read_$group_dset_dim$_64(file, &($group_dset_dim$));
 
-
-

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. @@ -4197,8 +4197,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, dset_w) -> None:
@@ -4370,12 +4370,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 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 @@ -4536,16 +4536,16 @@ This section concerns API calls related to sparse data structures.

-
-

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,
@@ -4846,8 +4846,8 @@ This section concerns API calls related to sparse data structures.
 
-
-

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. @@ -4948,8 +4948,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: File, offset_file: int, buffer_size: int, indices: list, values: list) -> None:
@@ -5151,12 +5151,12 @@ These templates are based on the use of iso_c_binding. Pointers hav
 
-
-

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. @@ -5196,8 +5196,8 @@ This section concerns API calls related to datasets of strings.

-
-

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

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

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. @@ -5560,8 +5560,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_dset$(trexio_file, dset_w: list) -> None:
@@ -5662,8 +5662,8 @@ These templates are based on the use of iso_c_binding. Pointers hav
 
-
-

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 @@ -5728,8 +5728,8 @@ it was done for sparse data but without the need to supply tuples o

-
-

3.7.1 C source code

+
+

3.7.1 C source code

trexio_exit_code
@@ -5907,8 +5907,8 @@ it was done for sparse data but without the need to supply tuples o
 
-
-

3.7.2 Fortran interface

+
+

3.7.2 Fortran interface

The Fortran templates that provide an access to the C API calls from Fortran. @@ -5996,8 +5996,8 @@ These templates are based on the use of iso_c_binding. Pointers hav

-
-

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

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

-
-

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

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

-
-

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

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

-
-

3.9.2 C templates for front end

+
+

3.9.2 C templates for front end

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

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

-
-

3.9.4 Python templates for front end

+
+

3.9.4 Python templates for front end

def delete_$group$(trexio_file) -> None:
@@ -6582,8 +6582,8 @@ These templates are based on the use of iso_c_binding. Pointers hav
 
-
-

4 Source code for the determinant part

+
+

4 Source code for the determinant part

Storage of the determinants is a particular case, @@ -6634,8 +6634,8 @@ This section concerns API calls related to Slater determinants.

-
-

4.0.1 C source code

+
+

4.0.1 C source code

trexio_exit_code
@@ -6835,8 +6835,8 @@ This section concerns API calls related to Slater determinants.
 
-
-

4.0.2 Fortran interface

+
+

4.0.2 Fortran interface

The Fortran templates that provide an access to the C API calls from Fortran. @@ -6923,8 +6923,8 @@ These templates are based on the use of iso_c_binding. Pointers hav

-
-

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

5 General helper functions

+
+

5 General helper functions

This section contains general helper functions like trexio_info. @@ -7147,8 +7147,8 @@ bitfield representation of the determinant. If the creation of the bitfield requ

-
-

5.1 C

+
+

5.1 C

trexio_exit_code trexio_info(void);
@@ -7395,8 +7395,8 @@ bitfield representation of the determinant. If the creation of the bitfield requ
 
-
-

5.2 Fortran

+
+

5.2 Fortran

interface
@@ -7456,8 +7456,8 @@ bitfield representation of the determinant. If the creation of the bitfield requ
 
-
-

5.3 Python

+
+

5.3 Python

def info():
@@ -7564,8 +7564,8 @@ bitfield representation of the determinant. If the creation of the bitfield requ
 
-
-

6 Fortran helper/wrapper functions

+
+

6 Fortran helper/wrapper functions

The function below adapts the original C-based trexio_open for Fortran. @@ -7814,7 +7814,7 @@ two code are identical, i.e. if the assert statement pass.

Author: TREX-CoE

-

Created: 2023-02-27 Mon 14:48

+

Created: 2023-02-28 Tue 08:45

Validate

diff --git a/templator_hdf5.html b/templator_hdf5.html index f4da194..8c3831b 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 @@ for the JavaScript code in this tag.

Table of Contents

-
-

1 Template for HDF5 definitions

+
+

1 Template for HDF5 definitions

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

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 @@ corresponding types for all back ends can be safely casted to

-
-

3 Template for HDF5 init/deinit

+
+

3 Template for HDF5 init/deinit

trexio_exit_code
@@ -496,8 +496,8 @@ corresponding types for all back ends can be safely casted to
 
-
-

4 Template for HDF5 has a group

+
+

4 Template for HDF5 has a group

trexio_exit_code
@@ -527,8 +527,8 @@ corresponding types for all back ends can be safely casted to
 
-
-

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 @@ corresponding types for all back ends can be safely casted to
 
-
-

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 @@ corresponding types for all back ends can be safely casted to
 
-
-

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 @@ -973,8 +973,8 @@ due to the fact that the sparse data will be written in chunks of user-defined s

-
-

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. @@ -1108,8 +1108,8 @@ Chunked I/O in HDF5 for buffered data.

-
-

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
@@ -1306,8 +1306,8 @@ Chunked I/O in HDF5 for buffered data.
 
-
-

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

+
+

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

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

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 @@ -1475,8 +1475,8 @@ Thus, any corrupted/lost file space will remain in the first file. The use of

-
-

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. @@ -1578,8 +1578,8 @@ Size specifies the number of data items (e.g. determinants) to process.

-
-

13 Helper functions

+
+

13 Helper functions

trexio_exit_code
@@ -1842,7 +1842,7 @@ Size specifies the number of data items (e.g. determinants) to process.
 

Author: TREX-CoE

-

Created: 2023-02-27 Mon 14:48

+

Created: 2023-02-28 Tue 08:45

Validate

diff --git a/templator_text.html b/templator_text.html index 36e73c9..8cf1916 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 @@ for the JavaScript code in this tag.

Table of Contents

@@ -362,8 +362,8 @@ directory. 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 @@ The file is written when closed, or when the flush function is called.
 
-
-

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 @@ corresponding types for all back ends can be safely casted to

-
-

3 Initialize function (constant part)

+
+

3 Initialize function (constant part)

bool
@@ -571,8 +571,8 @@ corresponding types for all back ends can be safely casted to
 
-
-

4 Deinitialize function (templated part)

+
+

4 Deinitialize function (templated part)

trexio_exit_code
@@ -594,8 +594,8 @@ corresponding types for all back ends can be safely casted to
 
-
-

5 Flush function (templated part)

+
+

5 Flush function (templated part)

trexio_exit_code
@@ -618,8 +618,8 @@ corresponding types for all back ends can be safely casted to
 
-
-

6 Template for text read a group

+
+

6 Template for text read a group

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

7 Template for text has a group

+
+

7 Template for text has a group

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

8 Template for text flush a group

+
+

8 Template for text flush a group

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

9 Template for text free memory

+
+

9 Template for text free memory

Memory is allocated when reading. The following function frees memory. @@ -1021,8 +1021,8 @@ This function is called upon the non-successful exit from the trexio_text_

-
-

10 Template for has/read/write a numerical attribute

+
+

10 Template for has/read/write a numerical attribute

trexio_exit_code
@@ -1085,8 +1085,8 @@ This function is called upon the non-successful exit from the trexio_text_
 
-
-

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. @@ -1182,8 +1182,8 @@ The group_dset array is assumed allocated with the appropriate size

-
-

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. @@ -1284,8 +1284,8 @@ The group_dset array is assumed allocated with the appropriate size

-
-

13 Template for has/read/write a string attribute

+
+

13 Template for has/read/write a string attribute

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

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

-
-

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 @@ -1881,8 +1881,8 @@ Size specifies the number of vector elements to be written.

-
-

16 Template for text delete a group (UNSAFE mode)

+
+

16 Template for text delete a group (UNSAFE mode)

trexio_exit_code
@@ -1910,8 +1910,8 @@ Size specifies the number of vector elements to be written.
 
-
-

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 @@ -2103,7 +2103,7 @@ Size specifies the number of data items, e.g. determinants.

Author: TREX-CoE

-

Created: 2023-02-27 Mon 14:48

+

Created: 2023-02-28 Tue 08:45

Validate

diff --git a/trex.html b/trex.html index 19d4b87..c05b59d 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,70 +346,70 @@ for the JavaScript code in this tag.

Table of Contents

@@ -422,8 +422,8 @@ is reversed in the produced trex.json configuration file as the library is written in C.

-
-

1 Metadata (metadata group)

+
+

1 Metadata (metadata group)

As we expect TREXIO files to be archived in open-data repositories, @@ -433,7 +433,7 @@ have participated to the creation of the file, a list of authors of the file, and a textual description.

- +
@@ -516,19 +516,19 @@ value can be manually overwritten (in unsafe mode) from 1 to -
-

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.

-
+
@@ -595,15 +595,15 @@ given in Cartesian \((x,y,z)\) format. -
-

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.

-
+
@@ -677,15 +677,15 @@ used in periodic calculations. -
-

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.

-
+
@@ -724,15 +724,27 @@ defined in this group. -
-

2.4 Electron (electron group)

+
+

2.4 Electron (electron group)

+

+The chemical system consists of nuclei and electrons, where the +nuclei are considered as fixed point charges with Cartesian +coordinates. The wave function is stored in the spin-free +formalism, and therefore, it is necessary for the user to +explicitly store the number of electrons with spin up +(\(N_\uparrow\)) and spin down (\(N_\downarrow\)). These numbers +correspond to the normalization of the spin-up and spin-down +single-particle reduced density matrices. +

+

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

-
+ +
@@ -778,8 +790,8 @@ the number of ↑ and ↓ electrons is fixed. -
-

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 @@ -796,7 +808,7 @@ integrals, etc. The id and current_label attributes need to be specified for each file.

-
+
@@ -857,21 +869,21 @@ The id and current_label attributes need to be specifi -
-

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, we enable -the possibility to define dummy atoms to place basis functions in -random positions. +We consider here basis functions centered on nuclei. Hence, it is +possibile to define dummy atoms to place basis functions in +arbitrary positions.

@@ -920,8 +932,8 @@ All the basis set parameters are stored in one-dimensional arrays.

-
-

3.1.2 Plane waves

+
+

3.1.2 Plane waves

A plane wave is defined as @@ -942,10 +954,10 @@ plane waves.

-
-

3.1.3 Data definitions

+
+

3.1.3 Data definitions

-
+
@@ -1054,8 +1066,8 @@ plane waves. -
-

3.1.4 Example

+
+

3.1.4 Example

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

-
-

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 @@ -1166,7 +1178,7 @@ All 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.

-
+
@@ -1270,8 +1282,8 @@ If you encounter the aforementioned issue, please report it to our

-
-

3.2.1 Example

+
+

3.2.1 Example

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

-
-

3.3 Numerical integration grid (grid group)

+
+

3.3 Numerical integration grid (grid group)

In some applications, such as DFT calculations, integrals have to @@ -1350,7 +1362,7 @@ The structure of this group is adapted for the +

@@ -1467,71 +1479,93 @@ Feel free to submit a PR if you find missing options/functionalities. -
-

4 Orbitals

+
+

4 Orbitals

-
-

4.1 Atomic orbitals (ao group)

+
+

4.1 Atomic orbitals (ao group)

-

-Going from the atomic basis set to AOs implies a systematic -construction of all the angular functions of each shell. We -consider two cases for the angular functions: the real-valued -spherical harmonics, and the polynomials in Cartesian coordinates. -In the case of real spherical harmonics, the AOs are ordered as -\(0, +1, -1, +2, -2, \dots, +m, -m\) (see Wikipedia). -In the case of polynomials we -impose the canonical (or alphabetical) ordering), i.e -

- -\begin{eqnarray} -p & : & p_x, p_y, p_z \nonumber \\ -d & : & d_{xx}, d_{xy}, d_{xz}, d_{yy}, d_{yz}, d_{zz} \nonumber \\ -f & : & f_{xxx}, f_{xxy}, f_{xxz}, f_{xyy}, f_{xyz}, f_{xzz}, f_{yyy}, f_{yyz}, f_{yzz}, …f_{zzz} \nonumber \\ -{\rm etc.} \nonumber -\end{eqnarray} - -

-Note that there is no exception for \(p\) orbitals in spherical -coordinates: the ordering is \(0,+1,-1\) which corresponds \(p_z, p_x, p_y\). -

-

AOs are defined as

\[ - \chi_i (\mathbf{r}) = \mathcal{N}_i\, P_{\eta(i)}(\mathbf{r})\, R_{s(i)} (\mathbf{r}) + \chi_i (\mathbf{r}) = \mathcal{N}_i'\, P_{\eta(i)}(\mathbf{r})\, R_{s(i)} (\mathbf{r}) \]

-where \(i\) is the atomic orbital index, -\(P\) encodes for either the -polynomials or the spherical harmonics, \(s(i)\) returns the -shell on which the AO is expanded, and \(\eta(i)\) denotes which -angular function is chosen. -\(\mathcal{N}_i\) is a normalization factor that enables the -possibility to have different normalization coefficients within a -shell, as in the GAMESS convention where -\(\mathcal{N}_{x^2} \ne \mathcal{N}_{xy}\) because -\[ \left[ \iiint \left(x-X_A \right)^2 R_{s(i)} - (\mathbf{r}) dx\, dy\, dz \right]^{-1/2} \ne - \left[ \iiint \left( x-X_A \right) \left( y-Y_A \right) R_{s(i)} - (\mathbf{r}) dx\, dy\, dz \right]^{-1/2}. \] +where \(i\) is the atomic orbital index, \(P\) refers to either +polynomials or spherical harmonics, and \(s(i)\) specifies the shell +on which the AO is expanded.

-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 -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}}\). +\(\eta(i)\) denotes the chosen angular function. The AOs can be +expressed using real spherical harmonics or polynomials in Cartesian +coordinates. In the case of real spherical harmonics, the AOs are +ordered as \(0, +1, -1, +2, -2, \dots, + m, -m\) (see Wikipedia). In +the case of polynomials, the canonical (or alphabetical) ordering is +used,

-
+
+ + +++ ++ + + + + + + + + + + + + + + + + + + + + + + + + + + +
\(p\)\(p_x, p_y, p_z\)
\(d\)\(d_{xx}, d_{xy}, d_{xz}, d_{yy}, d_{yz}, d_{zz}\)
\(f\)\(f_{xxx}, f_{xxy}, f_{xxz}, f_{xyy}, f_{xyz}\),
 \(f_{xzz}, f_{yyy}, f_{yyz}, f_{yzz}, f_{zzz}\)
\(\vdots\) 
+ +

+Note that for \(p\) orbitals in spherical coordinates, the ordering +is \(0,+1,-1\) which corresponds to \(p_z, p_x, p_y\). +

+ +

+\(\mathcal{N}_i'\) is a normalization factor that allows for different +normalization coefficients within a single shell, as in the GAMESS +convention where each individual function is unit-normalized. +Using GAMESS convention, the normalization factor of the shell +\(\mathcal{N}_d\) in the basis group is appropriate for instance +for the \(d_z^2\) function (i.e. +\(\mathcal{N}_{d}\equiv\mathcal{N}_{z^2}\)) but not for the \(d_{xy}\) +AO, so the correction factor \(\mathcal{N}_i'\) for \(d_{xy}\) in the +ao groups is the ratio \(\frac{\mathcal{N}_{xy}}{\mathcal{N}_{z^2}}\). +

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

4.1.1 One-electron integrals (ao_1e_int group)

    @@ -1601,7 +1635,7 @@ The one-electron integrals for a one-electron operator \(\hat{O}\) are over atomic orbitals.

    - +
    @@ -1696,7 +1730,7 @@ over atomic orbitals. -
    +

    4.1.2 Two-electron integrals (ao_2e_int group)

    @@ -1722,7 +1756,7 @@ The Cholesky decomposition of the integrals can also be stored: \]

    -
    +
    @@ -1790,10 +1824,10 @@ The Cholesky decomposition of the integrals can also be stored: -
    -

    4.2 Molecular orbitals (mo group)

    +
    +

    4.2 Molecular orbitals (mo group)

    -
    +
    @@ -1880,8 +1914,8 @@ The Cholesky decomposition of the integrals can also be stored:
-
-

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 @@ -1889,7 +1923,7 @@ The operators as the same as those defined in the the basis of molecular orbitals.

- +
@@ -1984,8 +2018,8 @@ the basis of molecular orbitals. -
-

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 @@ -1993,7 +2027,7 @@ The operators are the same as those defined in the the basis of molecular orbitals.

-
+
@@ -2062,12 +2096,12 @@ the basis of molecular orbitals. -
-

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\) @@ -2109,7 +2143,7 @@ produced by the code generator. An illustration on how to read determinants is presented in the examples.

-
+
@@ -2155,8 +2189,8 @@ An illustration on how to read determinants is presented in the -

5.2 Configuration state functions (csf group)

+
+

5.2 Configuration state functions (csf group)

The configuration interaction (CI) wave function \(\Psi\) can be @@ -2178,7 +2212,7 @@ matrix \(\langle D_I | \psi_J \rangle\) needed to project the CSFs in the basis of Slater determinants.

-
+
@@ -2224,8 +2258,8 @@ the basis of Slater determinants. -
-

5.3 Amplitudes (amplitude group)

+
+

5.3 Amplitudes (amplitude group)

The wave function may be expressed in terms of action of the cluster @@ -2296,7 +2330,7 @@ The order of the indices is chosen such that

  • \(\dots\)
  • -
    +
    @@ -2377,8 +2411,8 @@ The order of the indices is chosen such that -
    -

    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 @@ -2450,7 +2484,7 @@ expressed in a basis of a one-electron function \(g_{ik}(\mathbf{r}_1) = \phi_i(\mathbf{r}_1) \phi_k(\mathbf{r}_1)\).

    -
    +
    @@ -2581,22 +2615,22 @@ expressed in a basis of a one-electron function -
    -

    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 to which the CI -expansion is multiplied: \(\Psi = \Phi \times \exp(J)\), +The Jastrow factor is an $N$-electron function which multiplies the CI +expansion: \(\Psi = \Phi \times \exp(J)\),

    In the following, we use the notations \(r_{ij} = |\mathbf{r}_i - \mathbf{r}_j|\) and \(R_{i\alpha} = |\mathbf{r}_i - \mathbf{R}_\alpha|\), where indices -\(i\) and \(j\) correspond to electrons and \(\alpha\) to nuclei. +\(i\) and \(j\) refer to electrons and \(\alpha\) to nuclei.

    @@ -2611,8 +2645,8 @@ following:

    -
    -

    6.1.1 CHAMP

    +
    +

    6.1.1 CHAMP

    The first form of Jastrow factor is the one used in @@ -2627,53 +2661,76 @@ the CHAMP p

    -\(J_{\text{eN}}\) contains electron-nucleus terms: +\(J_{\text{eN}}\) contains electron-nucleus terms:

    \[ - J_{\text{eN}}(\mathbf{r},\mathbf{R}) = \sum_{i=1}^{N_\text{elec}} \sum_{\alpha=1}^{N_\text{nucl}} - \frac{a_{1,\alpha}\, g_\alpha(R_{i\alpha})}{1+a_{2,\alpha}\, g_\alpha(R_{i\alpha})} + - \sum_{p=2}^{N_\text{ord}^a} a_{p+1,\alpha}\, [g_\alpha(R_{i\alpha})]^p - J_{eN}^\infty + J_{\text{eN}}(\mathbf{r},\mathbf{R}) = \sum_{i=1}^{N_\text{elec}} \sum_{\alpha=1}^{N_\text{nucl}}\left[ + \frac{a_{1,\alpha}\, f_\alpha(R_{i\alpha})}{1+a_{2,\alpha}\, + f_\alpha(R_{i\alpha})} + \sum_{p=2}^{N_\text{ord}^a} a_{p+1,\alpha}\, [f_\alpha(R_{i\alpha})]^p - J_{\text{eN}}^\infty + \right] \]

    \(J_{\text{ee}}\) contains electron-electron terms: +

    + +

    \[ J_{\text{ee}}(\mathbf{r}) = \sum_{i=1}^{N_\text{elec}} \sum_{j=1}^{i-1} - \frac{b_1\, f(r_{ij})}{1+b_2\, f(r_{ij})} + - \sum_{p=2}^{N_\text{ord}^b} a_{p+1}\, [f(r_{ij})]^p - J_{ee}^\infty + \left[ + \frac{\frac{1}{2}\big(1 + \delta^{\uparrow\downarrow}_{ij}\big)\,b_1\, f_{\text{ee}}(r_{ij})}{1+b_2\, f_{\text{ee}}(r_{ij})} + + \sum_{p=2}^{N_\text{ord}^b} b_{p+1}\, [f_{\text{ee}}(r_{ij})]^p - J_{\text{ee},ij}^\infty + \right] \]

    -and \(J_{\text{eeN}}\) contains electron-electron-Nucleus terms: +\(\delta^{\uparrow\downarrow}_{ij}\) is zero when the electrons \(i\) and +\(j\) have the same spin, and one otherwise. +

    + +

    +\(J_{\text{eeN}}\) contains electron-electron-Nucleus terms:

    \[ - J_{\text{eeN}}(\mathbf{r},\mathbf{R}) = + J_{\text{eeN}}(\mathbf{r},\mathbf{R}) = \sum_{\alpha=1}^{N_{\text{nucl}}} \sum_{i=1}^{N_{\text{elec}}} \sum_{j=1}^{i-1} \sum_{p=2}^{N_{\text{ord}}} \sum_{k=0}^{p-1} \sum_{l=0}^{p-k-2\delta_{k,0}} - c_{lkp\alpha} \left[ f({r}_{ij}) \right]^k - \left[ \left[ g_\alpha({R}_{i\alpha}) \right]^l + \left[ g_\alpha({R}_{j\alpha}) \right]^l \right] - \left[ g_\alpha({R}_{i\,\alpha}) \, g_\alpha({R}_{j\alpha}) \right]^{(p-k-l)/2} + c_{lkp\alpha} \left[ g_{\text{ee}}({r}_{ij}) \right]^k \nonumber \\ + \left[ \left[ g_\alpha({R}_{i\alpha}) \right]^l + \left[ g_\alpha({R}_{j\alpha}) \right]^l \right] + \left[ g_\alpha({R}_{i\,\alpha}) \, + g_\alpha({R}_{j\alpha}) \right]^{(p-k-l)/2} \] -

    - -

    \(c_{lkp\alpha}\) are non-zero only when \(p-k-l\) is even.

    -The terms \(J_{\text{ee}}^\infty\) and \(J_{\text{eN}}^\infty\) are shifts to ensure that -\(J_{\text{ee}}\) and \(J_{\text{eN}}\) have an asymptotic value of zero. +The terms \(J_{\text{ee},ij}^\infty\) and \(J_{\text{eN}}^\infty\) are shifts to ensure that +\(J_{\text{eN}}\) and \(J_{\text{ee}}\) have an asymptotic value of zero: +

    + +

    +\[ + J_{\text{eN}}^{\infty} = + \frac{a_{1,\alpha}\, \kappa_\alpha^{-1}}{1+a_{2,\alpha}\, + \kappa_\alpha^{-1}} + \sum_{p=2}^{N_\text{ord}^a} a_{p+1,\alpha}\, \kappa_\alpha^{-p} + \] +\[ + J_{\text{ee},ij}^{\infty} = + \frac{\frac{1}{2}\big(1 + \delta^{\uparrow\downarrow}_{ij}\big)\,b_1\, + \kappa_{\text{ee}}^{-1}}{1+b_2\, \kappa_{\text{ee}}^{-1}} + + \sum_{p=2}^{N_\text{ord}^b} b_{p+1}\, \kappa_{\text{ee}}^{-p} + \]

    @@ -2682,20 +2739,21 @@ The terms \(J_{\text{ee}}^\infty\) and \(J_{\text{eN}}^\infty\) are shifts to en

    \[ - f(r) = \frac{1-e^{-\kappa\, r}}{\kappa} \text{ and } - g_\alpha(r) = e^{-\kappa_\alpha\, r}. + f_\alpha(r) = \frac{1-e^{-\kappa_\alpha\, r}}{\kappa_\alpha} \text{ and } + g_\alpha(r) = e^{-\kappa_\alpha\, r}, \]

    -
    -

    6.1.2 Mu

    + +
    +

    6.1.2 Mu

    Mu-Jastrow is based on a one-parameter correlation factor that has been introduced in the context of transcorrelated methods. This -correlation factor imposes the electron-electron cusp and it is +correlation factor imposes the electron-electron cusp, and it is built such that the leading order in \(1/r_{12}\) of the effective two-electron potential reproduces the long-range interaction of the range-separated density functional theory. Its analytical @@ -2710,19 +2768,19 @@ expression reads

    -The electron-electron cusp is incorporated in the three-body term. +The electron-electron cusp is incorporated in the three-body term

    \[ J_\text{eeN} (\mathbf{r}, \mathbf{R}) = \sum_{i=1}^{N_\text{elec}} \sum_{j=1}^{i-1} \, u\left(\mu, r_{ij}\right) \, - \Pi_{\alpha=1}^{N_{\text{nucl}}} \, E_\alpha({R}_{i\alpha}) \, E_\alpha({R}_{j\alpha}) + \Pi_{\alpha=1}^{N_{\text{nucl}}} \, E_\alpha({R}_{i\alpha}) \, E_\alpha({R}_{j\alpha}), \]

    -\(u\) is an electron-electron function given by the symmetric function +where ww\(u\) is an electron-electron function

    @@ -2739,7 +2797,7 @@ electrons.

    An envelope function has been introduced to cancel out the Jastrow -effects between two-electrons when they are both close to a nucleus +effects between two-electrons when at least one is close to a nucleus (to perform a frozen-core calculation). The envelope function is given by

    @@ -2787,10 +2845,10 @@ The parameter \(\mu\) is stored in the ee array, the parameters
    -
    -

    6.1.3 Table of values

    +
    +

    6.1.3 Table of values

    -
    +
    @@ -2818,13 +2876,6 @@ The parameter \(\mu\) is stored in the ee array, the parameters - - - - - - - @@ -2832,6 +2883,13 @@ The parameter \(\mu\) is stored in the ee array, the parameters + + + + + + + @@ -2839,13 +2897,6 @@ The parameter \(\mu\) is stored in the ee array, the parameters - - - - - - - @@ -2853,6 +2904,13 @@ The parameter \(\mu\) is stored in the ee array, the parameters + + + + + + + @@ -2894,8 +2952,8 @@ The parameter \(\mu\) is stored in the ee array, the parameters -
    -

    7 Quantum Monte Carlo data (qmc group)

    +
    +

    7 Quantum Monte Carlo data (qmc group)

    In quantum Monte Carlo calculations, the wave function is evaluated @@ -2909,7 +2967,7 @@ By convention, the electron coordinates contain first all the electrons of $↑$-spin and then all the $↓$-spin.

    -
    Type of Jastrow factor: CHAMP or Mu
    ee_numdim Number of Electron-electron parameters
    en_num dimNumber of Electron-nucleus parameters
    ee_numdim Number of Electron-electron parameters
    een_num dimNumber of Electron-electron-nucleus parameters
    eefloat(jastrow.ee_num)Electron-electron parameters
    en floatElectron-nucleus parameters
    eefloat(jastrow.ee_num)Electron-electron parameters
    een float
    +
    @@ -2964,7 +3022,7 @@ of $↑$-spin and then all the $↓$-spin.

    Author: TREX-CoE

    -

    Created: 2023-02-27 Mon 14:49

    +

    Created: 2023-02-28 Tue 08:45

    Validate