diff --git a/Makefile.am b/Makefile.am index 2560b5a..37c1fd5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -87,6 +87,23 @@ tests_test_f_SOURCES = $(test_trexio_f) tests/test_f.f90 tests_test_f_LDADD = src/libtrexio.la tests_test_f_LDFLAGS = -no-install +HTML_FILES = docs/trexio.css \ + docs/index.html \ + docs/Sparse.html \ + docs/templator_hdf5.html \ + docs/trex.html \ + docs/README.html \ + docs/templator_front.html \ + docs/templator_text.html + +htmldir = $(docdir) +dist_html_DATA = $(HTML_FILES) + +docs/index.html: $(SOURCES) src/README.org + cd tools && ./build_doc.sh + +$(HTML_FILES): docs/index.html + $(test_trexio_f): $(trexio_f) cp $(trexio_f) $(test_trexio_f) @@ -99,6 +116,7 @@ CLEANFILES += $(SOURCES) $(trexio_f) $(trexio_h) BUILT_SOURCES = $(SOURCES) $(trexio_f) $(test_trexio_f) + $(SOURCES): $(trexio_f) src/trexio.c: $(trexio_h) diff --git a/configure.ac b/configure.ac index 014a604..69c9a07 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) -AC_INIT([trexio], [0.2.0], [https://github.com/TREX-CoE/trexio/issues]) +AC_INIT([trexio], [0.3.0], [https://github.com/TREX-CoE/trexio/issues]) AM_INIT_AUTOMAKE([subdir-objects color-tests parallel-tests silent-rules 1.11]) AM_MAINTAINER_MODE() LT_INIT diff --git a/src/README.org b/src/README.org index 984f66d..d9569e9 100644 --- a/src/README.org +++ b/src/README.org @@ -4,6 +4,7 @@ ------------------ + - [[./trex.html][Data stored with TREXIO]] - [[./templator_front.html][Front end API]] - [[./templator_hdf5.html][HDF5 back end]] - [[./templator_text.html][TEXT back end]] diff --git a/tools/build_doc.sh b/tools/build_doc.sh index 2549581..1c7f366 100755 --- a/tools/build_doc.sh +++ b/tools/build_doc.sh @@ -99,10 +99,11 @@ function main() { # Create documentation cd ${SRC} - for dir in ${SRC}/templates_*/ + for dir in ${SRC}/templates_*/ ${TREXIO_ROOT}/ do dir=${dir%*/} echo ${dir} + OLDPWD=$PWD cd ${dir} for i in *.org do @@ -110,7 +111,7 @@ function main() { echo "======= ${i} =======" extract_doc ${i} ${dir} done - cd .. + cd $OLDPWD done echo diff --git a/trex.org b/trex.org index 06befce..a386c73 100644 --- a/trex.org +++ b/trex.org @@ -11,12 +11,12 @@ In Fortran, the arrays are 1-based and in most other languages the arrays are 0-base. Hence, we introduce the ~index~ type which is an 1-based ~int~ in the Fortran interface and 0-based otherwise. - #+begin_src python :tangle trex.json + #+begin_src python :tangle trex.json { #+end_src * Metadata - + 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 @@ -175,7 +175,7 @@ arrays are 0-base. Hence, we introduce the ~index~ type which is an 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). + \vert \mathbf{r}-\mathbf{R}_A \vert ^p \right). \] In the case of Gaussian functions, $n_s$ is always zero. @@ -190,7 +190,7 @@ arrays are 0-base. Hence, we introduce the ~index~ type which is an 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$. @@ -211,7 +211,7 @@ arrays are 0-base. Hence, we introduce the ~index~ type which is an | ~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: @@ -221,12 +221,12 @@ arrays are 0-base. Hence, we introduce the ~index~ type which is an "type" : [ "str" , [] ] , "num" : [ "int" , [] ] , "prim_num" : [ "int" , [] ] - , "nucleus_index" : [ "index" , [ "nucleus.num" ] ] + , "nucleus_index" : [ "index", [ "nucleus.num" ] ] , "nucleus_shell_num" : [ "int" , [ "nucleus.num" ] ] , "shell_ang_mom" : [ "int" , [ "basis.num" ] ] , "shell_prim_num" : [ "int" , [ "basis.num" ] ] , "shell_factor" : [ "float", [ "basis.num" ] ] - , "shell_prim_index" : [ "index" , [ "basis.num" ] ] + , "shell_prim_index" : [ "index", [ "basis.num" ] ] , "exponent" : [ "float", [ "basis.prim_num" ] ] , "coefficient" : [ "float", [ "basis.prim_num" ] ] , "prim_factor" : [ "float", [ "basis.prim_num" ] ] @@ -324,9 +324,9 @@ prim_factor = 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 + (\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}. \] + (\mathbf{r}) dx\, dy\, dz \right]^{-1/2}. \] In such a case, one should set the normalization of the shell (in the [[Basis set][Basis set]] section) to $\mathcal{N}_{z^2}$, which is the @@ -353,7 +353,7 @@ prim_factor = } , #+end_src :end: - + ** One-electron integrals :PROPERTIES: :CUSTOM_ID: ao_one_e @@ -362,7 +362,7 @@ prim_factor = - \[ \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}} = + - \[ \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 @@ -409,7 +409,7 @@ prim_factor = notation. # TODO: Physicist / Chemist functions - + - \[ \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 - @@ -460,9 +460,9 @@ prim_factor = ** One-electron integrals The operators as the same as those defined in the - [[ao_one_e][AO one-electron integrals section]]. Here, the integrals are given in + [[#ao_one_e][AO one-electron integrals section]]. Here, the integrals are given in the basis of molecular orbitals. - + #+NAME: mo_1e_int | ~overlap~ | ~float~ | ~(mo.num, mo.num)~ | $\langle i \vert j \rangle$ | | ~kinetic~ | ~float~ | ~(mo.num, mo.num)~ | $\langle i \vert \hat{T}_e \vert j \rangle$ | @@ -490,7 +490,7 @@ prim_factor = ** Two-electron integrals The operators as the same as those defined in the - [[ao_two_e][AO two-electron integrals section]]. Here, the integrals are given in + [[#ao_one_e][AO one-electron integrals section]]. Here, the integrals are given in the basis of molecular orbitals. #+NAME: mo_2e_int @@ -511,7 +511,7 @@ prim_factor = * TODO Slater determinants * TODO Reduced density matrices - + #+NAME: rdm | ~one_e~ | ~float~ | ~(mo.num, mo.num)~ | | ~one_e_up~ | ~float~ | ~(mo.num, mo.num)~ | @@ -532,12 +532,12 @@ prim_factor = #+end_src :end: -* Appendix :noexport: +* Appendix ** Python script from table to json #+NAME: json - #+begin_src python :var data=nucleus title="nucleus" last=0 :results output drawer -print("""#+begin_src python :tangle trex.json""") + #+begin_src python :var data=nucleus title="nucleus" last=0 :results output drawer +print("""#+begin_src python :tangle trex.json""") print(""" "%s": {"""%(title)) indent = " " f1 = 0 ; f2 = 0 ; f3 = 0