mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-12-21 20:03:32 +01:00
Merlin
This commit is contained in:
parent
0094b36c86
commit
520e4fc1c4
4
.merlin
4
.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
|
||||
|
||||
|
1
Basis/.merlin
Normal file
1
Basis/.merlin
Normal file
@ -0,0 +1 @@
|
||||
REC
|
@ -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 overlap =
|
||||
lazy (
|
||||
Overlap.of_basis basis
|
||||
) in
|
||||
|
||||
let ortho = lazy (
|
||||
Orthonormalization.make ~cartesian ~basis (Lazy.force overlap)
|
||||
) in
|
||||
let ortho =
|
||||
lazy (
|
||||
Orthonormalization.make ~cartesian ~basis (Lazy.force overlap)
|
||||
) in
|
||||
|
||||
let eN_ints = lazy (
|
||||
NucInt.of_basis_nuclei ~basis nuclei
|
||||
) in
|
||||
let eN_ints =
|
||||
lazy (
|
||||
NucInt.of_basis_nuclei ~basis nuclei
|
||||
) in
|
||||
|
||||
let kin_ints = lazy (
|
||||
KinInt.of_basis basis
|
||||
) in
|
||||
let kin_ints =
|
||||
lazy (
|
||||
KinInt.of_basis basis
|
||||
) in
|
||||
|
||||
let ee_ints = lazy (
|
||||
ERI.of_basis basis
|
||||
) in
|
||||
let ee_ints =
|
||||
lazy (
|
||||
ERI.of_basis basis
|
||||
) in
|
||||
|
||||
let ee_lr_ints = lazy (
|
||||
ERI_lr.of_basis basis
|
||||
) in
|
||||
let ee_lr_ints =
|
||||
lazy (
|
||||
ERI_lr.of_basis basis
|
||||
) in
|
||||
|
||||
let f12_ints = lazy (
|
||||
F12.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 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;
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
1
CI/.merlin
Normal file
1
CI/.merlin
Normal file
@ -0,0 +1 @@
|
||||
REC
|
1
MOBasis/.merlin
Normal file
1
MOBasis/.merlin
Normal file
@ -0,0 +1 @@
|
||||
REC
|
1
Nuclei/.merlin
Normal file
1
Nuclei/.merlin
Normal file
@ -0,0 +1 @@
|
||||
REC
|
1
Perturbation/.merlin
Normal file
1
Perturbation/.merlin
Normal file
@ -0,0 +1 @@
|
||||
REC
|
@ -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)$ %}. *)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user