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
@ -73,7 +73,7 @@
|
|||||||
"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" ] ]
|
||||||
|
39
trex.org
39
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,8 +262,8 @@ 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")
|
||||||
|
|
||||||
@ -271,15 +271,18 @@ written in C.
|
|||||||
: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
|
||||||
@ -355,7 +361,7 @@ written in C.
|
|||||||
#+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 |
|
||||||
@ -368,7 +374,7 @@ written in C.
|
|||||||
"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" ] ]
|
||||||
@ -378,9 +384,9 @@ written in C.
|
|||||||
|
|
||||||
** 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 |
|
||||||
@ -486,6 +492,9 @@ for line in data:
|
|||||||
dims = [ '"'+x.strip()+'"' for x in dims.split(',') ]
|
dims = [ '"'+x.strip()+'"' for x in dims.split(',') ]
|
||||||
dims.reverse()
|
dims.reverse()
|
||||||
dims = "[ " + ", ".join(dims) + " ]"
|
dims = "[ " + ", ".join(dims) + " ]"
|
||||||
|
else:
|
||||||
|
if dims.strip() != "":
|
||||||
|
dims = "ERROR"
|
||||||
else:
|
else:
|
||||||
dims = "[]"
|
dims = "[]"
|
||||||
buffer = fmt % (indent, name, typ.ljust(f2), dims.ljust(f3))
|
buffer = fmt % (indent, name, typ.ljust(f2), dims.ljust(f3))
|
||||||
|
Loading…
Reference in New Issue
Block a user