diff --git a/README.html b/README.html index 95eac85..61ae249 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 @@ -342,7 +342,7 @@ and bug reports should be submitted at

Author: TREX-CoE

-

Created: 2021-06-25 Fri 11:33

+

Created: 2021-06-25 Fri 12:16

Validate

diff --git a/Sparse.html b/Sparse.html index 26fca48..68f3df3 100644 --- a/Sparse.html +++ b/Sparse.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + @@ -232,8 +232,8 @@ for the JavaScript code in this tag.

Table of Contents

@@ -241,8 +241,8 @@ for the JavaScript code in this tag. See templatorfront.org

-
-

1 Text back end

+
+

1 Text back end

As the size of the dataset should be extensible, the simplest @@ -256,8 +256,8 @@ The offset can be used with fseek(69L*offset, SEEK_SET)

-
-

2 HDF5 Back end

+
+

2 HDF5 Back end

We need to declare the number of rows of the dataset as @@ -278,7 +278,7 @@ If the offset+num > nmax, we need to extend the dataset.

-

Created: 2021-06-25 Fri 11:33

+

Created: 2021-06-25 Fri 12:16

Validate

diff --git a/index.html b/index.html index 95eac85..61ae249 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 @@ -342,7 +342,7 @@ and bug reports should be submitted at

Author: TREX-CoE

-

Created: 2021-06-25 Fri 11:33

+

Created: 2021-06-25 Fri 12:16

Validate

diff --git a/templator_front.html b/templator_front.html index 809c5c7..77903e8 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,61 +333,61 @@ 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
  • @@ -402,8 +402,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 @@ -438,8 +438,8 @@ The maximum string size for the filenames is 4096 characters.

-
-

2 Front end

+
+

2 Front end

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

-
-

2.1 Error handling

+
+

2.1 Error handling

- +
@@ -750,8 +750,8 @@ The text strings are extracted from the previous table. -
-

2.2 Back ends

+
+

2.2 Back ends

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

-
-

2.3 Read/write behavior

+
+

2.3 Read/write behavior

Every time a reading function is called, the data is read from the @@ -812,8 +812,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 @@ -846,8 +846,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 @@ -866,8 +866,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. @@ -1058,8 +1058,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. @@ -1155,12 +1155,12 @@ output:

-
-

3 Templates for front end

+
+

3 Templates for front end

-
-

3.1 Description

+
+

3.1 Description

Consider the following block of trex.json: @@ -1350,8 +1350,8 @@ or double precision for integer and floating point numbers.

-
-

3.2 Templates for front end has/read/write a single dimensioning variable

+
+

3.2 Templates for front end has/read/write a single dimensioning variable

This section concerns API calls related to dimensioning variables. @@ -1420,8 +1420,8 @@ This section concerns API calls related to dimensioning variables.

-
-

3.2.1 C templates for front end

+
+

3.2.1 C templates for front end

The C templates that correspond to each of the abovementioned @@ -1610,8 +1610,8 @@ precision (see Table above).

-
-

3.2.2 Fortran templates for front end

+
+

3.2.2 Fortran templates for front end

The Fortran templates that provide an access to the C API calls from Fortran. @@ -1697,8 +1697,8 @@ 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

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

-
-

3.3.1 C templates for front end

+
+

3.3.1 C templates for front end

The C templates that correspond to each of the abovementioned functions can be found below. @@ -2087,8 +2087,8 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T

-
-

3.3.2 Fortran templates for front end

+
+

3.3.2 Fortran templates for front end

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

-
-

3.4 Sparse data structures

+
+

3.4 Sparse data structures

Sparse data structures are used typically for large tensors such as @@ -2316,12 +2316,12 @@ For the values,

-
-

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. @@ -2361,8 +2361,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 @@ -2605,8 +2605,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. @@ -2703,12 +2703,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. @@ -2748,8 +2748,8 @@ 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

trexio_exit_code
@@ -2849,8 +2849,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. @@ -2929,8 +2929,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. @@ -3064,7 +3064,7 @@ two code are identical, i.e. if the assert statement pass.

Author: TREX-CoE

-

Created: 2021-06-25 Fri 11:33

+

Created: 2021-06-25 Fri 12:16

Validate

diff --git a/templator_hdf5.html b/templator_hdf5.html index b9118b6..46e00c3 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,27 +311,27 @@ 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$"
@@ -343,8 +343,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
@@ -440,8 +440,8 @@ for the JavaScript code in this tag.
 
-
-

