diff --git a/.merlin b/.merlin index f14429d..6b6690c 100644 --- a/.merlin +++ b/.merlin @@ -1,5 +1,7 @@ -EXCLUDE_QUERY_DIR +B _build/ B _build/** S . S ./** FLG -w @a-4-29-40-41-42-44-45-48-58-59-60-40 -strict-sequence -strict-formats -short-paths -keep-locs +PKG str unix bigarray lacaml alcotest zarith getopt + diff --git a/Basis/.merlin b/Basis/.merlin new file mode 100644 index 0000000..2ba6169 --- /dev/null +++ b/Basis/.merlin @@ -0,0 +1 @@ +REC diff --git a/Basis/AOBasis.ml b/Basis/AOBasis.ml index 4cfd51f..819de2c 100644 --- a/Basis/AOBasis.ml +++ b/Basis/AOBasis.ml @@ -28,58 +28,66 @@ let f12_ints t = Lazy.force t.f12_ints let f12_over_r12_ints t = Lazy.force t.f12_over_r12_ints let cartesian t = t.cartesian -module Am = AngularMomentum module Cs = ContractedShell let values t point = - let result = Vec.create (Basis.size t.basis) in - Array.iter (fun shell -> - Cs.values shell point - |> Array.iteri + let result = Vec.create (Basis.size t.basis) in + Array.iter (fun shell -> + Cs.values shell point + |> Array.iteri (fun i_c value -> - let i = Cs.index shell + i_c + 1 in - result.{i} <- value) - ) (Basis.contracted_shells t.basis); - result - + let i = Cs.index shell + i_c + 1 in + result.{i} <- value) + ) (Basis.contracted_shells t.basis); + result + let make ~cartesian ~basis ?f12 nuclei = + + let overlap = + lazy ( + Overlap.of_basis basis + ) in + + let ortho = + lazy ( + Orthonormalization.make ~cartesian ~basis (Lazy.force overlap) + ) in - let overlap = lazy ( - Overlap.of_basis basis - ) in + let eN_ints = + lazy ( + NucInt.of_basis_nuclei ~basis nuclei + ) in - let ortho = lazy ( - Orthonormalization.make ~cartesian ~basis (Lazy.force overlap) - ) in + let kin_ints = + lazy ( + KinInt.of_basis basis + ) in - let eN_ints = lazy ( - NucInt.of_basis_nuclei ~basis nuclei - ) in + let ee_ints = + lazy ( + ERI.of_basis basis + ) in - let kin_ints = lazy ( - KinInt.of_basis basis - ) in + let ee_lr_ints = + lazy ( + ERI_lr.of_basis basis + ) in - let ee_ints = lazy ( - ERI.of_basis basis - ) in + let f12_ints = + lazy ( + F12.of_basis basis + ) in - let ee_lr_ints = lazy ( - ERI_lr.of_basis basis - ) in + let f12_over_r12_ints = + lazy ( + ScreenedERI.of_basis basis + ) in - let f12_ints = lazy ( - F12.of_basis basis - ) in - - let f12_over_r12_ints = lazy ( - ScreenedERI.of_basis basis - ) in - - let multipole = lazy ( - Multipole.of_basis basis - ) in + let multipole = + lazy ( + Multipole.of_basis basis + ) in { basis ; overlap ; multipole ; ortho ; eN_ints ; kin_ints ; ee_ints ; ee_lr_ints ; f12_ints ; f12_over_r12_ints ; cartesian ; @@ -100,7 +108,7 @@ let test_case name t = ) in - let check_eri title a r = + let check_eri a r = let f { ERI.i_r1 ; j_r2 ; k_r1 ; l_r2 ; value } = (i_r1, (j_r2, (k_r1, (l_r2, value)))) in @@ -109,7 +117,7 @@ let test_case name t = Alcotest.(check (list (pair int (pair int (pair int (pair int (float 1.e-10))))))) "ERI" a r in - let check_eri_lr title a r = + let check_eri_lr a r = let f { ERI_lr.i_r1 ; j_r2 ; k_r1 ; l_r2 ; value } = (i_r1, (j_r2, (k_r1, (l_r2, value)))) in @@ -155,7 +163,7 @@ let test_case name t = let ee_ints = Lazy.force t.ee_ints in - check_eri "ee_ints" ee_ints reference + check_eri ee_ints reference ; in @@ -167,7 +175,7 @@ let test_case name t = let ee_lr_ints = Lazy.force t.ee_lr_ints in - check_eri_lr "ee_lr_ints" ee_lr_ints reference + check_eri_lr ee_lr_ints reference in [ @@ -177,7 +185,3 @@ let test_case name t = "ee_ints", `Quick, test_ee_ints; "ee_lr_ints", `Quick, test_ee_lr_ints; ] - - - - diff --git a/Basis/ERI_lr.ml b/Basis/ERI_lr.ml index 48a2fd1..a67c7f0 100644 --- a/Basis/ERI_lr.ml +++ b/Basis/ERI_lr.ml @@ -18,7 +18,7 @@ module T = struct let mu_erf = match z.mu_erf with | Some x -> x - | None -> 0.5 (*TODO invalid_arg "mu_erf is None"*) + | None -> 0.5 (* TODO invalid_arg "mu_erf is None" *) in let m = mu_erf *. mu_erf in let expo_pq_inv = z.expo_p_inv +. z.expo_q_inv in diff --git a/CI/.merlin b/CI/.merlin new file mode 100644 index 0000000..2ba6169 --- /dev/null +++ b/CI/.merlin @@ -0,0 +1 @@ +REC diff --git a/MOBasis/.merlin b/MOBasis/.merlin new file mode 100644 index 0000000..2ba6169 --- /dev/null +++ b/MOBasis/.merlin @@ -0,0 +1 @@ +REC diff --git a/Nuclei/.merlin b/Nuclei/.merlin new file mode 100644 index 0000000..2ba6169 --- /dev/null +++ b/Nuclei/.merlin @@ -0,0 +1 @@ +REC diff --git a/Perturbation/.merlin b/Perturbation/.merlin new file mode 100644 index 0000000..2ba6169 --- /dev/null +++ b/Perturbation/.merlin @@ -0,0 +1 @@ +REC diff --git a/Utils/FourIdxStorage.mli b/Utils/FourIdxStorage.mli index aa60e49..f2ef7b5 100644 --- a/Utils/FourIdxStorage.mli +++ b/Utils/FourIdxStorage.mli @@ -26,6 +26,7 @@ val create : size:int -> ?temp_dir:string -> [< `Dense | `Sparse ] -> t *) (** {2 Accessors} *) + val get_chem : t -> int -> int -> int -> int -> float (** Get an integral using the Chemist's convention {% $(ij|kl)$ %}. *)