1
0
mirror of https://github.com/TREX-CoE/trexio.git synced 2024-07-22 10:47:43 +02:00

Added plane waves

This commit is contained in:
Anthony Scemama 2022-12-26 13:15:16 +01:00
parent c98c4b4721
commit bab56408e1
2 changed files with 99 additions and 73 deletions

View File

@ -12,6 +12,7 @@ CHANGES
- Added `float buffered` type for vectors like CI/CSF coefficients
- .git folder is no longer needed to activate TREXIO_DEVEL mode
- Renamed debian folder into helpers-debian
- Added plane wave basis set
- Added trexio_to_bitfield_list functionality
- Added `trexio_has_group` functionality
- Added OCaml binding

171
trex.org
View File

@ -276,78 +276,97 @@ power = [
* 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).
\]
** Gaussian and Slater-type orbitals
In the case of Gaussian functions, $n_s$ is always zero.
We consider here basis functions centered on nuclei. Hence, we enable
the possibility to define /dummy atoms/ to place basis functions in
random positions.
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.
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).
\]
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$.
In the case of Gaussian functions, $n_s$ is always zero.
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$.
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.
** Plane waves
A plane wave is defined as
\[
\chi_j(r) = \exp \left( -i \mathbf{k}_j \mathbf{r} \right)
\]
The basis set is defined as the array of $k$-points in the
reciprocal space, defined in the ~pbc~ group. The kinetic energy
cutoff ~e_cut~ is the only input data relevant to plane waves.
** Data definitions
#+NAME: basis
| Variable | Type | Dimensions | Description |
|-----------------+---------+---------------------+-----------------------------------------------------------------|
| ~type~ | ~str~ | | Type of basis set: "Gaussian", "Slater" or "PW" for plane waves |
| ~prim_num~ | ~dim~ | | Total number of primitives |
| ~shell_num~ | ~dim~ | | Total number of shells |
| ~nucleus_index~ | ~index~ | ~(basis.shell_num)~ | One-to-one correspondence between shells and atomic indices |
| ~shell_ang_mom~ | ~int~ | ~(basis.shell_num)~ | One-to-one correspondence between shells and angular momenta |
| ~shell_factor~ | ~float~ | ~(basis.shell_num)~ | Normalization factor of each shell ($\mathcal{N}_s$) |
| ~r_power~ | ~int~ | ~(basis.shell_num)~ | Power to which $r$ is raised ($n_s$) |
| ~shell_index~ | ~index~ | ~(basis.prim_num)~ | One-to-one correspondence between primitives and shell index |
| ~exponent~ | ~float~ | ~(basis.prim_num)~ | Exponents of the primitives ($\gamma_{ks}$) |
| ~coefficient~ | ~float~ | ~(basis.prim_num)~ | Coefficients of the primitives ($a_{ks}$) |
| ~prim_factor~ | ~float~ | ~(basis.prim_num)~ | Normalization coefficients for the primitives ($f_{ks}$) |
| ~e_cut~ | ~float~ | | Energy cut-off for plane-wave calculations |
All the basis set parameters are stored in one-dimensional arrays:
#+CALL: json(data=basis, title="basis")
#+NAME: basis
| Variable | Type | Dimensions | Description |
|-----------------+---------+---------------------+--------------------------------------------------------------|
| ~type~ | ~str~ | | Type of basis set: "Gaussian" or "Slater" |
| ~prim_num~ | ~dim~ | | Total number of primitives |
| ~shell_num~ | ~dim~ | | Total number of shells |
| ~nucleus_index~ | ~index~ | ~(basis.shell_num)~ | One-to-one correspondence between shells and atomic indices |
| ~shell_ang_mom~ | ~int~ | ~(basis.shell_num)~ | One-to-one correspondence between shells and angular momenta |
| ~shell_factor~ | ~float~ | ~(basis.shell_num)~ | Normalization factor of each shell ($\mathcal{N}_s$) |
| ~r_power~ | ~int~ | ~(basis.shell_num)~ | Power to which $r$ is raised ($n_s$) |
| ~shell_index~ | ~index~ | ~(basis.prim_num)~ | One-to-one correspondence between primitives and shell index |
| ~exponent~ | ~float~ | ~(basis.prim_num)~ | Exponents of the primitives ($\gamma_{ks}$) |
| ~coefficient~ | ~float~ | ~(basis.prim_num)~ | Coefficients of the primitives ($a_{ks}$) |
| ~prim_factor~ | ~float~ | ~(basis.prim_num)~ | Normalization coefficients for the primitives ($f_{ks}$) |
#+CALL: json(data=basis, title="basis")
#+RESULTS:
:results:
#+begin_src python :tangle trex.json
"basis": {
"type" : [ "str" , [] ]
, "prim_num" : [ "dim" , [] ]
, "shell_num" : [ "dim" , [] ]
, "nucleus_index" : [ "index", [ "basis.shell_num" ] ]
, "shell_ang_mom" : [ "int" , [ "basis.shell_num" ] ]
, "shell_factor" : [ "float", [ "basis.shell_num" ] ]
, "r_power" : [ "int" , [ "basis.shell_num" ] ]
, "shell_index" : [ "index", [ "basis.prim_num" ] ]
, "exponent" : [ "float", [ "basis.prim_num" ] ]
, "coefficient" : [ "float", [ "basis.prim_num" ] ]
, "prim_factor" : [ "float", [ "basis.prim_num" ] ]
} ,
#+end_src
:end:
#+RESULTS:
:results:
#+begin_src python :tangle trex.json
"basis": {
"type" : [ "str" , [] ]
, "prim_num" : [ "dim" , [] ]
, "shell_num" : [ "dim" , [] ]
, "nucleus_index" : [ "index", [ "basis.shell_num" ] ]
, "shell_ang_mom" : [ "int" , [ "basis.shell_num" ] ]
, "shell_factor" : [ "float", [ "basis.shell_num" ] ]
, "r_power" : [ "int" , [ "basis.shell_num" ] ]
, "shell_index" : [ "index", [ "basis.prim_num" ] ]
, "exponent" : [ "float", [ "basis.prim_num" ] ]
, "coefficient" : [ "float", [ "basis.prim_num" ] ]
, "prim_factor" : [ "float", [ "basis.prim_num" ] ]
, "e_cut" : [ "float", [] ]
} ,
#+end_src
:end:
** Example
@ -917,12 +936,15 @@ prim_factor =
* Cell (cell group)
3 Lattice vectors to define a box containing the system, for example
used in periodic calculations.
#+NAME: cell
| Variable | Type | Dimensions | Description |
|----------+---------+------------+-------------------------|
| ~a~ | ~float~ | ~(3)~ | First unit cell vector |
| ~b~ | ~float~ | ~(3)~ | Second unit cell vector |
| ~c~ | ~float~ | ~(3)~ | Third unit cell vector |
| Variable | Type | Dimensions | Description |
|----------+---------+------------+-----------------------|
| ~a~ | ~float~ | ~(3)~ | First lattice vector |
| ~b~ | ~float~ | ~(3)~ | Second lattice vector |
| ~c~ | ~float~ | ~(3)~ | Third lattice vector |
#+CALL: json(data=cell, title="cell")
@ -939,11 +961,14 @@ prim_factor =
* Periodic boundary calculations (pbc group)
A single $k$-point per TREXIO file can be stored. The $k$-point is
defined in this group.
#+NAME: pbc
| Variable | Type | Dimensions | Description |
|------------+---------+------------+-------------------------|
| ~periodic~ | ~int~ | | ~1~: true or ~0~: false |
| ~k_point~ | ~float~ | ~(3)~ | k-point sampling |
| Variable | Type | Dimensions | Description |
|---------------+---------+------------+-------------------------|
| ~is_periodic~ | ~int~ | | ~1~: true or ~0~: false |
| ~k_point~ | ~float~ | ~(3)~ | $k$-point sampling |
#+CALL: json(data=pbc, title="pbc")