1.4 Template for HDF5 has/read/write a single dimensioning variable

+
+

1.4 Template for HDF5 has/read/write a single dimensioning variable

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

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

+
+

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

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

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

+
+

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

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

1.7 Template for HDF5 has/read/write a single string attribute

+
+

1.7 Template for HDF5 has/read/write a single string attribute

trexio_exit_code
@@ -1020,7 +1020,7 @@ for the JavaScript code in this tag.
 

Author: TREX-CoE

-

Created: 2021-06-25 Fri 11:33

+

Created: 2021-06-25 Fri 12:16

Validate

diff --git a/templator_text.html b/templator_text.html index b1f68b6..eba93dd 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,26 +311,26 @@ 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 @@ -361,8 +361,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 {
@@ -380,8 +380,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 rdm_s {
@@ -407,8 +407,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
@@ -509,8 +509,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
@@ -535,8 +535,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*
@@ -807,8 +807,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
@@ -872,8 +872,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. @@ -918,8 +918,8 @@ Memory is allocated when reading. The following function frees memory.

-
-

1.8 Template for has/read/write the num attribute

+
+

1.8 Template for has/read/write the num attribute

trexio_exit_code
@@ -981,8 +981,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. @@ -1078,8 +1078,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. @@ -1181,8 +1181,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
@@ -1256,12 +1256,12 @@ The group_dset array is assumed allocated with the appropriate size
 
-
-

1.12 RDM struct (hard-coded)

+
+

1.12 RDM struct (hard-coded)

-
-

1.12.1 Read the complete struct

+
+

1.12.1 Read the complete struct

rdm_t* trexio_text_read_rdm(trexio_text_t* const file);
@@ -1356,8 +1356,8 @@ The group_dset array is assumed allocated with the appropriate size
 
-
-

1.12.2 Flush the complete struct

+
+

1.12.2 Flush the complete struct

trexio_exit_code trexio_text_flush_rdm(trexio_text_t* const file);
@@ -1399,8 +1399,8 @@ The group_dset array is assumed allocated with the appropriate size
 
-
-

1.12.3 Free memory

+
+

1.12.3 Free memory

Memory is allocated when reading. The followig function frees memory. @@ -1436,8 +1436,8 @@ Memory is allocated when reading. The followig function frees memory.

-
-

1.12.4 Read/Write the onee attribute

+
+

1.12.4 Read/Write the onee attribute

The one_e array is assumed allocated with the appropriate size. @@ -1503,8 +1503,8 @@ The one_e array is assumed allocated with the appropriate size.

-
-

1.12.5 Read/Write the twoe attribute

+
+

1.12.5 Read/Write the twoe attribute

two_e is a sparse data structure, which can be too large to fit @@ -1612,7 +1612,7 @@ file for each sparse float structure.

Author: TREX-CoE

-

Created: 2021-06-25 Fri 11:33

+

Created: 2021-06-25 Fri 12:16

Validate

diff --git a/trex.html b/trex.html new file mode 100644 index 0000000..e73b8cb --- /dev/null +++ b/trex.html @@ -0,0 +1,1526 @@ + + + + + + + +TREX Configuration file + + + + + + + + + + + + + +
+ UP + | + HOME +
+

TREX Configuration file

+ +

+This page contains information about the general structure of the +TREXIO library. The source code of the library can be automatically +generated based on the contents of the trex.json configuration file, +which itself is compiled from different sections (groups) presented below. +

+ +

+For more information about the automatic generation on the source code +or regarding possible modifications, please contact the TREXIO developers. +

+ +

+All quantities are saved in TREXIO file in atomic units. +The dimensions of the arrays in the tables below are given in +column-major order (as in Fortran), and the ordering of the dimensions +is reversed in the produced trex.json configuration file as the library is +written in C. +

+ +

+In Fortran, the arrays are 1-based and in most other languages the +arrays are 0-based. Hence, we introduce the index type which is an +1-based int in the Fortran interface and 0-based otherwise. +

+ +
+

1 Metadata (metadata group)

+
+

+As we expect our files to be archived in open-data repositories, we +need to give the possibility to the users to store some metadata +inside the files. We propose to store the list of names of the codes +which have participated to the creation of the file, a list of +authors of the file, and a textual description. +

+ + + + +++ ++ ++ ++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableTypeDimensions (for arrays)Description
code_numint Number of codes used to produce the file
codestr(metadata.code_num)Names of the codes used
author_numint Number of authors of the file
authorstr(metadata.author_num)Names of the authors of the file
descriptionstr Text describing the content of file
+
+
+ +
+

2 Electron (electron group)

+
+

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

+ + + + +++ ++ ++ ++ + + + + + + + + + + + + + + + + + + + + + + + +
VariableTypeDimensionsDescription
up_numint Number of ↑-spin electrons
dn_numint Number of ↓-spin electrons
+
+
+ +
+

3 Nucleus (nucleus group)

+
+

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

+ + + + +++ ++ ++ ++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableTypeDimensionsDescription
numint Number of nuclei
chargefloat(nucleus.num)Charges of the nuclei
coordfloat(3,nucleus.num)Coordinates of the atoms
labelstr(nucleus.num)Atom labels
point_groupstr Symmetry point group
+
+
+ +
+

4 TODO Effective core potentials (ecp group)

+
+

+An effective core potential (ECP) \(V_A^{\text{pp}}\) replacing the +core electrons of atom \(A\) is the sum of a local component +\(V_A^{\text{l}}\) and a non-local component \(V_A^{\text{nl}}\). +The local component is given by +

+ +

+\[ + \hat{V}_A^{\text{l}}(r) = -\frac{Z_A^{\text{eff}}}{r} + + \frac{Z_A^{\text{eff}}}{r}\, \exp\left( -\alpha_A\, r^2\right) + + Z_{\text{eff}}\, \alpha_A\, r\, \exp\left( -\beta_A\, r^2\right) + + \gamma_A \exp\left( -\delta_A\, r^2\right), + \] +

+ +

+and the component obtained after localizing the non-local operator is +

+ +

+\[ + \hat{V}_A^{\text{nl}}(r) = + \zeta_A\, \exp\left( -\eta_A\, r^2\right) |0\rangle \langle 0| + + \mu_A \, \exp\left( -\nu_A \, r^2\right) |1\rangle \langle 1| + \] +

+ +

+where \(r=|\mathbf{r-R}_A|\) is the distance to the nucleus on which the +potential is centered, \(Z_A^{\text{eff}}\) is the effective charge +due to the removed electrons, \(|0\rangle \langle 0|\) +and \(|1\rangle \langle 1|\) are projections over zero and one principal angular +momenta, respectively (generalization to higher angular momenta is +straightforward), and all the parameters labeled by Greek +letters are parameters. +

+ +
    +
  • \(\hat{V}_\text{ecp,l} = \sum_A \hat{V}_A^{\text{l}}\) : local component
  • +
  • \(\hat{V}_\text{ecp,nl} = \sum_A \hat{V}_A^{\text{nl}}\) : non-local component
  • +
+ + + + +++ ++ ++ ++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableTypeDimensionsDescription
lmax_plus_1int(nucleus.num)\(l_{\max} + 1\)
z_corefloat(nucleus.num)Charges to remove
local_nint(nucleus.num)Number of local function
local_num_n_maxint Maximum value of local_n
local_exponentfloat(ecp.local_num_n_max, nucleus.num) 
local_coeffloat(ecp.local_num_n_max, nucleus.num) 
local_powerint(ecp.local_num_n_max, nucleus.num) 
non_local_nint(nucleus.num) 
non_local_num_n_maxint  
non_local_exponentfloat(ecp.non_local_num_n_max, nucleus.num) 
non_local_coeffloat(ecp.non_local_num_n_max, nucleus.num) 
non_local_powerint(ecp.non_local_num_n_max, nucleus.num) 
+
+
+ +
+

5 Basis set (basis group)

+
+

+We consider here basis functions centered on nuclei. Hence, we enable +the possibility to define dummy atoms to place basis functions in +random positions. +

+ +

+The atomic basis set is defined as a list of shells. Each shell \(s\) is +centered on a center \(A\), possesses a given angular momentum \(l\) and a +radial function \(R_s\). The radial function is a linear combination of +\(N_{\text{prim}}\) primitive functions that can be of type +Slater (\(p=1\)) or Gaussian (\(p=2\)), +parameterized by exponents \(\gamma_{ks}\) and coefficients \(a_{ks}\): +\[ + R_s(\mathbf{r}) = \mathcal{N}_s \vert\mathbf{r}-\mathbf{R}_A\vert^{n_s} + \sum_{k=1}^{N_{\text{prim}}} a_{ks}\, f_{ks}(\gamma_{ks},p)\, + \exp \left( - \gamma_{ks} + \vert \mathbf{r}-\mathbf{R}_A \vert ^p \right). + \] +

+ +

+In the case of Gaussian functions, \(n_s\) is always zero. +

+ +

+Different codes normalize functions at different levels. Computing +normalization factors requires the ability to compute overlap +integrals, so the normalization factors should be written in the +file to ensure that the file is self-contained and does not need the +client program to have the ability to compute such integrals. +

+ +

+Some codes assume that the contraction coefficients are for a linear +combination of normalized primitives. This implies that a normalization +constant for the primitive \(ks\) needs to be computed and stored. If +this normalization factor is not required, \(f_{ks}=1\). +

+ +

+Some codes assume that the basis function are normalized. This +implies the computation of an extra normalization factor, \(\mathcal{N}_s\). +If the the basis function is not considered normalized, \(\mathcal{N}_s=1\). +

+ + +

+All the basis set parameters are stored in one-dimensional arrays: +

+ + + + +++ ++ ++ ++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableTypeDimensionsDescription
typestr Type of basis set: "Gaussian" or "Slater"
numint Total Number of shells
prim_numint Total number of primitives
nucleus_indexindex(nucleus.num)Index of the first shell of each nucleus (\(A\))
nucleus_shell_numint(nucleus.num)Number of shells for each nucleus
shell_ang_momint(basis.num)Angular momentum 0:S, 1:P, 2:D, ...
shell_prim_numint(basis.num)Number of primitives in the shell (\(N_{\text{prim}}\))
shell_factorfloat(basis.num)Normalization factor of the shell (\(\mathcal{N}_s\))
shell_prim_indexindex(basis.num)Index of the first primitive in the complete list
exponentfloat(basis.prim_num)Exponents of the primitives (\(\gamma_{ks}\))
coefficientfloat(basis.prim_num)Coefficients of the primitives (\(a_{ks}\))
prim_factorfloat(basis.prim_num)Normalization coefficients for the primitives (\(f_{ks}\))
+ +

+For example, consider H2 with the following basis set (in GAMESS +format), where both the AOs and primitives are considered normalized: +

+ +
+HYDROGEN
+S   5
+1         3.387000E+01           6.068000E-03
+2         5.095000E+00           4.530800E-02
+3         1.159000E+00           2.028220E-01
+4         3.258000E-01           5.039030E-01
+5         1.027000E-01           3.834210E-01
+S   1
+1         3.258000E-01           1.000000E+00
+S   1
+1         1.027000E-01           1.000000E+00
+P   1
+1         1.407000E+00           1.000000E+00
+P   1
+1         3.880000E-01           1.000000E+00
+D   1
+1         1.057000E+00           1.0000000
+
+ +

+we have: +

+ +
+type     = "Gaussian"
+num      = 12
+prim_num = 20
+
+nucleus_index    = [0 , 6]
+shell_ang_mom    = [0 , 0 , 0 , 1 , 1 , 2 , 0 , 0 , 0 , 1 , 1 , 2 ]
+shell_prim_num   = [5 , 1 , 1 , 1 , 1 , 1 , 5 , 1 , 1 , 1 , 1 , 1 ]
+shell_prim_index = [0 , 5 , 6 , 7 , 8 , 9 , 10, 15, 16, 17, 18, 19]
+shell_factor     = [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]
+
+exponent =
+[ 33.87, 5.095, 1.159, 0.3258, 0.1027, 0.3258, 0.1027, 1.407,
+  0.388, 1.057, 33.87, 5.095, 1.159, 0.3258, 0.1027, 0.3258, 0.1027, 1.407,
+  0.388, 1.057]
+
+coefficient =
+[ 0.006068, 0.045308, 0.202822, 0.503903, 0.383421, 1.0, 1.0,
+  1.0, 1.0, 1.0, 0.006068, 0.045308, 0.202822, 0.503903, 0.383421, 1.0, 1.0,
+  1.0, 1.0, 1.0]
+
+prim_factor =
+[ 1.0006253235944540e+01, 2.4169531573445120e+00, 7.9610924849766440e-01
+  3.0734305383061117e-01, 1.2929684417481876e-01, 3.0734305383061117e-01,
+  1.2929684417481876e-01, 2.1842769845268308e+00, 4.3649547399719840e-01,
+  1.8135965626177861e+00, 1.0006253235944540e+01, 2.4169531573445120e+00,
+  7.9610924849766440e-01, 3.0734305383061117e-01, 1.2929684417481876e-01,
+  3.0734305383061117e-01, 1.2929684417481876e-01, 2.1842769845268308e+00,
+  4.3649547399719840e-01, 1.8135965626177861e+00 ]
+
+
+
+ +
+

6 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 spherical harmonics, the AOs are ordered in +increasing magnetic quantum number (\(-l \le m \le l\)), and in the case +of polynomials we impose the canonical ordering of the +Libint2 library, 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} + +

+AOs are defined as +

+ +

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

+ +

+where \(i\) is the atomic orbital index, +\(P\) encodes for either the +polynomials or the spherical harmonics, \(\theta(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_{\theta(i)} + (\mathbf{r}) dx\, dy\, dz \right]^{-1/2} \ne + \left[ \iiint \left( x-X_A \right) \left( y-Y_A \right) R_{\theta(i)} + (\mathbf{r}) dx\, dy\, dz \right]^{-1/2}. \] +

+ +

+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}}\). +

