10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-07-25 12:17:25 +02:00

Cleaned readme for auto-generation

This commit is contained in:
Anthony Scemama 2020-12-28 12:03:13 +01:00
parent ceca635621
commit 65d04a76f2
35 changed files with 1138 additions and 188 deletions

87
ao/README.org Normal file
View File

@ -0,0 +1,87 @@
#+TITLE: Atomic Orbitals
#+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup
#+name: synopsis
#+begin_src ocaml :export output raw
"Atomic basis set"
#+end_src
#+RESULTS: synopsis
: Atomic basis set
* Dune files :noexport:
** Generate dune files
Use [C-c C-c] on the code below to create the output for the dune files
#+header: :noweb strip-export
#+header: :var name=(file-name-directory buffer-file-name)
#+header: :var dune="lib/dune"
#+header: :var dunetest="test/dune"
#+begin_src python :exports none :results output none
name = name.split('/')[-2]
synopsis = """
<<synopsis>>
"""
with open(dune,'w') as f:
f.write(f"""
(library
(name {name})
(public_name qcaml.{name})
(synopsis {synopsis} )
<<dependencies>>
<<noimplementation>>
<<c-files>>
)
<<lex-yacc>>
""")
with open(dunetest,'w') as f:
f.write(f"""
(library
(name test_{name})
(synopsis "Test for {name} library")
(libraries
alcotest
qcaml.{name}
)
)
""")
#+end_src
** Dependencies
#+name: dependencies
#+begin_src elisp
(libraries
qcaml.common
qcaml.particles
qcaml.gaussian
qcaml.gaussian_integrals
qcaml.operators
)
#+end_src
** Modules without implementation
#+name: noimplementation
#+begin_src elisp
#+end_src
** Extra C files
#+begin_src elisp
#+end_src
** Parser files
#+name: lex-yacc
#+begin_src elisp
#+end_src

View File

@ -1,8 +1,10 @@
; name = name of the supermodule that will wrap all source files as submodules
; public_name = name of the library for ocamlfind and opam
(library (library
(name ao) (name ao)
(public_name qcaml.ao) (public_name qcaml.ao)
(synopsis
"Atomic basis set"
)
(libraries (libraries
qcaml.common qcaml.common
qcaml.particles qcaml.particles
@ -10,4 +12,7 @@
qcaml.gaussian_integrals qcaml.gaussian_integrals
qcaml.operators qcaml.operators
) )
(synopsis "Atomic basis set."))
)

View File

@ -1,10 +1,9 @@
(library (library
(name test_ao_basis) (name test_ao)
(synopsis "Test for ao library")
(libraries (libraries
alcotest alcotest
qcaml.common
qcaml.linear_algebra
qcaml.gaussian_integrals
qcaml.ao qcaml.ao
) )
(synopsis "Tests for the AO basis")) )

View File

