From 65d04a76f201030d8ccff72037c82519891c6803 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Mon, 28 Dec 2020 12:03:13 +0100 Subject: [PATCH] Cleaned readme for auto-generation --- ao/README.org | 87 ++++++++++++++++++++++++ ao/lib/dune | 23 ++++--- ao/test/dune | 9 ++- common/README.org | 120 +++++++++++++++++++--------------- common/lib/dune | 31 ++++----- common/test/dune | 4 +- gaussian/README.org | 84 ++++++++++++++++++++++++ gaussian/lib/dune | 18 +++-- gaussian/test/dune | 7 +- gaussian_integrals/README.org | 87 ++++++++++++++++++++++++ gaussian_integrals/lib/dune | 21 +++--- gaussian_integrals/test/dune | 5 +- linear_algebra/README.org | 84 ++++++++++++++++++++++++ linear_algebra/lib/dune | 17 +++-- linear_algebra/test/dune | 4 +- mo/README.org | 83 +++++++++++++++++++++++ mo/lib/dune | 15 +++-- mo/test/dune | 11 ++-- operators/README.org | 83 +++++++++++++++++++++++ operators/lib/dune | 16 +++-- operators/test/dune | 9 +++ particles/README.org | 94 ++++++++++++++++++++++++++ particles/lib/dune | 28 ++++---- particles/test/dune | 4 +- perturbation/README.org | 84 ++++++++++++++++++++++++ perturbation/lib/dune | 17 +++-- perturbation/test/dune | 10 +-- qcaml/README.org | 91 ++++++++++++++++++++++++++ qcaml/lib/dune | 33 ++++++---- qcaml/test/dune | 9 +++ simulation/README.org | 88 +++++++++++++++++++++++++ simulation/lib/dune | 25 ++++--- simulation/test/dune | 9 +++ test/dune | 6 +- test/run_tests.ml | 10 +-- 35 files changed, 1138 insertions(+), 188 deletions(-) create mode 100644 ao/README.org create mode 100644 gaussian/README.org create mode 100644 gaussian_integrals/README.org create mode 100644 linear_algebra/README.org create mode 100644 mo/README.org create mode 100644 operators/README.org create mode 100644 operators/test/dune create mode 100644 particles/README.org create mode 100644 perturbation/README.org create mode 100644 qcaml/README.org create mode 100644 qcaml/test/dune create mode 100644 simulation/README.org create mode 100644 simulation/test/dune diff --git a/ao/README.org b/ao/README.org new file mode 100644 index 0000000..7441736 --- /dev/null +++ b/ao/README.org @@ -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 = """ +<> +""" + +with open(dune,'w') as f: + f.write(f""" +(library + (name {name}) + (public_name qcaml.{name}) + (synopsis {synopsis} ) + <> + <> + <> +) +<> +""") + +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 + + + + diff --git a/ao/lib/dune b/ao/lib/dune index 756db5f..c5ad017 100644 --- a/ao/lib/dune +++ b/ao/lib/dune @@ -1,13 +1,18 @@ -; name = name of the supermodule that will wrap all source files as submodules -; public_name = name of the library for ocamlfind and opam + (library (name ao) (public_name qcaml.ao) + (synopsis +"Atomic basis set" + ) (libraries - qcaml.common - qcaml.particles - qcaml.gaussian - qcaml.gaussian_integrals - qcaml.operators - ) - (synopsis "Atomic basis set.")) + qcaml.common + qcaml.particles + qcaml.gaussian + qcaml.gaussian_integrals + qcaml.operators + ) + + +) + diff --git a/ao/test/dune b/ao/test/dune index 791c26d..cec9ed7 100644 --- a/ao/test/dune +++ b/ao/test/dune @@ -1,10 +1,9 @@ + (library - (name test_ao_basis) + (name test_ao) + (synopsis "Test for ao library") (libraries alcotest - qcaml.common - qcaml.linear_algebra - qcaml.gaussian_integrals qcaml.ao ) - (synopsis "Tests for the AO basis")) +) diff --git a/common/README.org b/common/README.org index bf6559d..199c055 100644 --- a/common/README.org +++ b/common/README.org @@ -2,76 +2,90 @@ #+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: - :PROPERTIES: - :dune: lib/dune - :dune-test: test/dune - :header-args: :noweb yes - :END: - -** Headers - #+begin_src elisp :tangle (org-entry-get nil "dune" t) + +** 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 = """ +<> +""" + +with open(dune,'w') as f: + f.write(f""" (library - #+end_src + (name {name}) + (public_name qcaml.{name}) + (synopsis {synopsis} ) + <> + <> + <> +) +<> +""") - #+begin_src elisp :tangle (org-entry-get nil "dune-test" t) +with open(dunetest,'w') as f: + f.write(f""" (library - #+end_src - -** 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 - str - zarith - getopt - ) - #+end_src - - #+begin_src elisp :tangle (org-entry-get nil "dune-test" t) + (name test_{name}) + (synopsis "Test for {name} library") (libraries alcotest - qcaml.common + qcaml.{name} ) - #+end_src +) +""") + #+end_src -*** Extra C files +** Dependencies + #+name: dependencies + #+begin_src elisp +(libraries + str + zarith + getopt + ) + #+end_src - The ~util.c~ file contains small C snippets to add missing - functionalities to OCaml, such as support for the ~popcnt~ instruction. +** Modules without implementation + + #+name: noimplementation + #+begin_src elisp + #+end_src - #+begin_src elisp :tangle (org-entry-get nil "dune" t) +** Extra C files + + The ~util.c~ file contains small C snippets to add missing + functionalities to OCaml, such as support for the ~popcnt~ instruction. + + #+name: c-files + #+begin_src elisp (c_names util ) (c_flags (:standard) -Ofast -march=native -fPIC ) - #+end_src - -** Footers - - #+begin_src elisp :tangle (org-entry-get nil "dune" t) -) #+end_src - #+begin_src elisp :tangle (org-entry-get nil "dune-test" t) -) - #+end_src +** Parser - + #+name: lex-yacc + #+begin_src elisp + #+end_src diff --git a/common/lib/dune b/common/lib/dune index 3068c2d..1bdc555 100644 --- a/common/lib/dune +++ b/common/lib/dune @@ -1,20 +1,21 @@ -(library +(library (name common) (public_name qcaml.common) - (synopsis "General utilities used in all QCaml libraries.") - + (synopsis +"Utility functions used by all the other directories." + ) (libraries - str - zarith - getopt - ) - - (c_names - util - ) - (c_flags (:standard) - -Ofast -march=native -fPIC - ) - + str + zarith + getopt + ) + + (c_names + util + ) + (c_flags (:standard) + -Ofast -march=native -fPIC + ) ) + diff --git a/common/test/dune b/common/test/dune index c902c42..23e262f 100644 --- a/common/test/dune +++ b/common/test/dune @@ -1,11 +1,9 @@ -(library +(library (name test_common) (synopsis "Test for common library") - (libraries alcotest qcaml.common ) - ) diff --git a/gaussian/README.org b/gaussian/README.org new file mode 100644 index 0000000..00ccc40 --- /dev/null +++ b/gaussian/README.org @@ -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 = """ +<> +""" + +with open(dune,'w') as f: + f.write(f""" +(library + (name {name}) + (public_name qcaml.{name}) + (synopsis {synopsis} ) + <> + <> + <> +) +<> +""") + +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 + + + + diff --git a/gaussian/lib/dune b/gaussian/lib/dune index 6484a3f..84904d2 100644 --- a/gaussian/lib/dune +++ b/gaussian/lib/dune @@ -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 (name gaussian) (public_name qcaml.gaussian) + (synopsis +"Gaussian basis sets" + ) (libraries - str - qcaml.common - qcaml.particles - ) - (synopsis "Gaussian basis sets.")) + qcaml.common + qcaml.particles + ) + + +) + diff --git a/gaussian/test/dune b/gaussian/test/dune index 7002656..e8f9768 100644 --- a/gaussian/test/dune +++ b/gaussian/test/dune @@ -1,8 +1,9 @@ + (library - (name test_gaussian_basis) + (name test_gaussian) + (synopsis "Test for gaussian library") (libraries alcotest - qcaml.particles qcaml.gaussian ) - (synopsis "Tests for Gaussian basis sets")) +) diff --git a/gaussian_integrals/README.org b/gaussian_integrals/README.org new file mode 100644 index 0000000..adf3ec5 --- /dev/null +++ b/gaussian_integrals/README.org @@ -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 = """ +<> +""" + +with open(dune,'w') as f: + f.write(f""" +(library + (name {name}) + (public_name qcaml.{name}) + (synopsis {synopsis} ) + <> + <> + <> +) +<> +""") + +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 + + + + diff --git a/gaussian_integrals/lib/dune b/gaussian_integrals/lib/dune index 78dc243..3f555f7 100644 --- a/gaussian_integrals/lib/dune +++ b/gaussian_integrals/lib/dune @@ -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 (name gaussian_integrals) (public_name qcaml.gaussian_integrals) + (synopsis +"Integrals on the Gaussian basis sets" + ) (libraries - str - qcaml.common - qcaml.linear_algebra - qcaml.gaussian - qcaml.operators - ) + qcaml.common + qcaml.linear_algebra + qcaml.gaussian + qcaml.operators + ) (modules_without_implementation matrix_on_basis) - (synopsis "Integrals on the Gaussian basis sets.")) + +) + diff --git a/gaussian_integrals/test/dune b/gaussian_integrals/test/dune index ef168dd..164ebc7 100644 --- a/gaussian_integrals/test/dune +++ b/gaussian_integrals/test/dune @@ -1,8 +1,9 @@ + (library (name test_gaussian_integrals) + (synopsis "Test for gaussian_integrals library") (libraries alcotest - qcaml.particles qcaml.gaussian_integrals ) - (synopsis "Tests for integrals on the Gaussian basis sets")) +) diff --git a/linear_algebra/README.org b/linear_algebra/README.org new file mode 100644 index 0000000..3c9cd8b --- /dev/null +++ b/linear_algebra/README.org @@ -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 = """ +<> +""" + +with open(dune,'w') as f: + f.write(f""" +(library + (name {name}) + (public_name qcaml.{name}) + (synopsis {synopsis} ) + <> + <> + <> +) +<> +""") + +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 + + + + diff --git a/linear_algebra/lib/dune b/linear_algebra/lib/dune index 365a5c3..b24cb1c 100644 --- a/linear_algebra/lib/dune +++ b/linear_algebra/lib/dune @@ -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 (name linear_algebra) (public_name qcaml.linear_algebra) + (synopsis +"Linear algebra utilities of QCaml libraries." + ) (libraries - qcaml.common - lacaml - ) - (synopsis "Linear algebra utilities of QCaml libraries.")) + qcaml.common + lacaml + ) + + +) + diff --git a/linear_algebra/test/dune b/linear_algebra/test/dune index b7bf554..285d95d 100644 --- a/linear_algebra/test/dune +++ b/linear_algebra/test/dune @@ -1,7 +1,9 @@ + (library (name test_linear_algebra) + (synopsis "Test for linear_algebra library") (libraries alcotest qcaml.linear_algebra ) - (synopsis "Tests for linear algebra")) +) diff --git a/mo/README.org b/mo/README.org new file mode 100644 index 0000000..c70176b --- /dev/null +++ b/mo/README.org @@ -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 = """ +<> +""" + +with open(dune,'w') as f: + f.write(f""" +(library + (name {name}) + (public_name qcaml.{name}) + (synopsis {synopsis} ) + <> + <> + <> +) +<> +""") + +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 + + + + diff --git a/mo/lib/dune b/mo/lib/dune index f53c2bf..dcae2bb 100644 --- a/mo/lib/dune +++ b/mo/lib/dune @@ -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 (name mo) (public_name qcaml.mo) + (synopsis +"Molecular orbitals" + ) (libraries - qcaml.simulation - ) - (synopsis "Molecular orbitals.")) + qcaml.simulation + ) + + +) + diff --git a/mo/test/dune b/mo/test/dune index 16aec77..486d704 100644 --- a/mo/test/dune +++ b/mo/test/dune @@ -1,12 +1,9 @@ + (library - (name test_mo_basis) + (name test_mo) + (synopsis "Test for mo library") (libraries alcotest qcaml.mo ) - (synopsis "Tests for the MO basis")) - - - - - +) diff --git a/operators/README.org b/operators/README.org new file mode 100644 index 0000000..b7c134f --- /dev/null +++ b/operators/README.org @@ -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 = """ +<> +""" + +with open(dune,'w') as f: + f.write(f""" +(library + (name {name}) + (public_name qcaml.{name}) + (synopsis {synopsis} ) + <> + <> + <> +) +<> +""") + +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 + + + + diff --git a/operators/lib/dune b/operators/lib/dune index 4b7d2b2..441a0bd 100644 --- a/operators/lib/dune +++ b/operators/lib/dune @@ -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 (name operators) (public_name qcaml.operators) + (synopsis +"Parameteried operators, such as F12 and range-separation" + ) (libraries - str - qcaml.common - ) - (synopsis "Parameterized operators")) + qcaml.common + ) + + +) + diff --git a/operators/test/dune b/operators/test/dune new file mode 100644 index 0000000..3913d41 --- /dev/null +++ b/operators/test/dune @@ -0,0 +1,9 @@ + +(library + (name test_operators) + (synopsis "Test for operators library") + (libraries + alcotest + qcaml.operators + ) +) diff --git a/particles/README.org b/particles/README.org new file mode 100644 index 0000000..f491585 --- /dev/null +++ b/particles/README.org @@ -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 = """ +<> +""" + +with open(dune,'w') as f: + f.write(f""" +(library + (name {name}) + (public_name qcaml.{name}) + (synopsis {synopsis} ) + <> + <> + <> +) +<> +""") + +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 + + + + diff --git a/particles/lib/dune b/particles/lib/dune index 2424274..7a7c994 100644 --- a/particles/lib/dune +++ b/particles/lib/dune @@ -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 (name particles) (public_name qcaml.particles) + (synopsis +"Information relative to particles (electrons and nuclei)." + ) (libraries - str - qcaml.common - ) - (modules_without_implementation xyz_ast) - (synopsis "Defines nuclei and electrons.")) + qcaml.common + ) + (modules_without_implementation + xyz_ast + ) + +) (ocamllex - (modules nuclei_lexer) -) + (modules + nuclei_lexer + )) (ocamlyacc - (modules xyz_parser) -) + (modules + xyz_parser + )) diff --git a/particles/test/dune b/particles/test/dune index f64979f..d74d00d 100644 --- a/particles/test/dune +++ b/particles/test/dune @@ -1,7 +1,9 @@ + (library (name test_particles) + (synopsis "Test for particles library") (libraries alcotest qcaml.particles ) - (synopsis "Tests for particles")) +) diff --git a/perturbation/README.org b/perturbation/README.org new file mode 100644 index 0000000..f94b70a --- /dev/null +++ b/perturbation/README.org @@ -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 = """ +<> +""" + +with open(dune,'w') as f: + f.write(f""" +(library + (name {name}) + (public_name qcaml.{name}) + (synopsis {synopsis} ) + <> + <> + <> +) +<> +""") + +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 + + + + diff --git a/perturbation/lib/dune b/perturbation/lib/dune index c6acb7a..693ef95 100644 --- a/perturbation/lib/dune +++ b/perturbation/lib/dune @@ -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 (name perturbation) (public_name qcaml.perturbation) + (synopsis +"Perturbation theory" + ) (libraries - qcaml.simulation - qcaml.mo - ) - (synopsis "Perturbation theory.")) + qcaml.simulation + qcaml.mo + ) + + +) + diff --git a/perturbation/test/dune b/perturbation/test/dune index 78a18e1..3b4c745 100644 --- a/perturbation/test/dune +++ b/perturbation/test/dune @@ -1,13 +1,9 @@ + (library (name test_perturbation) + (synopsis "Test for perturbation library") (libraries alcotest - qcaml.mo qcaml.perturbation ) - (synopsis "Tests for the perturbation")) - - - - - +) diff --git a/qcaml/README.org b/qcaml/README.org new file mode 100644 index 0000000..f61e739 --- /dev/null +++ b/qcaml/README.org @@ -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 = """ +<> +""" + +with open(dune,'w') as f: + f.write(f""" +(library + (name {name}) + (public_name qcaml.{name}) + (synopsis {synopsis} ) + <> + <> + <> +) +<> +""") + +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 + + + + diff --git a/qcaml/lib/dune b/qcaml/lib/dune index 65b97eb..43c69b2 100644 --- a/qcaml/lib/dune +++ b/qcaml/lib/dune @@ -1,17 +1,22 @@ -; name = name of the supermodule that will wrap all source files as submodules -; public_name = name of the library for ocamlfind and opam + (library (name qcaml) - (public_name qcaml) + (public_name qcaml.qcaml) + (synopsis +"Main QCaml entry point" + ) (libraries - qcaml.ao - qcaml.common - qcaml.gaussian - qcaml.gaussian_integrals - qcaml.mo - qcaml.operators - qcaml.particles - qcaml.perturbation - qcaml.simulation - ) - (synopsis "Main QCaml entry point")) + qcaml.ao + qcaml.common + qcaml.gaussian + qcaml.gaussian_integrals + qcaml.mo + qcaml.operators + qcaml.particles + qcaml.perturbation + qcaml.simulation + ) + + +) + diff --git a/qcaml/test/dune b/qcaml/test/dune new file mode 100644 index 0000000..aa4b8cc --- /dev/null +++ b/qcaml/test/dune @@ -0,0 +1,9 @@ + +(library + (name test_qcaml) + (synopsis "Test for qcaml library") + (libraries + alcotest + qcaml.qcaml + ) +) diff --git a/simulation/README.org b/simulation/README.org new file mode 100644 index 0000000..876bc0e --- /dev/null +++ b/simulation/README.org @@ -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 = """ +<> +""" + +with open(dune,'w') as f: + f.write(f""" +(library + (name {name}) + (public_name qcaml.{name}) + (synopsis {synopsis} ) + <> + <> + <> +) +<> +""") + +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 + + + + diff --git a/simulation/lib/dune b/simulation/lib/dune index df21a3b..41e42a8 100644 --- a/simulation/lib/dune +++ b/simulation/lib/dune @@ -1,14 +1,19 @@ -; name = name of the supermodule that will wrap all source files as submodules -; public_name = name of the library for ocamlfind and opam + (library (name simulation) (public_name qcaml.simulation) + (synopsis +"Data describing a simulation (AOs, operators, nuclear coordinate,...)" + ) (libraries - qcaml.common - qcaml.particles - qcaml.gaussian - qcaml.gaussian_integrals - qcaml.operators - qcaml.ao - ) - (synopsis "Contains data describing a simulation (AOs, operators, nuclear coordinate,...)")) + qcaml.common + qcaml.particles + qcaml.gaussian + qcaml.gaussian_integrals + qcaml.operators + qcaml.ao + ) + + +) + diff --git a/simulation/test/dune b/simulation/test/dune new file mode 100644 index 0000000..f85c8a7 --- /dev/null +++ b/simulation/test/dune @@ -0,0 +1,9 @@ + +(library + (name test_simulation) + (synopsis "Test for simulation library") + (libraries + alcotest + qcaml.simulation + ) +) diff --git a/test/dune b/test/dune index ccad83c..731f509 100644 --- a/test/dune +++ b/test/dune @@ -5,10 +5,10 @@ test_common test_linear_algebra test_particles - test_gaussian_basis + test_gaussian test_gaussian_integrals - test_ao_basis - test_mo_basis + test_ao + test_mo test_perturbation )) diff --git a/test/run_tests.ml b/test/run_tests.ml index e03aeb1..37ab624 100644 --- a/test/run_tests.ml +++ b/test/run_tests.ml @@ -8,11 +8,11 @@ let test_suites: unit Alcotest.test list = [ "Linear_algebra.Vector", Test_linear_algebra.Vector.tests; "Particles.Nuclei", Test_particles.Nuclei.tests; "Particles.Electrons", Test_particles.Electrons.tests; - "Gaussian_basis.General_basis", Test_gaussian_basis.General_basis.tests; - "Ao_basis.Ao_basis_gaussian", Test_ao_basis.Ao_basis_gaussian.tests; - "Ao_basis.Ao_basis", Test_ao_basis.Ao_basis.tests; - "Mo.Guess", Test_mo_basis.Guess.tests; - "Mo.Hartree_Fock", Test_mo_basis.Hf.tests; + "Gaussian_basis.General_basis", Test_gaussian.General_basis.tests; + "Ao_basis.Ao_basis_gaussian", Test_ao.Ao_basis_gaussian.tests; + "Ao_basis.Ao_basis", Test_ao.Ao_basis.tests; + "Mo.Guess", Test_mo.Guess.tests; + "Mo.Hartree_Fock", Test_mo.Hf.tests; "Perturbation.Mp2", Test_perturbation.Mp2.tests; ]