mirror of
https://github.com/TREX-CoE/trexio.git
synced 2024-11-03 20:54:07 +01:00
Added plane waves
This commit is contained in:
parent
c98c4b4721
commit
bab56408e1
@ -12,6 +12,7 @@ CHANGES
|
|||||||
- Added `float buffered` type for vectors like CI/CSF coefficients
|
- Added `float buffered` type for vectors like CI/CSF coefficients
|
||||||
- .git folder is no longer needed to activate TREXIO_DEVEL mode
|
- .git folder is no longer needed to activate TREXIO_DEVEL mode
|
||||||
- Renamed debian folder into helpers-debian
|
- Renamed debian folder into helpers-debian
|
||||||
|
- Added plane wave basis set
|
||||||
- Added trexio_to_bitfield_list functionality
|
- Added trexio_to_bitfield_list functionality
|
||||||
- Added `trexio_has_group` functionality
|
- Added `trexio_has_group` functionality
|
||||||
- Added OCaml binding
|
- Added OCaml binding
|
||||||
|
171
trex.org
171
trex.org
@ -276,78 +276,97 @@ power = [
|
|||||||
|
|
||||||
* Basis set (basis group)
|
* 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
|
** Gaussian and Slater-type orbitals
|
||||||
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.
|
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
|
The atomic basis set is defined as a list of shells. Each shell $s$ is
|
||||||
normalization factors requires the ability to compute overlap
|
centered on a center $A$, possesses a given angular momentum $l$ and a
|
||||||
integrals, so the normalization factors should be written in the
|
radial function $R_s$. The radial function is a linear combination of
|
||||||
file to ensure that the file is self-contained and does not need the
|
$N_{\text{prim}}$ /primitive/ functions that can be of type
|
||||||
client program to have the ability to compute such integrals.
|
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
|
In the case of Gaussian functions, $n_s$ is always zero.
|
||||||
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
|
Different codes normalize functions at different levels. Computing
|
||||||
implies the computation of an extra normalization factor, $\mathcal{N}_s$.
|
normalization factors requires the ability to compute overlap
|
||||||
If the the basis function is not considered normalized, $\mathcal{N}_s=1$.
|
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
|
#+RESULTS:
|
||||||
| Variable | Type | Dimensions | Description |
|
:results:
|
||||||
|-----------------+---------+---------------------+--------------------------------------------------------------|
|
#+begin_src python :tangle trex.json
|
||||||
| ~type~ | ~str~ | | Type of basis set: "Gaussian" or "Slater" |
|
"basis": {
|
||||||
| ~prim_num~ | ~dim~ | | Total number of primitives |
|
"type" : [ "str" , [] ]
|
||||||
| ~shell_num~ | ~dim~ | | Total number of shells |
|
, "prim_num" : [ "dim" , [] ]
|
||||||
| ~nucleus_index~ | ~index~ | ~(basis.shell_num)~ | One-to-one correspondence between shells and atomic indices |
|
, "shell_num" : [ "dim" , [] ]
|
||||||
| ~shell_ang_mom~ | ~int~ | ~(basis.shell_num)~ | One-to-one correspondence between shells and angular momenta |
|
, "nucleus_index" : [ "index", [ "basis.shell_num" ] ]
|
||||||
| ~shell_factor~ | ~float~ | ~(basis.shell_num)~ | Normalization factor of each shell ($\mathcal{N}_s$) |
|
, "shell_ang_mom" : [ "int" , [ "basis.shell_num" ] ]
|
||||||
| ~r_power~ | ~int~ | ~(basis.shell_num)~ | Power to which $r$ is raised ($n_s$) |
|
, "shell_factor" : [ "float", [ "basis.shell_num" ] ]
|
||||||
| ~shell_index~ | ~index~ | ~(basis.prim_num)~ | One-to-one correspondence between primitives and shell index |
|
, "r_power" : [ "int" , [ "basis.shell_num" ] ]
|
||||||
| ~exponent~ | ~float~ | ~(basis.prim_num)~ | Exponents of the primitives ($\gamma_{ks}$) |
|
, "shell_index" : [ "index", [ "basis.prim_num" ] ]
|
||||||
| ~coefficient~ | ~float~ | ~(basis.prim_num)~ | Coefficients of the primitives ($a_{ks}$) |
|
, "exponent" : [ "float", [ "basis.prim_num" ] ]
|
||||||
| ~prim_factor~ | ~float~ | ~(basis.prim_num)~ | Normalization coefficients for the primitives ($f_{ks}$) |
|
, "coefficient" : [ "float", [ "basis.prim_num" ] ]
|
||||||
|
, "prim_factor" : [ "float", [ "basis.prim_num" ] ]
|
||||||
#+CALL: json(data=basis, title="basis")
|
, "e_cut" : [ "float", [] ]
|
||||||
|
} ,
|
||||||
#+RESULTS:
|
#+end_src
|
||||||
:results:
|
:end:
|
||||||
#+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:
|
|
||||||
|
|
||||||
** Example
|
** Example
|
||||||
|
|
||||||
@ -917,12 +936,15 @@ prim_factor =
|
|||||||
|
|
||||||
* Cell (cell group)
|
* Cell (cell group)
|
||||||
|
|
||||||
|
3 Lattice vectors to define a box containing the system, for example
|
||||||
|
used in periodic calculations.
|
||||||
|
|
||||||
#+NAME: cell
|
#+NAME: cell
|
||||||
| Variable | Type | Dimensions | Description |
|
| Variable | Type | Dimensions | Description |
|
||||||
|----------+---------+------------+-------------------------|
|
|----------+---------+------------+-----------------------|
|
||||||
| ~a~ | ~float~ | ~(3)~ | First unit cell vector |
|
| ~a~ | ~float~ | ~(3)~ | First lattice vector |
|
||||||
| ~b~ | ~float~ | ~(3)~ | Second unit cell vector |
|
| ~b~ | ~float~ | ~(3)~ | Second lattice vector |
|
||||||
| ~c~ | ~float~ | ~(3)~ | Third unit cell vector |
|
| ~c~ | ~float~ | ~(3)~ | Third lattice vector |
|
||||||
|
|
||||||
#+CALL: json(data=cell, title="cell")
|
#+CALL: json(data=cell, title="cell")
|
||||||
|
|
||||||
@ -939,11 +961,14 @@ prim_factor =
|
|||||||
|
|
||||||
* Periodic boundary calculations (pbc group)
|
* 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
|
#+NAME: pbc
|
||||||
| Variable | Type | Dimensions | Description |
|
| Variable | Type | Dimensions | Description |
|
||||||
|------------+---------+------------+-------------------------|
|
|---------------+---------+------------+-------------------------|
|
||||||
| ~periodic~ | ~int~ | | ~1~: true or ~0~: false |
|
| ~is_periodic~ | ~int~ | | ~1~: true or ~0~: false |
|
||||||
| ~k_point~ | ~float~ | ~(3)~ | k-point sampling |
|
| ~k_point~ | ~float~ | ~(3)~ | $k$-point sampling |
|
||||||
|
|
||||||
#+CALL: json(data=pbc, title="pbc")
|
#+CALL: json(data=pbc, title="pbc")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user