@ -2,60 +2,80 @@
#+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup #+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup
This directory contains many utility functions used by all the other directories. #+name: synopsis
#+begin_src ocaml :export output raw
"Utility functions used by all the other directories."
#+end_src
#+RESULTS: synopsis
: Utility functions used by all the other directories.
* Dune files :noexport: * Dune files :noexport:
:PROPERTIES:
:dune: lib/dune
:dune-test: test/dune
:header-args: :noweb yes
:END:
** Headers ** Generate dune files
#+begin_src elisp :tangle (org-entry-get nil "dune" t)
Use [C-c C-c] on the code below to create the output for the dune files
#+header: :noweb strip-export
#+header: :var name=(file-name-directory buffer-file-name)
#+header: :var dune="lib/dune"
#+header: :var dunetest="test/dune"
#+begin_src python :exports none :results output none
name = name.split('/')[-2]
synopsis = """
<<synopsis>>
"""
with open(dune,'w') as f:
f.write(f"""
(library (library
#+end_src (name {name})
(public_name qcaml.{name})
(synopsis {synopsis} )
<<dependencies>>
<<noimplementation>>
<<c-files>>
)
<<lex-yacc>>
""")
#+begin_src elisp :tangle (org-entry-get nil "dune-test" t) with open(dunetest,'w') as f:
f.write(f"""
(library (library
#+end_src (name test_{name})
(synopsis "Test for {name} library")
** Library
*** General information
#+begin_src elisp :tangle (org-entry-get nil "dune" t)
(name common)
(public_name qcaml.common)
(synopsis "General utilities used in all QCaml libraries.")
#+end_src
#+begin_src elisp :tangle (org-entry-get nil "dune-test" t)
(name test_common)
(synopsis "Test for common library")
#+end_src
*** Dependencies
#+begin_src elisp :tangle (org-entry-get nil "dune" t)
(libraries (libraries
alcotest
qcaml.{name}
)
)
""")
#+end_src
** Dependencies
#+name: dependencies
#+begin_src elisp
(libraries
str str
zarith zarith
getopt getopt
) )
#+end_src #+end_src
#+begin_src elisp :tangle (org-entry-get nil "dune-test" t) ** Modules without implementation
(libraries
alcotest #+name: noimplementation
qcaml.common #+begin_src elisp
)
#+end_src #+end_src
*** Extra C files ** Extra C files
The ~util.c~ file contains small C snippets to add missing The ~util.c~ file contains small C snippets to add missing
functionalities to OCaml, such as support for the ~popcnt~ instruction. functionalities to OCaml, such as support for the ~popcnt~ instruction.
#+begin_src elisp :tangle (org-entry-get nil "dune" t) #+name: c-files
#+begin_src elisp
(c_names (c_names
util util
) )
@ -64,14 +84,8 @@ This directory contains many utility functions used by all the other directories
) )
#+end_src #+end_src
** Footers ** Parser
#+begin_src elisp :tangle (org-entry-get nil "dune" t) #+name: lex-yacc
) #+begin_src elisp
#+end_src #+end_src
#+begin_src elisp :tangle (org-entry-get nil "dune-test" t)
)
#+end_src

View File