+ + + + +++ ++ ++ ++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableTypeDimensionsDescription
cartesianint 1: true, 0: false
numint Total number of atomic orbitals
shellindex(ao.num)basis set shell for each AO
normalizationfloat(ao.num)Normalization factors
+
+ +
+

6.1 One-electron integrals (ao_1e_int group)

+
+
    +
  • \[ \hat{V}_{\text{ne}} = \sum_{A=1}^{N_\text{nucl}} + \sum_{i=1}^{N_\text{elec}} \frac{-Z_A }{\vert \mathbf{R}_A - + \mathbf{r}_i \vert} \] : electron-nucleus attractive potential,
  • +
  • \[ \hat{T}_{\text{e}} = + \sum_{i=1}^{N_\text{elec}} -\frac{1}{2}\hat{\Delta}_i \] : electronic kinetic energy
  • +
  • \(\hat{h} = \hat{T}_\text{e} + \hat{V}_\text{ne} + + \hat{V}_\text{ecp,l} + \hat{V}_\text{ecp,nl}\) : core electronic Hamiltonian
  • +
+ +

+The one-electron integrals for a one-electron operator \(\hat{O}\) are +\[ \langle p \vert \hat{O} \vert q \rangle \], returned as a matrix +over atomic orbitals. +

+ + + + +++ ++ ++ ++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableTypeDimensionsDescription
overlapfloat(ao.num, ao.num)\(\langle p \vert q \rangle\)
kineticfloat(ao.num, ao.num)\(\langle p \vert \hat{T}_e \vert q \rangle\)
potential_n_efloat(ao.num, ao.num)\(\langle p \vert \hat{V}_{\text{ne}} \vert q \rangle\)
ecp_localfloat(ao.num, ao.num)\(\langle p \vert \hat{V}_{\text{ecp,l}} \vert q \rangle\)
ecp_non_localfloat(ao.num, ao.num)\(\langle p \vert \hat{V}_{\text{ecp,nl}} \vert q \rangle\)
core_hamiltonianfloat(ao.num, ao.num)\(\langle p \vert \hat{h} \vert q \rangle\)
+
+
+ +
+

