From a03cf66eab803b7ce282c039397e6d0f3cad7399 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 3 Dec 2019 09:13:57 +0100 Subject: [PATCH] Working on nb --- MOBasis/MOBasis.ml | 6 +- MOBasis/MOBasis.mli | 2 +- Notebooks/F12_matrix.ipynb | 415 ++++++++++++++++++++++++++----------- run_fci_f12.ml | 2 +- 4 files changed, 294 insertions(+), 131 deletions(-) diff --git a/MOBasis/MOBasis.ml b/MOBasis/MOBasis.ml index 42431aa..81d3dcc 100644 --- a/MOBasis/MOBasis.ml +++ b/MOBasis/MOBasis.ml @@ -156,15 +156,15 @@ let of_mo_basis simulation other = -let pp_mo ?(start=1) ?finish ppf t = +let pp ?(start=1) ?(finish=0) ppf t = let open Lacaml.Io in let rows = Mat.dim1 t.mo_coef and cols = Mat.dim2 t.mo_coef in let finish = match finish with - | None -> cols - | Some x -> x + | 0 -> cols + | x -> x in let rec aux first = diff --git a/MOBasis/MOBasis.mli b/MOBasis/MOBasis.mli index f6e6091..24e0a6f 100644 --- a/MOBasis/MOBasis.mli +++ b/MOBasis/MOBasis.mli @@ -72,6 +72,6 @@ val of_mo_basis : Simulation.t -> t -> t (** {1 Printers} *) -val pp_mo : ?start:int -> ?finish:int -> Format.formatter -> t -> unit +val pp : ?start:int -> ?finish:int -> Format.formatter -> t -> unit diff --git a/Notebooks/F12_matrix.ipynb b/Notebooks/F12_matrix.ipynb index 94f1983..fef4455 100644 --- a/Notebooks/F12_matrix.ipynb +++ b/Notebooks/F12_matrix.ipynb @@ -17,9 +17,7 @@ { "cell_type": "code", "execution_count": 1, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -42,51 +40,51 @@ "name": "stderr", "output_type": "stream", "text": [ - "/home/scemama/qp2/external/opam/4.07.1/lib/bytes: added to search path\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/base64: added to search path\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/base64/base64.cma: loaded\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/ocaml/compiler-libs: added to search path\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/ocaml/compiler-libs/ocamlcommon.cma: loaded\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/result: added to search path\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/result/result.cma: loaded\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/ppx_deriving/runtime: added to search path\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/ppx_deriving/runtime/ppx_deriving_runtime.cma: loaded\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/ppx_deriving_yojson/runtime: added to search path\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/ppx_deriving_yojson/runtime/ppx_deriving_yojson_runtime.cma: loaded\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/ocaml/unix.cma: loaded\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/uuidm: added to search path\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/uuidm/uuidm.cma: loaded\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/easy-format: added to search path\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/easy-format/easy_format.cma: loaded\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/biniou: added to search path\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/biniou/biniou.cma: loaded\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/yojson: added to search path\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/yojson/yojson.cma: loaded\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/jupyter: added to search path\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/jupyter/jupyter.cma: loaded\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/jupyter/notebook: added to search path\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/jupyter/notebook/jupyter_notebook.cma: loaded\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/ocaml/bigarray.cma: loaded\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/lacaml: added to search path\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/lacaml/lacaml.cma: loaded\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/astring: added to search path\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/astring/astring.cma: loaded\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/cmdliner: added to search path\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/cmdliner/cmdliner.cma: loaded\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/seq: added to search path\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/stdlib-shims: added to search path\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/stdlib-shims/stdlib_shims.cma: loaded\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/fmt: added to search path\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/fmt/fmt.cma: loaded\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/fmt/fmt_cli.cma: loaded\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/fmt/fmt_tty.cma: loaded\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/alcotest: added to search path\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/alcotest/alcotest.cma: loaded\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/ocaml/str.cma: loaded\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/zarith: added to search path\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/zarith/zarith.cma: loaded\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/getopt: added to search path\n", - "/home/scemama/qp2/external/opam/4.07.1/lib/getopt/getopt.cma: loaded\n" + "/home/scemama/qp2/external/opam/default/lib/bytes: added to search path\n", + "/home/scemama/qp2/external/opam/default/lib/base64: added to search path\n", + "/home/scemama/qp2/external/opam/default/lib/base64/base64.cma: loaded\n", + "/home/scemama/qp2/external/opam/default/lib/ocaml/compiler-libs: added to search path\n", + "/home/scemama/qp2/external/opam/default/lib/ocaml/compiler-libs/ocamlcommon.cma: loaded\n", + "/home/scemama/qp2/external/opam/default/lib/result: added to search path\n", + "/home/scemama/qp2/external/opam/default/lib/result/result.cma: loaded\n", + "/home/scemama/qp2/external/opam/default/lib/ppx_deriving/runtime: added to search path\n", + "/home/scemama/qp2/external/opam/default/lib/ppx_deriving/runtime/ppx_deriving_runtime.cma: loaded\n", + "/home/scemama/qp2/external/opam/default/lib/ppx_deriving_yojson/runtime: added to search path\n", + "/home/scemama/qp2/external/opam/default/lib/ppx_deriving_yojson/runtime/ppx_deriving_yojson_runtime.cma: loaded\n", + "/home/scemama/qp2/external/opam/default/lib/ocaml/unix.cma: loaded\n", + "/home/scemama/qp2/external/opam/default/lib/uuidm: added to search path\n", + "/home/scemama/qp2/external/opam/default/lib/uuidm/uuidm.cma: loaded\n", + "/home/scemama/qp2/external/opam/default/lib/easy-format: added to search path\n", + "/home/scemama/qp2/external/opam/default/lib/easy-format/easy_format.cma: loaded\n", + "/home/scemama/qp2/external/opam/default/lib/biniou: added to search path\n", + "/home/scemama/qp2/external/opam/default/lib/biniou/biniou.cma: loaded\n", + "/home/scemama/qp2/external/opam/default/lib/yojson: added to search path\n", + "/home/scemama/qp2/external/opam/default/lib/yojson/yojson.cma: loaded\n", + "/home/scemama/qp2/external/opam/default/lib/jupyter: added to search path\n", + "/home/scemama/qp2/external/opam/default/lib/jupyter/jupyter.cma: loaded\n", + "/home/scemama/qp2/external/opam/default/lib/jupyter/notebook: added to search path\n", + "/home/scemama/qp2/external/opam/default/lib/jupyter/notebook/jupyter_notebook.cma: loaded\n", + "/home/scemama/qp2/external/opam/default/lib/ocaml/bigarray.cma: loaded\n", + "/home/scemama/qp2/external/opam/default/lib/lacaml: added to search path\n", + "/home/scemama/qp2/external/opam/default/lib/lacaml/lacaml.cma: loaded\n", + "/home/scemama/qp2/external/opam/default/lib/astring: added to search path\n", + "/home/scemama/qp2/external/opam/default/lib/astring/astring.cma: loaded\n", + "/home/scemama/qp2/external/opam/default/lib/cmdliner: added to search path\n", + "/home/scemama/qp2/external/opam/default/lib/cmdliner/cmdliner.cma: loaded\n", + "/home/scemama/qp2/external/opam/default/lib/seq: added to search path\n", + "/home/scemama/qp2/external/opam/default/lib/stdlib-shims: added to search path\n", + "/home/scemama/qp2/external/opam/default/lib/stdlib-shims/stdlib_shims.cma: loaded\n", + "/home/scemama/qp2/external/opam/default/lib/fmt: added to search path\n", + "/home/scemama/qp2/external/opam/default/lib/fmt/fmt.cma: loaded\n", + "/home/scemama/qp2/external/opam/default/lib/fmt/fmt_cli.cma: loaded\n", + "/home/scemama/qp2/external/opam/default/lib/fmt/fmt_tty.cma: loaded\n", + "/home/scemama/qp2/external/opam/default/lib/alcotest: added to search path\n", + "/home/scemama/qp2/external/opam/default/lib/alcotest/alcotest.cma: loaded\n", + "/home/scemama/qp2/external/opam/default/lib/ocaml/str.cma: loaded\n", + "/home/scemama/qp2/external/opam/default/lib/zarith: added to search path\n", + "/home/scemama/qp2/external/opam/default/lib/zarith/zarith.cma: loaded\n", + "/home/scemama/qp2/external/opam/default/lib/getopt: added to search path\n", + "/home/scemama/qp2/external/opam/default/lib/getopt/getopt.cma: loaded\n" ] } ], @@ -131,6 +129,8 @@ "#load_rec \"Simulation.cmo\";;\n", "#load_rec \"Simulation.cmo\";;\n", "#load_rec \"HartreeFock.cmo\";;\n", + "#load_rec \"MOBasis.cmo\";;\n", + "#load_rec \"F12CI.cmo\";;\n", "\n", "open Lacaml.D;;" ] @@ -146,7 +146,18 @@ "cell_type": "code", "execution_count": 3, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "val f : Format.formatter -> MOBasis.t -> unit = \n" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "#install_printer AngularMomentum.pp_string ;;\n", "#install_printer Basis.pp ;;\n", @@ -158,7 +169,9 @@ "#install_printer Util.pp_float_array;;\n", "#install_printer Util.pp_matrix;;\n", "#install_printer HartreeFock.pp ;;\n", - "#install_printer Fock.pp ;;\n" + "#install_printer Fock.pp ;;\n", + "let f ppf t = MOBasis.pp ~start:1 ~finish:0 ppf t ;;\n", + "#install_printer f;;\n" ] }, { @@ -210,6 +223,26 @@ "metadata": {}, "output_type": "execute_result" }, + { + "data": { + "text/plain": [ + "val multiplicity : int = 1\n" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "text/plain": [ + "val state : int = 1\n" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + }, { "data": { "text/plain": [ @@ -384,16 +417,6 @@ "metadata": {}, "output_type": "execute_result" }, - { - "data": { - "text/plain": [ - "val multiplicity : int = 1\n" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - }, { "data": { "text/plain": [ @@ -409,12 +432,13 @@ "let basis_filename = \"/home/scemama/qp2/data/basis/cc-pvdz\" \n", "let aux_basis_filename = \"/home/scemama/qp2/data/basis/cc-pvtz\" \n", "let nuclei = Nuclei.of_zmt_string \"be\" \n", + "let multiplicity = 1\n", + "let state = 1\n", "\n", "let basis = Basis.of_nuclei_and_basis_filenames ~nuclei [basis_filename] \n", "let aux_basis = Basis.of_nuclei_and_basis_filenames ~nuclei (basis_filename :: aux_basis_filename :: []) \n", "let f12 = F12factor.gaussian_geminal 1.0 \n", "let charge = 0 \n", - "let multiplicity = 1 \n", "\n", "\n", "let simulation =\n", @@ -428,49 +452,56 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Hartree-Fock" + "### Hartree-Fock" ] }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ + "21 significant shell pairs computed in 0.055000 seconds\n", + "1\n", + "2\n", + "3\n", + "6\n", + "9\n", + "Computed ERIs in 0.238291 seconds\n", "MOs =\n", "\n", "\n", - " -- 1 -- -- 2 -- -- 3 -- -- 4 -- -- 5 --\n", - " 1 1.0006 0.00028918 -0 -0 0\n", - " 2 0.00576322 1.00367 -7.13815E-16 -0 0\n", - " 3 -0.00181801 0.582215 4.68436E-16 -6.48338E-16 0\n", - " ... ... ... ... ...\n", - " 13 -0.00209072 -0.00172308 -0 -0 0\n", - " 14 -0 -0 -0 -0 0\n", - " 15 -0.00209072 -0.00172308 -0 -8.65517E-16 0\n", + " -- 1 -- -- 2 -- -- 3 -- -- 4 -- -- 5 --\n", + " 1 1.0006 0.00028918 0 0 0\n", + " 2 0.00576322 1.00367 0 1.02041E-15 1.08506E-15\n", + " 3 -0.00181801 0.582215 0 -8.39813E-16 -8.40021E-16\n", + " ... ... ... ... ...\n", + " 13 -0.00209072 -0.00172308 9.60612E-16 0 0\n", + " 14 0 -0 0 0 0\n", + " 15 -0.00209072 -0.00172308 -1.26705E-15 0 4.17104E-16\n", " \n", "\n", - " -- 6 -- -- 7 -- -- 8 -- -- 9 -- -- 10 --\n", - " 1 0.549926 -7.88204E-16 0 0 -5.10457E-16\n", - " 2 2.77214 -4.20928E-15 0 -8.18142E-16 -6.26457E-16\n", - " 3 -1.826 2.68321E-15 0 0 4.82834E-15\n", - " ... ... ... ... ...\n", - " 13 0.224421 0 0 0 -0.995373\n", - " 14 -0 0 0 0 -0.00304009\n", - " 15 0.224421 0 0 0 0.534433\n", + " -- 6 -- -- 7 -- -- 8 -- -- 9 -- -- 10 --\n", + " 1 0.549926 0 -2.88529E-15 -0 8.58482E-16\n", + " 2 2.77214 0 -1.582E-14 -0 3.81097E-15\n", + " 3 -1.826 0 9.32169E-15 -0 -3.39771E-15\n", + " ... ... ... ... ...\n", + " 13 0.224421 0 -1.20926E-15 -0 -0.0220572\n", + " 14 0 0 -0 -1.20416E-15 0.0718784\n", + " 15 0.224421 0 -0 -0 0.847943\n", " \n", "\n", - " -- 11 -- -- 12 -- -- 13 -- -- 14 -- -- 15 --\n", - " 1 -8.47272E-16 4.18722E-16 0 0 0.516133\n", - " 2 -7.29877E-15 3.26085E-15 -5.13582E-16 0 4.52711\n", - " 3 -1.53999E-15 0 0 0 1.08073\n", - " ... ... ... ... ...\n", - " 13 0.0741226 0.0584492 -0.01795 0.000120624 -1.45115\n", - " 14 0.00668622 0.201298 0.848372 -0.489582 0\n", - " 15 0.750441 -0.380516 0.0792247 -0.0122393 -1.45115\n", + " -- 11 -- -- 12 -- -- 13 -- -- 14 -- -- 15 --\n", + " 1 -1.28321E-15 0 0 0 0.516133\n", + " 2 -1.06861E-14 0 1.77725E-15 0 4.52711\n", + " 3 -1.84016E-15 0 1.31997E-15 0 1.08073\n", + " ... ... ... ... ...\n", + " 13 -0.964125 -0.0163169 0.262399 0.0292786 -1.45115\n", + " 14 0.0475417 0.0403496 0.0724528 0.992822 -0\n", + " 15 0.406875 0.061849 -0.328775 -0.0593936 -1.45115\n", " \n" ] }, @@ -493,23 +524,23 @@ " 6 -14.57232209 5.0392e-03 0.3675\n", " 7 -14.57235521 2.2956e-03 0.3674\n", " 8 -14.57236154 1.0293e-03 0.3673\n", - " 9 -14.57236304 4.1738e-08 0.3673\n", - " 10 -14.57236304 4.9181e-09 0.3673\n", + " 9 -14.57236304 1.3825e-08 0.3673\n", + " 10 -14.57236304 1.6054e-09 0.3673\n", " ------------------------------------------------------------\n", "\n", "\n", " ============================================================\n", - " One-electron energy -19.0610711155\n", - " Kinetic 14.5598880887\n", - " Potential -33.6209592042\n", + " One-electron energy -19.0610711219\n", + " Kinetic 14.5598880943\n", + " Potential -33.6209592162\n", " -------------------------------------------------------- \n", - " Two-electron energy 4.4887080772\n", - " Coulomb 7.1543328046\n", - " Exchange -2.6656247274\n", + " Two-electron energy 4.4887080836\n", + " Coulomb 7.1543328124\n", + " Exchange -2.6656247288\n", " -------------------------------------------------------- \n", - " HF HOMO -8.4100296422\n", - " HF LUMO 1.5842692336\n", - " HF LUMO-LUMO 9.9942988758\n", + " HF HOMO -8.4100296256\n", + " HF LUMO 1.5842692516\n", + " HF LUMO-LUMO 9.9942988772\n", " -------------------------------------------------------- \n", " Electronic energy -14.5723630383\n", " Nuclear repulsion 0.0000000000\n", @@ -519,46 +550,178 @@ "\n" ] }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "let hf = \n", - " HartreeFock.make ~guess:`Hcore simulation \n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "val ints : ERI.t = \n" - ] - }, - "execution_count": 8, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" }, { "data": { "text/plain": [ - "- : float = 0.\n" + "val mo_basis : MOBasis.t =\n", + " Eigenvalues: -4.732765 -0.309063 0.058221 0.058221 0.058221 \n", + " -- 1 -- -- 2 -- -- 3 -- -- 4 -- -- 5 --\n", + " 1 1.0006 0.00028918 0 0 0\n", + " 2 0.00576322 1.00367 0 1.02041E-15 1.08506E-15\n", + " 3 -0.00181801 0.582215 0 -8.39813E-16 -8.40021E-16\n", + " ... ... ... ... ...\n", + " 13 -0.00209072 -0.00172308 9.60612E-16 0 0\n", + " 14 0 -0 0 0 0\n", + " 15 -0.00209072 -0.00172308 -1.26705E-15 0 4.17104E-16\n", + " \n", + " Eigenvalues: 0.277480 0.350137 0.350137 0.350137 0.650740 \n", + " -- 6 -- -- 7 -- -- 8 -- -- 9 -- -- 10 --\n", + " 1 0.549926 0 -2.88529E-15 -0 8.58482E-16\n", + " 2 2.77214 0 -1.582E-14 -0 3.81097E-15\n", + " 3 -1.826 0 9.32169E-15 -0 -3.39771E-15\n", + " ... ... ... ... ...\n", + " 13 0.224421 0 -1.20926E-15 -0 -0.0220572\n", + " 14 0 0 -0 -1.20416E-15 0.0718784\n", + " 15 0.224421 0 -0 -0 0.847943\n", + " \n", + " Eigenvalues: 0.650740 0.650740 0.650740 0.650740 1.188790 \n", + " -- 11 -- -- 12 -- -- 13 -- -- 14 -- -- 15 --\n", + " 1 -1.28321E-15 0 0 0 0.516133\n", + " 2 -1.06861E-14 0 1.77725E-15 0 4.52711\n", + " 3 -1.84016E-15 0 1.31997E-15 0 1.08073\n", + " ... ... ... ... ...\n", + " 13 -0.964125 -0.0163169 0.262399 0.0292786 -1.45115\n", + " 14 0.0475417 0.0403496 0.0724528 0.992822 -0\n", + " 15 0.406875 0.061849 -0.328775 -0.0593936 -1.45115\n", + " \n", + " \n" ] }, - "execution_count": 8, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "let ints = Simulation.ao_basis simulation\n", - "|> AOBasis.ee_ints ;;\n", - "ERI.get_phys ints 1 1 1 4" + "let hf = HartreeFock.make ~guess:`Hcore simulation ;;\n", + "\n", + "let mo_basis = MOBasis.of_hartree_fock hf" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### FCI-F12" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Number of determinants : 105 105 11025\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "4-idx transformation \n", + "15 / 15\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "136 significant shell pairs computed in 2.999540 seconds\n", + "1\n", + "2\n", + "3\n", + "6\n", + "9\n", + "15\n", + "16\n", + "17\n", + "18\n", + "19\n", + "22\n", + "25\n", + "28\n", + "34\n", + "40\n", + "Computed ERIs in 110.013171 seconds\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "4-idx transformation \n", + "44 / 44\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "136 significant shell pairs computed in 0.279177 seconds\n", + "1\n", + "2\n", + "3\n", + "6\n", + "9\n", + "15\n", + "16\n", + "17\n", + "18\n", + "19\n", + "22\n", + "25\n", + "28\n", + "34\n", + "40\n", + "Computed ERIs in 8.198963 seconds\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "4-idx transformation \n", + "44 / 44\n", + "Computing HF12 integrals\n" + ] + }, + { + "ename": "error", + "evalue": "runtime_error", + "output_type": "error", + "traceback": [ + "\u001b[31mException: Invalid_argument \"index out of bounds\".\nRaised by primitive operation at unknown location\nCalled from file \"CI/CIMatrixElement.ml\", line 37, characters 47-66\nCalled from file \"list.ml\", line 117, characters 24-34\nCalled from file \"CI/CIMatrixElement.ml\", line 37, characters 8-76\nCalled from file \"list.ml\", line 88, characters 20-23\nCalled from file \"CI/CI.ml\", line 64, characters 2-54\nCalled from file \"CI/CI.ml\", line 641, characters 12-44\nCalled from file \"src/vec4_D.ml\", line 57, characters 29-32\nCalled from file \"camlinternalLazy.ml\", line 27, characters 17-27\nRe-raised at file \"camlinternalLazy.ml\", line 34, characters 10-11\nCalled from file \"CI/CI.ml\", line 687, characters 8-112\nCalled from file \"camlinternalLazy.ml\", line 27, characters 17-27\nRe-raised at file \"camlinternalLazy.ml\", line 34, characters 10-11\nCalled from unknown location\nCalled from file \"[21]\", line 2, characters 4-85\nCalled from file \"toplevel/toploop.ml\", line 180, characters 17-56\n\u001b[0m" + ] + } + ], + "source": [ + "let fcif12 =\n", + " F12CI.make ~simulation ~frozen_core:false ~mo_basis ~aux_basis_filename ~state ()\n" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "ename": "error", + "evalue": "compile_error", + "output_type": "error", + "traceback": [ + "\u001b[32mFile \"[7]\", line 1, characters 0-1:\n\u001b[31mError: Syntax error\n\u001b[36m 1: \u001b[30m\u001b[4m%\u001b[0m\u001b[30mload_ext itikz\u001b[0m\n" + ] + } + ], + "source": [ + "%load_ext itikz" ] }, { @@ -571,7 +734,7 @@ ], "metadata": { "kernelspec": { - "display_name": "OCaml 4.07.1", + "display_name": "OCaml default", "language": "OCaml", "name": "ocaml-jupyter" }, diff --git a/run_fci_f12.ml b/run_fci_f12.ml index 6d06b06..b63759e 100644 --- a/run_fci_f12.ml +++ b/run_fci_f12.ml @@ -93,7 +93,7 @@ let () = in let hf = HartreeFock.make simulation in - Format.fprintf ppf "@[%a@]@." HartreeFock.pp_hf hf; + Format.fprintf ppf "@[%a@]@." HartreeFock.pp hf; let mo_basis = MOBasis.of_hartree_fock hf