10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-06-02 11:25:19 +02:00
QCaml/Notebooks/F12_matrix.ipynb

754 lines
30 KiB
Plaintext
Raw Normal View History

2019-11-30 10:41:07 +01:00
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Test of F12 matrix elements"
]
},
{
2019-12-02 14:58:48 +01:00
"cell_type": "markdown",
2019-11-30 10:41:07 +01:00
"metadata": {},
2019-12-02 14:58:48 +01:00
"source": [
"## Initialization"
]
},
{
"cell_type": "code",
"execution_count": 1,
2019-12-03 09:13:57 +01:00
"metadata": {},
2019-11-30 10:41:07 +01:00
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"- : unit = ()\n",
"Findlib has been successfully loaded. Additional directives:\n",
" #require \"package\";; to load a package\n",
" #list;; to list the available packages\n",
" #camlp4o;; to load camlp4 (standard syntax)\n",
" #camlp4r;; to load camlp4 (revised syntax)\n",
" #predicates \"p,q,...\";; to set these predicates\n",
" Topfind.reset();; to force that packages will be reloaded\n",
" #thread;; to enable threads\n",
"\n",
"- : unit = ()\n"
]
2019-12-02 14:58:48 +01:00
},
{
"name": "stderr",
"output_type": "stream",
"text": [
2019-12-03 09:13:57 +01:00
"/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"
2019-12-02 14:58:48 +01:00
]
2019-11-30 10:41:07 +01:00
}
],
"source": [
"#cd \"/home/scemama/QCaml\";;\n",
"#use \"topfind\";;\n",
"#require \"jupyter.notebook\";;\n",
"\n",
"#require \"lacaml\";;\n",
"#require \"alcotest\";;\n",
2019-12-02 14:58:48 +01:00
"#require \"str\";;\n",
"#require \"bigarray\";;\n",
2019-11-30 10:41:07 +01:00
"#require \"zarith\";;\n",
"#require \"getopt\";;\n",
"#directory \"_build\";;\n",
"#directory \"_build/Basis\";;\n",
"#directory \"_build/CI\";;\n",
"#directory \"_build/MOBasis\";;\n",
"#directory \"_build/Nuclei\";;\n",
"#directory \"_build/Parallel\";;\n",
"#directory \"_build/Perturbation\";;\n",
"#directory \"_build/SCF\";;\n",
2019-12-02 14:58:48 +01:00
"#directory \"_build/Utils\";;"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Modules to load"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
2019-11-30 10:41:07 +01:00
"#load \"Constants.cmo\";;\n",
"#load_rec \"Util.cma\";;\n",
"#load_rec \"Matrix.cmo\";;\n",
"#load_rec \"Simulation.cmo\";;\n",
2019-12-02 14:58:48 +01:00
"#load_rec \"Simulation.cmo\";;\n",
"#load_rec \"HartreeFock.cmo\";;\n",
2019-12-03 09:13:57 +01:00
"#load_rec \"MOBasis.cmo\";;\n",
"#load_rec \"F12CI.cmo\";;\n",
2019-12-02 14:58:48 +01:00
"\n",
"open Lacaml.D;;"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Printers"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
2019-12-03 09:13:57 +01:00
"outputs": [
{
"data": {
"text/plain": [
"val f : Format.formatter -> MOBasis.t -> unit = <fun>\n"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
2019-12-02 14:58:48 +01:00
"source": [
"#install_printer AngularMomentum.pp_string ;;\n",
"#install_printer Basis.pp ;;\n",
"#install_printer Charge.pp ;;\n",
"#install_printer Coordinate.pp ;;\n",
"#install_printer Vector.pp;;\n",
"#install_printer Matrix.pp;;\n",
"#install_printer Util.pp_float_2darray;;\n",
"#install_printer Util.pp_float_array;;\n",
"#install_printer Util.pp_matrix;;\n",
"#install_printer HartreeFock.pp ;;\n",
2019-12-03 09:13:57 +01:00
"#install_printer Fock.pp ;;\n",
"let f ppf t = MOBasis.pp ~start:1 ~finish:0 ppf t ;;\n",
"#install_printer f;;\n"
2019-11-30 10:41:07 +01:00
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
2019-12-02 14:58:48 +01:00
"## Run"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Simulation\n"
2019-11-30 10:41:07 +01:00
]
},
{
"cell_type": "code",
2019-12-02 14:58:48 +01:00
"execution_count": 4,
2019-11-30 10:41:07 +01:00
"metadata": {},
"outputs": [
{
2019-12-02 14:58:48 +01:00
"data": {
"text/plain": [
"val basis_filename : string = \"/home/scemama/qp2/data/basis/cc-pvdz\"\n"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": [
"val aux_basis_filename : string = \"/home/scemama/qp2/data/basis/cc-pvtz\"\n"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": [
"val nuclei : Nuclei.t = [|(Element.Be, 0.0000 0.0000 0.0000)|]\n"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
},
2019-12-03 09:13:57 +01:00
{
"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"
},
2019-12-02 14:58:48 +01:00
{
"data": {
"text/plain": [
"val basis : Basis.t =\n",
" \n",
" Atomic Basis set\n",
" ----------------\n",
"\n",
"-----------------------------------------------------------------------\n",
" # Angular Coordinates (Bohr) Exponents Coefficients\n",
" Momentum X Y Z\n",
"-----------------------------------------------------------------------\n",
" 1-3 S 0.0000 0.0000 0.0000 2.94000000e+03 6.80000000e-04\n",
" 4.41200000e+02 5.23600000e-03\n",
" 1.00500000e+02 2.66060000e-02\n",
" 2.84300000e+01 9.99930000e-02\n",
" 9.16900000e+00 2.69702000e-01\n",
" 3.19600000e+00 4.51469000e-01\n",
" 1.15900000e+00 2.95074000e-01\n",
" 1.81100000e-01 1.25870000e-02\n",
" \n",
" 2.94000000e+03 -1.23000000e-04\n",
" 4.41200000e+02 -9.66000000e-04\n",
" 1.00500000e+02 -4.83100000e-03\n",
" 2.84300000e+01 -1.93140000e-02\n",
" 9.16900000e+00 -5.32800000e-02\n",
" 3.19600000e+00 -1.20723000e-01\n",
" 1.15900000e+00 -1.33435000e-01\n",
" 1.81100000e-01 5.30767000e-01\n",
" \n",
" 5.89000000e-02 1.00000000e+00\n",
" \n",
" \n",
"-----------------------------------------------------------------------\n",
" 4-9 P 0.0000 0.0000 0.0000 3.61900000e+00 2.91110000e-02\n",
" 7.11000000e-01 1.69365000e-01\n",
" 1.95100000e-01 5.13458000e-01\n",
" \n",
" 6.01800000e-02 1.00000000e+00\n",
" \n",
" \n",
"-----------------------------------------------------------------------\n",
" 10-15 D 0.0000 0.0000 0.0000 2.38000000e-01 1.00000000e+00\n",
" \n",
" \n",
"-----------------------------------------------------------------------\n",
"\n"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": [
"val aux_basis : Basis.t =\n",
" \n",
" Atomic Basis set\n",
" ----------------\n",
"\n",
"-----------------------------------------------------------------------\n",
" # Angular Coordinates (Bohr) Exponents Coefficients\n",
" Momentum X Y Z\n",
"-----------------------------------------------------------------------\n",
" 1-7 S 0.0000 0.0000 0.0000 2.94000000e+03 6.80000000e-04\n",
" 4.41200000e+02 5.23600000e-03\n",
" 1.00500000e+02 2.66060000e-02\n",
" 2.84300000e+01 9.99930000e-02\n",
" 9.16900000e+00 2.69702000e-01\n",
" 3.19600000e+00 4.51469000e-01\n",
" 1.15900000e+00 2.95074000e-01\n",
" 1.81100000e-01 1.25870000e-02\n",
" \n",
" 2.94000000e+03 -1.23000000e-04\n",
" 4.41200000e+02 -9.66000000e-04\n",
" 1.00500000e+02 -4.83100000e-03\n",
" 2.84300000e+01 -1.93140000e-02\n",
" 9.16900000e+00 -5.32800000e-02\n",
" 3.19600000e+00 -1.20723000e-01\n",
" 1.15900000e+00 -1.33435000e-01\n",
" 1.81100000e-01 5.30767000e-01\n",
" \n",
" 5.89000000e-02 1.00000000e+00\n",
" \n",
" 6.86300000e+03 2.36000000e-04\n",
" 1.03000000e+03 1.82600000e-03\n",
" 2.34700000e+02 9.45200000e-03\n",
" 6.65600000e+01 3.79570000e-02\n",
" 2.16900000e+01 1.19965000e-01\n",
" 7.73400000e+00 2.82162000e-01\n",
" 2.91600000e+00 4.27404000e-01\n",
" 1.13000000e+00 2.66278000e-01\n",
" 1.10100000e-01 -7.27500000e-03\n",
" \n",
" 6.86300000e+03 -4.30000000e-05\n",
" 1.03000000e+03 -3.33000000e-04\n",
" 2.34700000e+02 -1.73600000e-03\n",
" 6.65600000e+01 -7.01200000e-03\n",
" 2.16900000e+01 -2.31260000e-02\n",
" 7.73400000e+00 -5.81380000e-02\n",
" 2.91600000e+00 -1.14556000e-01\n",
" 1.13000000e+00 -1.35908000e-01\n",
" 1.10100000e-01 5.77441000e-01\n",
" \n",
" 2.57700000e-01 1.00000000e+00\n",
" \n",
" 4.40900000e-02 1.00000000e+00\n",
" \n",
" \n",
"-----------------------------------------------------------------------\n",
" 4-18 P 0.0000 0.0000 0.0000 3.61900000e+00 2.91110000e-02\n",
" 7.11000000e-01 1.69365000e-01\n",
" 1.95100000e-01 5.13458000e-01\n",
" \n",
" 6.01800000e-02 1.00000000e+00\n",
" \n",
" 7.43600000e+00 1.07360000e-02\n",
" 1.57700000e+00 6.28540000e-02\n",
" 4.35200000e-01 2.48180000e-01\n",
" \n",
" 1.43800000e-01 1.00000000e+00\n",
" \n",
" 4.99400000e-02 1.00000000e+00\n",
" \n",
" \n",
"-----------------------------------------------------------------------\n",
" 10-27 D 0.0000 0.0000 0.0000 2.38000000e-01 1.00000000e+00\n",
" \n",
" 3.48000000e-01 1.00000000e+00\n",
" \n",
" 1.80300000e-01 1.00000000e+00\n",
" \n",
" \n",
"-----------------------------------------------------------------------\n",
" 41-50 F 0.0000 0.0000 0.0000 3.25000000e-01 1.00000000e+00\n",
" \n",
" \n",
"-----------------------------------------------------------------------\n",
"\n"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": [
"val f12 : F12factor.t =\n",
" {F12factor.expo_s = 1.;\n",
" gaussian =\n",
" {GaussianOperator.coef_g =\n",
" [ -0.314400 -0.303700 -0.168100 -0.098110 -0.060240 -0.037260 ];\n",
" expo_sg =\n",
" [ 0.220900 1.004000 3.622000 12.160000 45.870000 254.400000 ];\n",
" expo_sg_inv =\n",
" [ 4.526935 0.996016 0.276091 0.082237 0.021801 0.003931 ]}}\n"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": [
"val charge : int = 0\n"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
2019-11-30 10:41:07 +01:00
},
2019-12-02 14:58:48 +01:00
{
"data": {
"text/plain": [
"val simulation : Simulation.t = <abstr>\n"
]
},
"execution_count": 4,
2019-11-30 10:41:07 +01:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
2019-12-02 14:58:48 +01:00
"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",
2019-12-03 09:13:57 +01:00
"let multiplicity = 1\n",
"let state = 1\n",
2019-11-30 10:41:07 +01:00
"\n",
2019-12-02 14:58:48 +01:00
"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",
2019-11-30 10:41:07 +01:00
"\n",
"\n",
"let simulation =\n",
2019-12-02 14:58:48 +01:00
" Simulation.make \n",
" ~f12 ~charge ~multiplicity ~nuclei\n",
" ~cartesian:true\n",
" basis\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
2019-12-03 09:13:57 +01:00
"### Hartree-Fock"
2019-11-30 10:41:07 +01:00
]
},
{
"cell_type": "code",
2019-12-03 09:13:57 +01:00
"execution_count": 5,
2019-11-30 10:41:07 +01:00
"metadata": {},
"outputs": [
{
2019-12-02 14:58:48 +01:00
"name": "stdout",
"output_type": "stream",
"text": [
2019-12-03 09:13:57 +01:00
"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",
2019-12-02 14:58:48 +01:00
"MOs =\n",
"\n",
"\n",
2019-12-03 09:13:57 +01:00
" -- 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",
2019-12-02 14:58:48 +01:00
" \n",
"\n",
2019-12-03 09:13:57 +01:00
" -- 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",
2019-12-02 14:58:48 +01:00
" \n",
"\n",
2019-12-03 09:13:57 +01:00
" -- 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",
2019-12-02 14:58:48 +01:00
" \n"
2019-11-30 10:41:07 +01:00
]
2019-12-02 14:58:48 +01:00
},
{
"data": {
"text/plain": [
"val hf : HartreeFock.t = \n",
"======================================================================\n",
" Restricted Hartree-Fock \n",
"======================================================================\n",
"\n",
" ------------------------------------------------------------\n",
" # HF energy Convergence HOMO-LUMO\n",
" ------------------------------------------------------------\n",
" 1 -14.05142130 8.0958e-01 0.2991\n",
" 2 -14.51982122 2.7933e-01 0.3600\n",
" 3 -14.56519147 8.3990e-02 0.3674\n",
" 4 -14.57117146 2.6217e-02 0.3679\n",
" 5 -14.57214606 1.0744e-02 0.3676\n",
" 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",
2019-12-03 09:13:57 +01:00
" 9 -14.57236304 1.3825e-08 0.3673\n",
" 10 -14.57236304 1.6054e-09 0.3673\n",
2019-12-02 14:58:48 +01:00
" ------------------------------------------------------------\n",
"\n",
"\n",
" ============================================================\n",
2019-12-03 09:13:57 +01:00
" One-electron energy -19.0610711219\n",
" Kinetic 14.5598880943\n",
" Potential -33.6209592162\n",
2019-12-02 14:58:48 +01:00
" -------------------------------------------------------- \n",
2019-12-03 09:13:57 +01:00
" Two-electron energy 4.4887080836\n",
" Coulomb 7.1543328124\n",
" Exchange -2.6656247288\n",
2019-12-02 14:58:48 +01:00
" -------------------------------------------------------- \n",
2019-12-03 09:13:57 +01:00
" HF HOMO -8.4100296256\n",
" HF LUMO 1.5842692516\n",
" HF LUMO-LUMO 9.9942988772\n",
2019-12-02 14:58:48 +01:00
" -------------------------------------------------------- \n",
" Electronic energy -14.5723630383\n",
" Nuclear repulsion 0.0000000000\n",
" Hartree-Fock energy -14.5723630383\n",
" ============================================================\n",
" \n",
"\n"
]
},
2019-12-03 09:13:57 +01:00
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": [
"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": 5,
2019-12-02 14:58:48 +01:00
"metadata": {},
"output_type": "execute_result"
2019-11-30 10:41:07 +01:00
}
],
2019-12-02 14:58:48 +01:00
"source": [
2019-12-03 09:13:57 +01:00
"let hf = HartreeFock.make ~guess:`Hcore simulation ;;\n",
"\n",
"let mo_basis = MOBasis.of_hartree_fock hf"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### FCI-F12"
2019-12-02 14:58:48 +01:00
]
2019-11-30 10:41:07 +01:00
},
{
"cell_type": "code",
2019-12-03 09:13:57 +01:00
"execution_count": 21,
2019-11-30 10:41:07 +01:00
"metadata": {},
2019-12-02 14:58:48 +01:00
"outputs": [
{
2019-12-03 09:13:57 +01:00
"name": "stdout",
"output_type": "stream",
"text": [
"Number of determinants : 105 105 11025\n"
]
2019-12-02 14:58:48 +01:00
},
{
2019-12-03 09:13:57 +01:00
"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"
]
2019-12-02 14:58:48 +01:00
}
],
2019-11-30 10:41:07 +01:00
"source": [
2019-12-03 09:13:57 +01:00
"%load_ext itikz"
2019-11-30 10:41:07 +01:00
]
2019-12-02 14:58:48 +01:00
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
2019-11-30 10:41:07 +01:00
}
],
"metadata": {
"kernelspec": {
2019-12-03 09:13:57 +01:00
"display_name": "OCaml default",
2019-11-30 10:41:07 +01:00
"language": "OCaml",
"name": "ocaml-jupyter"
},
"language_info": {
"codemirror_mode": "text/x-ocaml",
"file_extension": ".ml",
"mimetype": "text/x-ocaml",
"name": "OCaml",
"nbconverter_exporter": null,
"pygments_lexer": "OCaml",
"version": "4.07.1"
}
},
"nbformat": 4,
"nbformat_minor": 2
}