6.2 Two-electron integrals (ao_2e_int group)

+
+

+The two-electron integrals for a two-electron operator \(\hat{O}\) are +\[ \langle p q \vert \hat{O} \vert r s \rangle \] in physicists +notation or \[ ( pr \vert \hat{O} \vert qs ) \] in chemists +notation, where \(p,q,r,s\) are indices over atomic orbitals. +

+ +

+Functions are provided to get the indices in physicists or chemists +notation. +

+ +
    +
  • \[ \hat{W}_{\text{ee}} = \sum_{i=2}^{N_\text{elec}} \sum_{j=1}^{i-1} \frac{1}{\vert \mathbf{r}_i - \mathbf{r}_j \vert} \] : electron-electron repulsive potential operator.
  • +
  • \[ \hat{W}^{lr}_{\text{ee}} = \sum_{i=2}^{N_\text{elec}} + \sum_{j=1}^{i-1} \frac{\text{erf}(\vert \mathbf{r}_i - + \mathbf{r}_j \vert)}{\vert \mathbf{r}_i - \mathbf{r}_j \vert} \] : electron-electron long range potential
  • +
+ + + + +++ ++ ++ ++ + + + + + + + + + + + + + + + + + + + + + + + +
VariableTypeDimensionsDescription
erifloat sparse(ao.num, ao.num, ao.num, ao.num)Electron repulsion integrals
eri_lrfloat sparse(ao.num, ao.num, ao.num, ao.num)Long-range Electron repulsion integrals
+
+
+
+ +
+