@ -1,9 +1,10 @@
(library
(library
(name common) (name common)
(public_name qcaml.common) (public_name qcaml.common)
(synopsis "General utilities used in all QCaml libraries.") (synopsis
"Utility functions used by all the other directories."
)
(libraries (libraries
str str
zarith zarith
@ -16,5 +17,5 @@
(c_flags (:standard) (c_flags (:standard)
-Ofast -march=native -fPIC -Ofast -march=native -fPIC
) )
) )

View File

@ -1,11 +1,9 @@
(library
(library
(name test_common) (name test_common)
(synopsis "Test for common library") (synopsis "Test for common library")
(libraries (libraries
alcotest alcotest
qcaml.common qcaml.common
) )
) )

84
gaussian/README.org Normal file
View File

@ -0,0 +1,84 @@
#+TITLE: Gaussian
#+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup
#+name: synopsis
#+begin_src ocaml :export output raw
"Gaussian basis sets"
#+end_src
#+RESULTS: synopsis
: Gaussian basis sets
* Dune files :noexport:
** Generate dune files
Use [C-c C-c] on the code below to create the output for the dune files
#+header: :noweb strip-export
#+header: :var name=(file-name-directory buffer-file-name)
#+header: :var dune="lib/dune"
#+header: :var dunetest="test/dune"
#+begin_src python :exports none :results output none
name = name.split('/')[-2]
synopsis = """
<<synopsis>>
"""
with open(dune,'w') as f:
f.write(f"""
(library
(name {name})
(public_name qcaml.{name})
(synopsis {synopsis} )
<<dependencies>>
<<noimplementation>>
<<c-files>>
)
<<lex-yacc>>
""")
with open(dunetest,'w') as f:
f.write(f"""
(library
(name test_{name})
(synopsis "Test for {name} library")
(libraries
alcotest
qcaml.{name}
)
)
""")
#+end_src
** Dependencies
#+name: dependencies
#+begin_src elisp
(libraries
qcaml.common
qcaml.particles
)
#+end_src
** Modules without implementation
#+name: noimplementation
#+begin_src elisp
#+end_src
** Extra C files
#+begin_src elisp
#+end_src
** Parser files
#+name: lex-yacc
#+begin_src elisp
#+end_src

View File

@ -1,11 +1,15 @@
; name = name of the supermodule that will wrap all source files as submodules
; public_name = name of the library for ocamlfind and opam
(library (library
(name gaussian) (name gaussian)
(public_name qcaml.gaussian) (public_name qcaml.gaussian)
(synopsis
"Gaussian basis sets"
)
(libraries (libraries
str
qcaml.common qcaml.common
qcaml.particles qcaml.particles
) )
(synopsis "Gaussian basis sets."))
)

View File

@ -1,8 +1,9 @@
(library (library
(name test_gaussian_basis) (name test_gaussian)
(synopsis "Test for gaussian library")
(libraries (libraries
alcotest alcotest
qcaml.particles
qcaml.gaussian qcaml.gaussian
) )
(synopsis "Tests for Gaussian basis sets")) )

View File

@ -0,0 +1,87 @@
#+TITLE: Gaussian integrals
#+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup
#+name: synopsis
#+begin_src ocaml :export output raw
"Integrals on the Gaussian basis sets"
#+end_src
#+RESULTS: synopsis
: Integrals on the Gaussian basis sets
* Dune files :noexport:
** Generate dune files
Use [C-c C-c] on the code below to create the output for the dune files
#+header: :noweb strip-export
#+header: :var name=(file-name-directory buffer-file-name)
#+header: :var dune="lib/dune"
#+header: :var dunetest="test/dune"
#+begin_src python :exports none :results output none
name = name.split('/')[-2]
synopsis = """
<<synopsis>>
"""
with open(dune,'w') as f:
f.write(f"""
(library
(name {name})
(public_name qcaml.{name})
(synopsis {synopsis} )
<<dependencies>>
<<noimplementation>>
<<c-files>>
)
<<lex-yacc>>
""")
with open(dunetest,'w') as f:
f.write(f"""
(library
(name test_{name})
(synopsis "Test for {name} library")
(libraries
alcotest
qcaml.{name}
)
)
""")
#+end_src
** Dependencies
#+name: dependencies
#+begin_src elisp
(libraries
qcaml.common
qcaml.linear_algebra
qcaml.gaussian
qcaml.operators
)
#+end_src
** Modules without implementation
#+name: noimplementation
#+begin_src elisp
(modules_without_implementation matrix_on_basis)
#+end_src
** Extra C files
#+begin_src elisp
#+end_src
** Parser files
#+name: lex-yacc
#+begin_src elisp
#+end_src

View File

@ -1,14 +1,17 @@
; name = name of the supermodule that will wrap all source files as submodules
; public_name = name of the library for ocamlfind and opam
(library (library
(name gaussian_integrals) (name gaussian_integrals)
(public_name qcaml.gaussian_integrals) (public_name qcaml.gaussian_integrals)
(synopsis
"Integrals on the Gaussian basis sets"
)
(libraries (libraries
str
qcaml.common qcaml.common
qcaml.linear_algebra qcaml.linear_algebra
qcaml.gaussian qcaml.gaussian
qcaml.operators qcaml.operators
) )
(modules_without_implementation matrix_on_basis) (modules_without_implementation matrix_on_basis)
(synopsis "Integrals on the Gaussian basis sets."))
)

View File

@ -1,8 +1,9 @@
(library (library
(name test_gaussian_integrals) (name test_gaussian_integrals)
(synopsis "Test for gaussian_integrals library")
(libraries (libraries
alcotest alcotest
qcaml.particles
qcaml.gaussian_integrals qcaml.gaussian_integrals
) )
(synopsis "Tests for integrals on the Gaussian basis sets")) )

84
linear_algebra/README.org Normal file
View File

@ -0,0 +1,84 @@
#+TITLE: Linear Algebra
#+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup
#+name: synopsis
#+begin_src ocaml :export output raw
"Linear algebra utilities of QCaml libraries."
#+end_src
#+RESULTS: synopsis
: Linear algebra utilities of QCaml libraries.
* Dune files :noexport:
** Generate dune files
Use [C-c C-c] on the code below to create the output for the dune files
#+header: :noweb strip-export
#+header: :var name=(file-name-directory buffer-file-name)
#+header: :var dune="lib/dune"
#+header: :var dunetest="test/dune"
#+begin_src python :exports none :results output none
name = name.split('/')[-2]
synopsis = """
<<synopsis>>
"""
with open(dune,'w') as f:
f.write(f"""
(library
(name {name})
(public_name qcaml.{name})
(synopsis {synopsis} )
<<dependencies>>
<<noimplementation>>
<<c-files>>
)
<<lex-yacc>>
""")
with open(dunetest,'w') as f:
f.write(f"""
(library
(name test_{name})
(synopsis "Test for {name} library")
(libraries
alcotest
qcaml.{name}
)
)
""")
#+end_src
** Dependencies
#+name: dependencies
#+begin_src elisp
(libraries
qcaml.common
lacaml
)
#+end_src
** Modules without implementation
#+name: noimplementation
#+begin_src elisp
#+end_src
** Extra C files
#+begin_src elisp
#+end_src
** Parser files
#+name: lex-yacc
#+begin_src elisp
#+end_src

View File

@ -1,10 +1,15 @@
; name = name of the supermodule that will wrap all source files as submodules
; public_name = name of the library for ocamlfind and opam
(library (library
(name linear_algebra) (name linear_algebra)
(public_name qcaml.linear_algebra) (public_name qcaml.linear_algebra)
(synopsis
"Linear algebra utilities of QCaml libraries."
)
(libraries (libraries
qcaml.common qcaml.common
lacaml lacaml
) )
(synopsis "Linear algebra utilities of QCaml libraries."))
)

View File

@ -1,7 +1,9 @@
(library (library
(name test_linear_algebra) (name test_linear_algebra)
(synopsis "Test for linear_algebra library")
(libraries (libraries
alcotest alcotest
qcaml.linear_algebra qcaml.linear_algebra
) )
(synopsis "Tests for linear algebra")) )

83
mo/README.org Normal file
View File

@ -0,0 +1,83 @@
#+TITLE: Molecular orbitals
#+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup
#+name: synopsis
#+begin_src ocaml :export output raw
"Molecular orbitals"
#+end_src
#+RESULTS: synopsis
: Parameteried operators, such as F12 and range-separation
* Dune files :noexport:
** Generate dune files
Use [C-c C-c] on the code below to create the output for the dune files
#+header: :noweb strip-export
#+header: :var name=(file-name-directory buffer-file-name)
#+header: :var dune="lib/dune"
#+header: :var dunetest="test/dune"
#+begin_src python :exports none :results output none
name = name.split('/')[-2]
synopsis = """
<<synopsis>>
"""
with open(dune,'w') as f:
f.write(f"""
(library
(name {name})
(public_name qcaml.{name})
(synopsis {synopsis} )
<<dependencies>>
<<noimplementation>>
<<c-files>>
)
<<lex-yacc>>
""")
with open(dunetest,'w') as f:
f.write(f"""
(library
(name test_{name})
(synopsis "Test for {name} library")
(libraries
alcotest
qcaml.{name}
)
)
""")
#+end_src
** Dependencies
#+name: dependencies
#+begin_src elisp
(libraries
qcaml.simulation
)
#+end_src
** Modules without implementation
#+name: noimplementation
#+begin_src elisp
#+end_src
** Extra C files
#+begin_src elisp
#+end_src
** Parser files
#+name: lex-yacc
#+begin_src elisp
#+end_src

View File

@ -1,9 +1,14 @@
; name = name of the supermodule that will wrap all source files as submodules
; public_name = name of the library for ocamlfind and opam
(library (library
(name mo) (name mo)
(public_name qcaml.mo) (public_name qcaml.mo)
(synopsis
"Molecular orbitals"
)
(libraries (libraries
qcaml.simulation qcaml.simulation
) )
(synopsis "Molecular orbitals."))
)

View File

@ -1,12 +1,9 @@
(library (library
(name test_mo_basis) (name test_mo)
(synopsis "Test for mo library")
(libraries (libraries
alcotest alcotest
qcaml.mo qcaml.mo
) )
(synopsis "Tests for the MO basis")) )

83
operators/README.org Normal file
View File

@ -0,0 +1,83 @@
#+TITLE: Operators
#+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup
#+name: synopsis
#+begin_src ocaml :export output raw
"Parameteried operators, such as F12 and range-separation"
#+end_src
#+RESULTS: synopsis
: Parameteried operators, such as F12 and range-separation
* Dune files :noexport:
** Generate dune files
Use [C-c C-c] on the code below to create the output for the dune files
#+header: :noweb strip-export
#+header: :var name=(file-name-directory buffer-file-name)
#+header: :var dune="lib/dune"
#+header: :var dunetest="test/dune"
#+begin_src python :exports none :results output none
name = name.split('/')[-2]
synopsis = """
<<synopsis>>
"""
with open(dune,'w') as f:
f.write(f"""
(library
(name {name})
(public_name qcaml.{name})
(synopsis {synopsis} )
<<dependencies>>
<<noimplementation>>
<<c-files>>
)
<<lex-yacc>>
""")
with open(dunetest,'w') as f:
f.write(f"""
(library
(name test_{name})
(synopsis "Test for {name} library")
(libraries
alcotest
qcaml.{name}
)
)
""")
#+end_src
** Dependencies
#+name: dependencies
#+begin_src elisp
(libraries
qcaml.common
)
#+end_src
** Modules without implementation
#+name: noimplementation
#+begin_src elisp
#+end_src
** Extra C files
#+begin_src elisp
#+end_src
** Parser files
#+name: lex-yacc
#+begin_src elisp
#+end_src

View File

@ -1,10 +1,14 @@
; name = name of the supermodule that will wrap all source files as submodules
; public_name = name of the library for ocamlfind and opam
(library (library
(name operators) (name operators)
(public_name qcaml.operators) (public_name qcaml.operators)
(synopsis
"Parameteried operators, such as F12 and range-separation"
)
(libraries (libraries
str
qcaml.common qcaml.common
) )
(synopsis "Parameterized operators"))
)

9
operators/test/dune Normal file
View File

@ -0,0 +1,9 @@
(library
(name test_operators)
(synopsis "Test for operators library")
(libraries
alcotest
qcaml.operators
)
)

94
particles/README.org Normal file
View File

@ -0,0 +1,94 @@
#+TITLE: Common
#+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup
#+name: synopsis
#+begin_src ocaml :export output raw
"Information relative to particles (electrons and nuclei)."
#+end_src
#+RESULTS: synopsis
: Information relative to particles (electrons and nuclei).
* Dune files :noexport:
** Generate dune files
Use [C-c C-c] on the code below to create the output for the dune files
#+header: :noweb strip-export
#+header: :var name=(file-name-directory buffer-file-name)
#+header: :var dune="lib/dune"
#+header: :var dunetest="test/dune"
#+begin_src python :exports none :results output none
name = name.split('/')[-2]
synopsis = """
<<synopsis>>
"""
with open(dune,'w') as f:
f.write(f"""
(library
(name {name})
(public_name qcaml.{name})
(synopsis {synopsis} )
<<dependencies>>
<<noimplementation>>
<<c-files>>
)
<<lex-yacc>>
""")
with open(dunetest,'w') as f:
f.write(f"""
(library
(name test_{name})
(synopsis "Test for {name} library")
(libraries
alcotest
qcaml.{name}
)
)
""")
#+end_src
** Dependencies
#+name: dependencies
#+begin_src elisp
(libraries
qcaml.common
)
#+end_src
** Modules without implementation
#+name: noimplementation
#+begin_src elisp
(modules_without_implementation
xyz_ast
)
#+end_src
** Extra C files
#+begin_src elisp
#+end_src
** Parser files
#+name: lex-yacc
#+begin_src elisp
(ocamllex
(modules
nuclei_lexer
))
(ocamlyacc
(modules
xyz_parser
))
#+end_src

View File

@ -1,17 +1,23 @@
; name = name of the supermodule that will wrap all source files as submodules
; public_name = name of the library for ocamlfind and opam
(library (library
(name particles) (name particles)
(public_name qcaml.particles) (public_name qcaml.particles)
(synopsis
"Information relative to particles (electrons and nuclei)."
)
(libraries (libraries
str
qcaml.common qcaml.common
) )
(modules_without_implementation xyz_ast) (modules_without_implementation
(synopsis "Defines nuclei and electrons.")) xyz_ast
)
)
(ocamllex (ocamllex
(modules nuclei_lexer) (modules
) nuclei_lexer
))
(ocamlyacc (ocamlyacc
(modules xyz_parser) (modules
) xyz_parser
))

View File

@ -1,7 +1,9 @@
(library (library
(name test_particles) (name test_particles)
(synopsis "Test for particles library")
(libraries (libraries
alcotest alcotest
qcaml.particles qcaml.particles
) )
(synopsis "Tests for particles")) )

84
perturbation/README.org Normal file
View File

@ -0,0 +1,84 @@
#+TITLE: Perturbation
#+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup
#+name: synopsis
#+begin_src ocaml :export output raw
"Perturbation theory"
#+end_src
#+RESULTS: synopsis
: Perturbation theory
* Dune files :noexport:
** Generate dune files
Use [C-c C-c] on the code below to create the output for the dune files
#+header: :noweb strip-export
#+header: :var name=(file-name-directory buffer-file-name)
#+header: :var dune="lib/dune"
#+header: :var dunetest="test/dune"
#+begin_src python :exports none :results output none
name = name.split('/')[-2]
synopsis = """
<<synopsis>>
"""
with open(dune,'w') as f:
f.write(f"""
(library
(name {name})
(public_name qcaml.{name})
(synopsis {synopsis} )
<<dependencies>>
<<noimplementation>>
<<c-files>>
)
<<lex-yacc>>
""")
with open(dunetest,'w') as f:
f.write(f"""
(library
(name test_{name})
(synopsis "Test for {name} library")
(libraries
alcotest
qcaml.{name}
)
)
""")
#+end_src
** Dependencies
#+name: dependencies
#+begin_src elisp
(libraries
qcaml.simulation
qcaml.mo
)
#+end_src
** Modules without implementation
#+name: noimplementation
#+begin_src elisp
#+end_src
** Extra C files
#+begin_src elisp
#+end_src
** Parser files
#+name: lex-yacc
#+begin_src elisp
#+end_src

View File

@ -1,10 +1,15 @@
; name = name of the supermodule that will wrap all source files as submodules
; public_name = name of the library for ocamlfind and opam
(library (library
(name perturbation) (name perturbation)
(public_name qcaml.perturbation) (public_name qcaml.perturbation)
(synopsis
"Perturbation theory"
)
(libraries (libraries
qcaml.simulation qcaml.simulation
qcaml.mo qcaml.mo
) )
(synopsis "Perturbation theory."))
)

View File

@ -1,13 +1,9 @@
(library (library
(name test_perturbation) (name test_perturbation)
(synopsis "Test for perturbation library")
(libraries (libraries
alcotest alcotest
qcaml.mo
qcaml.perturbation qcaml.perturbation
) )
(synopsis "Tests for the perturbation")) )

91
qcaml/README.org Normal file
View File

@ -0,0 +1,91 @@
#+TITLE: QCaml
#+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup
#+name: synopsis
#+begin_src ocaml :export output raw
"Main QCaml entry point"
#+end_src
#+RESULTS: synopsis
: Main QCaml entry point
* Dune files :noexport:
** Generate dune files
Use [C-c C-c] on the code below to create the output for the dune files
#+header: :noweb strip-export
#+header: :var name=(file-name-directory buffer-file-name)
#+header: :var dune="lib/dune"
#+header: :var dunetest="test/dune"
#+begin_src python :exports none :results output none
name = name.split('/')[-2]
synopsis = """
<<synopsis>>
"""
with open(dune,'w') as f:
f.write(f"""
(library
(name {name})
(public_name qcaml.{name})
(synopsis {synopsis} )
<<dependencies>>
<<noimplementation>>
<<c-files>>
)
<<lex-yacc>>
""")
with open(dunetest,'w') as f:
f.write(f"""
(library
(name test_{name})
(synopsis "Test for {name} library")
(libraries
alcotest
qcaml.{name}
)
)
""")
#+end_src
** Dependencies
#+name: dependencies
#+begin_src elisp
(libraries
qcaml.ao
qcaml.common
qcaml.gaussian
qcaml.gaussian_integrals
qcaml.mo
qcaml.operators
qcaml.particles
qcaml.perturbation
qcaml.simulation
)
#+end_src
** Modules without implementation
#+name: noimplementation
#+begin_src elisp
#+end_src
** Extra C files
#+begin_src elisp
#+end_src
** Parser files
#+name: lex-yacc
#+begin_src elisp
#+end_src

View File

@ -1,8 +1,10 @@
; name = name of the supermodule that will wrap all source files as submodules
; public_name = name of the library for ocamlfind and opam
(library (library
(name qcaml) (name qcaml)
(public_name qcaml) (public_name qcaml.qcaml)
(synopsis
"Main QCaml entry point"
)
(libraries (libraries
qcaml.ao qcaml.ao
qcaml.common qcaml.common
@ -14,4 +16,7 @@
qcaml.perturbation qcaml.perturbation
qcaml.simulation qcaml.simulation
) )
(synopsis "Main QCaml entry point"))
)

9
qcaml/test/dune Normal file
View File

@ -0,0 +1,9 @@
(library
(name test_qcaml)
(synopsis "Test for qcaml library")
(libraries
alcotest
qcaml.qcaml
)
)

88
simulation/README.org Normal file
View File

@ -0,0 +1,88 @@
#+TITLE: Simulation
#+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup
#+name: synopsis
#+begin_src ocaml :export output raw
"Data describing a simulation (AOs, operators, nuclear coordinate,...)"
#+end_src
#+RESULTS: synopsis
: Data describing a simulation (AOs, operators, nuclear coordinate,...)
* Dune files :noexport:
** Generate dune files
Use [C-c C-c] on the code below to create the output for the dune files
#+header: :noweb strip-export
#+header: :var name=(file-name-directory buffer-file-name)
#+header: :var dune="lib/dune"
#+header: :var dunetest="test/dune"
#+begin_src python :exports none :results output none
name = name.split('/')[-2]
synopsis = """
<<synopsis>>
"""
with open(dune,'w') as f:
f.write(f"""
(library
(name {name})
(public_name qcaml.{name})
(synopsis {synopsis} )
<<dependencies>>
<<noimplementation>>
<<c-files>>
)
<<lex-yacc>>
""")
with open(dunetest,'w') as f:
f.write(f"""
(library
(name test_{name})
(synopsis "Test for {name} library")
(libraries
alcotest
qcaml.{name}
)
)
""")
#+end_src
** Dependencies
#+name: dependencies
#+begin_src elisp
(libraries
qcaml.common
qcaml.particles
qcaml.gaussian
qcaml.gaussian_integrals
qcaml.operators
qcaml.ao
)
#+end_src
** Modules without implementation
#+name: noimplementation
#+begin_src elisp
#+end_src
** Extra C files
#+begin_src elisp
#+end_src
** Parser files
#+name: lex-yacc
#+begin_src elisp
#+end_src

View File

@ -1,8 +1,10 @@
; name = name of the supermodule that will wrap all source files as submodules
; public_name = name of the library for ocamlfind and opam
(library (library
(name simulation) (name simulation)
(public_name qcaml.simulation) (public_name qcaml.simulation)
(synopsis
"Data describing a simulation (AOs, operators, nuclear coordinate,...)"
)
(libraries (libraries
qcaml.common qcaml.common
qcaml.particles qcaml.particles
@ -11,4 +13,7 @@
qcaml.operators qcaml.operators
qcaml.ao qcaml.ao
) )
(synopsis "Contains data describing a simulation (AOs, operators, nuclear coordinate,...)"))
)

9
simulation/test/dune Normal file
View File

@ -0,0 +1,9 @@
(library
(name test_simulation)
(synopsis "Test for simulation library")
(libraries
alcotest
qcaml.simulation
)
)

View File

@ -5,10 +5,10 @@
test_common test_common
test_linear_algebra test_linear_algebra
test_particles test_particles
test_gaussian_basis test_gaussian
test_gaussian_integrals test_gaussian_integrals
test_ao_basis test_ao
test_mo_basis test_mo
test_perturbation test_perturbation
)) ))

