mirror of
https://github.com/TREX-CoE/trexio.git
synced 2024-08-25 06:31:43 +02:00
Detect error in JSON.org
This commit is contained in:
parent
32a44df569
commit
c5779f17f9
70
trex.json
70
trex.json
@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
|
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"code_num" : [ "int", [] ]
|
"code_num" : [ "int", [] ]
|
||||||
, "code " : [ "str", [ "metadata.code_num" ] ]
|
, "code " : [ "str", [ "metadata.code_num" ] ]
|
||||||
, "author_num" : [ "int", [] ]
|
, "author_num" : [ "int", [] ]
|
||||||
, "author" : [ "str", [ "metadata.author_num" ] ]
|
, "author" : [ "str", [ "metadata.author_num" ] ]
|
||||||
, "description" : [ "str", [] ]
|
, "description" : [ "str", [] ]
|
||||||
} ,
|
} ,
|
||||||
|
|
||||||
"electron": {
|
"electron": {
|
||||||
@ -22,18 +22,18 @@
|
|||||||
} ,
|
} ,
|
||||||
|
|
||||||
"ecp": {
|
"ecp": {
|
||||||
"lmax_plus_1" : [ "int" , [ "nucleus.num" ] ]
|
"lmax_plus_1" : [ "int" , [ "nucleus.num" ] ]
|
||||||
, "z_core" : [ "float", [ "nucleus.num" ] ]
|
, "z_core" : [ "float", [ "nucleus.num" ] ]
|
||||||
, "local_n" : [ "int" , [ "nucleus.num" ] ]
|
, "local_n" : [ "int" , [ "nucleus.num" ] ]
|
||||||
, "local_num_n_max" : [ "int" , [] ]
|
, "local_num_n_max" : [ "int" , [] ]
|
||||||
, "local_exponent" : [ "float", [ "nucleus.num", "ecp.local_num_n_max" ] ]
|
, "local_exponent" : [ "float", [ "nucleus.num", "ecp.local_num_n_max" ] ]
|
||||||
, "local_coef" : [ "float", [ "nucleus.num", "ecp.local_num_n_max" ] ]
|
, "local_coef" : [ "float", [ "nucleus.num", "ecp.local_num_n_max" ] ]
|
||||||
, "local_power" : [ "int" , [ "nucleus.num", "ecp.local_num_n_max" ] ]
|
, "local_power" : [ "int" , [ "nucleus.num", "ecp.local_num_n_max" ] ]
|
||||||
, "non_local_n" : [ "int" , [ "nucleus.num" ] ]
|
, "non_local_n" : [ "int" , [ "nucleus.num" ] ]
|
||||||
, "non_local_num_n_max" : [ "int" , [] ]
|
, "non_local_num_n_max" : [ "int" , [] ]
|
||||||
, "non_local_exponent" : [ "float", [ "nucleus.num", "ecp.non_local_num_n_max" ] ]
|
, "non_local_exponent" : [ "float", [ "nucleus.num", "ecp.non_local_num_n_max" ] ]
|
||||||
, "non_local_coef" : [ "float", [ "nucleus.num", "ecp.non_local_num_n_max" ] ]
|
, "non_local_coef" : [ "float", [ "nucleus.num", "ecp.non_local_num_n_max" ] ]
|
||||||
, "non_local_power" : [ "int" , [ "nucleus.num", "ecp.non_local_num_n_max" ] ]
|
, "non_local_power" : [ "int" , [ "nucleus.num", "ecp.non_local_num_n_max" ] ]
|
||||||
} ,
|
} ,
|
||||||
|
|
||||||
"basis": {
|
"basis": {
|
||||||
@ -50,33 +50,33 @@
|
|||||||
} ,
|
} ,
|
||||||
|
|
||||||
"ao": {
|
"ao": {
|
||||||
"num" : [ "int" , [] ]
|
"num" : [ "int" , [] ]
|
||||||
, "cartesian" : [ "int" , [] ]
|
, "cartesian" : [ "int" , [] ]
|
||||||
, "shell" : [ "int" , [] ]
|
, "shell" : [ "int" , [] ]
|
||||||
, "normalization" : [ "float", [] ]
|
, "normalization" : [ "float", [] ]
|
||||||
} ,
|
} ,
|
||||||
|
|
||||||
"ao_1e_int": {
|
"ao_1e_int": {
|
||||||
"overlap" : [ "float", [ "ao.num", "ao.num" ] ]
|
"overlap" : [ "float", [ "ao.num", "ao.num" ] ]
|
||||||
, "kinetic" : [ "float", [ "ao.num", "ao.num" ] ]
|
, "kinetic" : [ "float", [ "ao.num", "ao.num" ] ]
|
||||||
, "potential_n_e" : [ "float", [ "ao.num", "ao.num" ] ]
|
, "potential_n_e" : [ "float", [ "ao.num", "ao.num" ] ]
|
||||||
, "ecp_local" : [ "float", [ "ao.num", "ao.num" ] ]
|
, "ecp_local" : [ "float", [ "ao.num", "ao.num" ] ]
|
||||||
, "ecp_non_local" : [ "float", [ "ao.num", "ao.num" ] ]
|
, "ecp_non_local" : [ "float", [ "ao.num", "ao.num" ] ]
|
||||||
, "core_hamiltonian" : [ "float", [ "ao.num", "ao.num" ] ]
|
, "core_hamiltonian" : [ "float", [ "ao.num", "ao.num" ] ]
|
||||||
} ,
|
} ,
|
||||||
|
|
||||||
"ao_2e_int": {
|
"ao_2e_int": {
|
||||||
"eri" : [ "float sparse", [ "ao.num", "ao.num", "ao.num", "ao.num" ] ]
|
"eri" : [ "float sparse", [ "ao.num", "ao.num", "ao.num", "ao.num" ] ]
|
||||||
, "eri_lr" : [ "float sparse", [ "ao.num", "ao.num", "ao.num", "ao.num" ] ]
|
, "eri_lr" : [ "float sparse", [ "ao.num", "ao.num", "ao.num", "ao.num" ] ]
|
||||||
} ,
|
} ,
|
||||||
|
|
||||||
"mo": {
|
"mo": {
|
||||||
"type" : [ "str" , [] ]
|
"type" : [ "str" , [] ]
|
||||||
, "num" : [ "int" , [] ]
|
, "num" : [ "int" , [] ]
|
||||||
, "coef" : [ "float", [ "ao.num", "mo.num" ] ]
|
, "coefficient" : [ "float", [ "mo.num", "ao.num" ] ]
|
||||||
, "class" : [ "str" , [ "mo.num" ] ]
|
, "class" : [ "str" , [ "mo.num" ] ]
|
||||||
, "symmetry" : [ "str" , [ "mo.num" ] ]
|
, "symmetry" : [ "str" , [ "mo.num" ] ]
|
||||||
, "occupation" : [ "float", [ "mo.num" ] ]
|
, "occupation" : [ "float", [ "mo.num" ] ]
|
||||||
} ,
|
} ,
|
||||||
|
|
||||||
"mo_1e_int": {
|
"mo_1e_int": {
|
||||||
|
65
trex.org
65
trex.org
@ -186,10 +186,10 @@ written in C.
|
|||||||
#+NAME: basis
|
#+NAME: basis
|
||||||
| ~type~ | ~str~ | | Type of basis set: "Gaussian" or "Slater" |
|
| ~type~ | ~str~ | | Type of basis set: "Gaussian" or "Slater" |
|
||||||
| ~shell_num~ | ~int~ | | Total Number of shells |
|
| ~shell_num~ | ~int~ | | Total Number of shells |
|
||||||
| ~shell_factor~ | ~float~ | ~(basis.shell_num)~ | Normalization factor of the shell |
|
|
||||||
| ~shell_center~ | ~int~ | ~(basis.shell_num)~ | Nucleus on which the shell is centered |
|
| ~shell_center~ | ~int~ | ~(basis.shell_num)~ | Nucleus on which the shell is centered |
|
||||||
| ~shell_ang_mom~ | ~int~ | ~(basis.shell_num)~ | Angular momentum ~0:S, 1:P, 2:D, ...~ |
|
| ~shell_ang_mom~ | ~int~ | ~(basis.shell_num)~ | Angular momentum ~0:S, 1:P, 2:D, ...~ |
|
||||||
| ~shell_prim_num~ | ~int~ | ~(basis.shell_num)~ | Number of primitives in the shell |
|
| ~shell_prim_num~ | ~int~ | ~(basis.shell_num)~ | Number of primitives in the shell |
|
||||||
|
| ~shell_factor~ | ~float~ | ~(basis.shell_num)~ | Normalization factor of the shell |
|
||||||
| ~prim_index~ | ~int~ | ~(basis.shell_num)~ | Index of the first primitive in the complete list |
|
| ~prim_index~ | ~int~ | ~(basis.shell_num)~ | Index of the first primitive in the complete list |
|
||||||
| ~prim_num~ | ~int~ | | Total number of primitives |
|
| ~prim_num~ | ~int~ | | Total number of primitives |
|
||||||
| ~exponent~ | ~float~ | ~(basis.prim_num)~ | Exponents of the primitives |
|
| ~exponent~ | ~float~ | ~(basis.prim_num)~ | Exponents of the primitives |
|
||||||
@ -262,24 +262,27 @@ written in C.
|
|||||||
#+NAME: ao
|
#+NAME: ao
|
||||||
| ~cartesian~ | ~int~ | | ~1~: true, ~0~: false |
|
| ~cartesian~ | ~int~ | | ~1~: true, ~0~: false |
|
||||||
| ~num~ | ~int~ | | Total number of atomic orbitals |
|
| ~num~ | ~int~ | | Total number of atomic orbitals |
|
||||||
| ~shell~ | ~int~ | ~ao.num~ | basis set shell for each AO |
|
| ~shell~ | ~int~ | ~(ao.num)~ | basis set shell for each AO |
|
||||||
| ~normalization~ | ~float~ | ~ao.num~ | Normalization factors |
|
| ~normalization~ | ~float~ | ~(ao.num)~ | Normalization factors |
|
||||||
|
|
||||||
#+CALL: json(data=ao, title="ao")
|
#+CALL: json(data=ao, title="ao")
|
||||||
|
|
||||||
#+RESULTS:
|
#+RESULTS:
|
||||||
:results:
|
:results:
|
||||||
#+begin_src python :tangle trex.json
|
#+begin_src python :tangle trex.json
|
||||||
"ao": {
|
"ao": {
|
||||||
"num" : [ "int" , [] ]
|
"cartesian" : [ "int" , [] ]
|
||||||
, "cartesian" : [ "int" , [] ]
|
, "num" : [ "int" , [] ]
|
||||||
, "shell" : [ "int" , [] ]
|
, "shell" : [ "int" , [ "ao.num" ] ]
|
||||||
, "normalization" : [ "float", [] ]
|
, "normalization" : [ "float", [ "ao.num" ] ]
|
||||||
} ,
|
} ,
|
||||||
#+end_src
|
#+end_src
|
||||||
:end:
|
:end:
|
||||||
|
|
||||||
** One-electron integrals
|
** One-electron integrals
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: ao_one_e
|
||||||
|
:END:
|
||||||
|
|
||||||
- \[ \hat{V}_{\text{ne}} = \sum_{A=1}^{N_\text{nucl}}
|
- \[ \hat{V}_{\text{ne}} = \sum_{A=1}^{N_\text{nucl}}
|
||||||
\sum_{i=1}^{N_\text{elec}} \frac{-Z_A }{\vert \mathbf{R}_A -
|
\sum_{i=1}^{N_\text{elec}} \frac{-Z_A }{\vert \mathbf{R}_A -
|
||||||
@ -318,6 +321,9 @@ written in C.
|
|||||||
:end:
|
:end:
|
||||||
|
|
||||||
** Two-electron integrals
|
** Two-electron integrals
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: ao_two_e
|
||||||
|
:END:
|
||||||
|
|
||||||
The two-electron integrals for a two-electron operator $\hat{O}$ are
|
The two-electron integrals for a two-electron operator $\hat{O}$ are
|
||||||
\[ \langle p q \vert \hat{O} \vert r s \rangle \] in physicists
|
\[ \langle p q \vert \hat{O} \vert r s \rangle \] in physicists
|
||||||
@ -353,12 +359,12 @@ written in C.
|
|||||||
* Molecular orbitals
|
* Molecular orbitals
|
||||||
|
|
||||||
#+NAME: mo
|
#+NAME: mo
|
||||||
| ~type~ | ~str~ | | String identify the set of MOs |
|
| ~type~ | ~str~ | | String identify the set of MOs |
|
||||||
| ~num~ | ~int~ | | Number of MOs |
|
| ~num~ | ~int~ | | Number of MOs |
|
||||||
| ~coef~ | ~float~ | ~(ao.num, mo.num)~ | MO coefficients |
|
| ~coefficient~ | ~float~ | ~(ao.num, mo.num)~ | MO coefficients |
|
||||||
| ~class~ | ~str~ | ~(mo.num)~ | Core, Inactive, Active, Virtual, Deleted |
|
| ~class~ | ~str~ | ~(mo.num)~ | Core, Inactive, Active, Virtual, Deleted |
|
||||||
| ~symmetry~ | ~str~ | ~(mo.num)~ | Symmetry in the point group |
|
| ~symmetry~ | ~str~ | ~(mo.num)~ | Symmetry in the point group |
|
||||||
| ~occupation~ | ~float~ | ~(mo.num)~ | Occupation number |
|
| ~occupation~ | ~float~ | ~(mo.num)~ | Occupation number |
|
||||||
|
|
||||||
#+CALL: json(data=mo, title="mo")
|
#+CALL: json(data=mo, title="mo")
|
||||||
|
|
||||||
@ -366,21 +372,21 @@ written in C.
|
|||||||
:results:
|
:results:
|
||||||
#+begin_src python :tangle trex.json
|
#+begin_src python :tangle trex.json
|
||||||
"mo": {
|
"mo": {
|
||||||
"type" : [ "str" , [] ]
|
"type" : [ "str" , [] ]
|
||||||
, "num" : [ "int" , [] ]
|
, "num" : [ "int" , [] ]
|
||||||
, "coef" : [ "float", [ "ao.num", "mo.num" ] ]
|
, "coefficient" : [ "float", [ "mo.num", "ao.num" ] ]
|
||||||
, "class" : [ "str" , [ "mo.num" ] ]
|
, "class" : [ "str" , [ "mo.num" ] ]
|
||||||
, "symmetry" : [ "str" , [ "mo.num" ] ]
|
, "symmetry" : [ "str" , [ "mo.num" ] ]
|
||||||
, "occupation" : [ "float", [ "mo.num" ] ]
|
, "occupation" : [ "float", [ "mo.num" ] ]
|
||||||
} ,
|
} ,
|
||||||
#+end_src
|
#+end_src
|
||||||
:end:
|
:end:
|
||||||
|
|
||||||
** One-electron integrals
|
** One-electron integrals
|
||||||
|
|
||||||
The operators as the same as those defined in the AO one-electron
|
The operators as the same as those defined in the
|
||||||
integrals section. Here, the integrals are given in the basis of
|
[[ao_one_e][AO one-electron integrals section]]. Here, the integrals are given in
|
||||||
molecular orbitals.
|
the basis of molecular orbitals.
|
||||||
|
|
||||||
#+NAME: mo_1e_int
|
#+NAME: mo_1e_int
|
||||||
| ~overlap~ | ~float~ | ~(mo.num, mo.num)~ | $\langle i \vert j \rangle$ |
|
| ~overlap~ | ~float~ | ~(mo.num, mo.num)~ | $\langle i \vert j \rangle$ |
|
||||||
@ -408,9 +414,9 @@ written in C.
|
|||||||
|
|
||||||
** Two-electron integrals
|
** Two-electron integrals
|
||||||
|
|
||||||
The operators as the same as those defined in the AO two-electron
|
The operators as the same as those defined in the
|
||||||
integrals section. Here, the integrals are given in the basis of
|
[[ao_two_e][AO two-electron integrals section]]. Here, the integrals are given in
|
||||||
molecular orbitals.
|
the basis of molecular orbitals.
|
||||||
|
|
||||||
#+NAME: mo_2e_int
|
#+NAME: mo_2e_int
|
||||||
| ~eri~ | ~float sparse~ | ~(mo.num, mo.num, mo.num, mo.num)~ | Electron repulsion integrals |
|
| ~eri~ | ~float sparse~ | ~(mo.num, mo.num, mo.num, mo.num)~ | Electron repulsion integrals |
|
||||||
@ -487,7 +493,10 @@ for line in data:
|
|||||||
dims.reverse()
|
dims.reverse()
|
||||||
dims = "[ " + ", ".join(dims) + " ]"
|
dims = "[ " + ", ".join(dims) + " ]"
|
||||||
else:
|
else:
|
||||||
dims = "[]"
|
if dims.strip() != "":
|
||||||
|
dims = "ERROR"
|
||||||
|
else:
|
||||||
|
dims = "[]"
|
||||||
buffer = fmt % (indent, name, typ.ljust(f2), dims.ljust(f3))
|
buffer = fmt % (indent, name, typ.ljust(f2), dims.ljust(f3))
|
||||||
indent = " , "
|
indent = " , "
|
||||||
print(buffer)
|
print(buffer)
|
||||||
|
Loading…
Reference in New Issue
Block a user