7 Molecular orbitals (mo group)

+
+ + + +++ ++ ++ ++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableTypeDimensionsDescription
typestr String identify the set of MOs
numint Number of MOs
coefficientfloat(ao.num, mo.num)MO coefficients
classstr(mo.num)Core, Inactive, Active, Virtual, Deleted
symmetrystr(mo.num)Symmetry in the point group
occupationfloat(mo.num)Occupation number
+
+ +
+

7.1 One-electron integrals (mo_1e_int group)

+
+

+The operators as the same as those defined in the +AO one-electron integrals section. Here, the integrals are given in +the basis of molecular orbitals. +

+ + + + +++ ++ ++ ++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableTypeDimensionsDescription
overlapfloat(mo.num, mo.num)\(\langle i \vert j \rangle\)
kineticfloat(mo.num, mo.num)\(\langle i \vert \hat{T}_e \vert j \rangle\)
potential_n_efloat(mo.num, mo.num)\(\langle i \vert \hat{V}_{\text{ne}} \vert j \rangle\)
ecp_localfloat(mo.num, mo.num)\(\langle i \vert \hat{V}_{\text{ecp,l}} \vert j \rangle\)
ecp_non_localfloat(mo.num, mo.num)\(\langle i \vert \hat{V}_{\text{ecp,nl}} \vert j \rangle\)
core_hamiltonianfloat(mo.num, mo.num)\(\langle i \vert \hat{h} \vert j \rangle\)
+
+
+ +
+