View File

@ -8,11 +8,11 @@ let test_suites: unit Alcotest.test list = [
"Linear_algebra.Vector", Test_linear_algebra.Vector.tests; "Linear_algebra.Vector", Test_linear_algebra.Vector.tests;
"Particles.Nuclei", Test_particles.Nuclei.tests; "Particles.Nuclei", Test_particles.Nuclei.tests;
"Particles.Electrons", Test_particles.Electrons.tests; "Particles.Electrons", Test_particles.Electrons.tests;
"Gaussian_basis.General_basis", Test_gaussian_basis.General_basis.tests; "Gaussian_basis.General_basis", Test_gaussian.General_basis.tests;
"Ao_basis.Ao_basis_gaussian", Test_ao_basis.Ao_basis_gaussian.tests; "Ao_basis.Ao_basis_gaussian", Test_ao.Ao_basis_gaussian.tests;
"Ao_basis.Ao_basis", Test_ao_basis.Ao_basis.tests; "Ao_basis.Ao_basis", Test_ao.Ao_basis.tests;
"Mo.Guess", Test_mo_basis.Guess.tests; "Mo.Guess", Test_mo.Guess.tests;
"Mo.Hartree_Fock", Test_mo_basis.Hf.tests; "Mo.Hartree_Fock", Test_mo.Hf.tests;
"Perturbation.Mp2", Test_perturbation.Mp2.tests; "Perturbation.Mp2", Test_perturbation.Mp2.tests;
] ]