mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-12-22 04:13:33 +01:00
Working on HF
This commit is contained in:
parent
0455da3b46
commit
5fd94119f6
@ -143,7 +143,8 @@ let of_basis basis =
|
||||
try Zmap.find cls key
|
||||
with Not_found -> failwith "Bug in kinetic integrals"
|
||||
in
|
||||
result.{i_c,j_c} <- value
|
||||
result.{i_c,j_c} <- value;
|
||||
result.{j_c,i_c} <- value;
|
||||
) (Contracted_shell.powers shell.(i));
|
||||
) (Contracted_shell.powers shell.(j))
|
||||
done;
|
||||
|
@ -83,6 +83,7 @@ let of_basis_nuclei basis nuclei =
|
||||
Zmap.find cls key
|
||||
in
|
||||
eni_array.{j_c,i_c} <- value;
|
||||
eni_array.{i_c,j_c} <- value;
|
||||
) (Contracted_shell.powers shell.(j))
|
||||
) (Contracted_shell.powers shell.(i));
|
||||
done;
|
||||
|
@ -116,7 +116,8 @@ let of_basis basis =
|
||||
try Zmap.find cls key
|
||||
with Not_found -> failwith "Bug in overlap integrals"
|
||||
in
|
||||
result.{i_c,j_c} <- value
|
||||
result.{i_c,j_c} <- value;
|
||||
result.{j_c,i_c} <- value;
|
||||
) (Contracted_shell.powers shell.(i));
|
||||
) (Contracted_shell.powers shell.(j))
|
||||
done;
|
||||
@ -143,3 +144,6 @@ let to_file ~filename overlap =
|
||||
done;
|
||||
close_out oc
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -2,6 +2,7 @@ type t = {
|
||||
basis : Basis.t;
|
||||
nuclei : Nuclei.t;
|
||||
overlap : Overlap.t lazy_t;
|
||||
overlap_ortho : Orthonormalization.t lazy_t;
|
||||
eN_ints : NucInt.t lazy_t;
|
||||
kin_ints : KinInt.t lazy_t;
|
||||
ee_ints : ERI.t lazy_t;
|
||||
@ -9,9 +10,12 @@ type t = {
|
||||
}
|
||||
|
||||
let make ~nuclei ~basis =
|
||||
let overlap =
|
||||
lazy (Overlap.of_basis basis)
|
||||
in
|
||||
{
|
||||
basis ; nuclei ;
|
||||
overlap = lazy (Overlap.of_basis basis);
|
||||
basis ; nuclei ; overlap ;
|
||||
overlap_ortho = lazy (Orthonormalization.make (Lazy.force overlap));
|
||||
eN_ints = lazy (NucInt.of_basis_nuclei basis nuclei);
|
||||
kin_ints = lazy (KinInt.of_basis basis);
|
||||
ee_ints = lazy (ERI.of_basis basis);
|
||||
|
@ -3,6 +3,7 @@ external erf_float : float -> float = "erf_float_bytecode" "erf_float" [@@unboxe
|
||||
external erfc_float : float -> float = "erfc_float_bytecode" "erfc_float" [@@unboxed] [@@noalloc]
|
||||
external gamma_float : float -> float = "gamma_float_bytecode" "gamma_float" [@@unboxed] [@@noalloc]
|
||||
|
||||
open Lacaml.D
|
||||
open Constants
|
||||
|
||||
let factmax = 150
|
||||
@ -152,3 +153,11 @@ let array_sum a =
|
||||
let array_product a =
|
||||
Array.fold_left ( *. ) 0. a
|
||||
|
||||
|
||||
let diagonalize_symm h =
|
||||
let v = lacpy h in
|
||||
let w = Vec.create (Mat.dim1 h) in
|
||||
let result =
|
||||
syevd ~vectors:true ~w v
|
||||
in
|
||||
v, result
|
||||
|
Loading…
Reference in New Issue
Block a user