7.2 Two-electron integrals (mo_2e_int group)

+
+

+The operators as the same as those defined in the +AO two-electron integrals section. Here, the integrals are given in +the basis of molecular orbitals. +

+ + + + +++ ++ ++ ++ + + + + + + + + + + + + + + + + + + + + + + + +
VariableTypeDimensionsDescription
erifloat sparse(mo.num, mo.num, mo.num, mo.num)Electron repulsion integrals
eri_lrfloat sparse(mo.num, mo.num, mo.num, mo.num)Long-range Electron repulsion integrals
+
+
+
+ +
+

8 TODO Slater determinants

+
+
+

9 TODO Reduced density matrices (rdm group)

+
+ + + +++ ++ ++ ++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableTypeDimensionsDescription
one_efloat(mo.num, mo.num) 
one_e_upfloat(mo.num, mo.num) 
one_e_dnfloat(mo.num, mo.num) 
two_efloat sparse(mo.num, mo.num, mo.num, mo.num) 
+
+
+ +
+

10 Appendix

+
+
+
+

10.1 Python script from table to json

+
+
+
print("""#+begin_src python :tangle trex.json""")
+print("""    "%s": {"""%(title))
+indent = "        "
+f1 = 0 ; f2 = 0 ; f3 = 0
+for line in data:
+    line = [ x.replace("~","") for x in line ]
+    name = '"'+line[0]+'"'
+    typ  = '"'+line[1]+'"'
+    dims = line[2]
+    if '(' in dims:
+        dims = dims.strip()[1:-1]
+        dims = [ '"'+x.strip()+'"' for x in dims.split(',') ]
+        dims = "[ " + ", ".join(dims) + " ]"
+    else:
+        dims = "[ ]"
+    f1 = max(f1, len(name))
+    f2 = max(f2, len(typ))
+    f3 = max(f3, len(dims))
+
+fmt = "%%s%%%ds : [ %%%ds, %%%ds ]" % (f1, f2, f3)
+for line in data:
+    line = [ x.replace("~","") for x in line ]
+    name = '"'+line[0]+'"'
+    typ  = '"'+line[1]+'"'
+    dims = line[2]
+    if '(' in dims:
+        dims = dims.strip()[1:-1]
+        dims = [ '"'+x.strip()+'"' for x in dims.split(',') ]
+        dims.reverse()
+        dims = "[ " + ", ".join(dims) + " ]"
+    else:
+        if dims.strip() != "":
+            dims = "ERROR"
+        else:
+            dims = "[]"
+    buffer = fmt % (indent, name, typ.ljust(f2), dims.ljust(f3))
+    indent = "      , "
+    print(buffer)
+
+if last == 0:
+    print("    } ,")
+else:
+    print("    }")
+print("""#+end_src""")
+
+
+
+
+
+
+
+
+

Author: TREX-CoE

+

Created: 2021-06-25 Fri 12:16

+

Validate

+
+ +