mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-11-12 17:13:39 +01:00
49 lines
1.2 KiB
OCaml
49 lines
1.2 KiB
OCaml
type t = {
|
|
charge : Charge.t;
|
|
electrons : Electrons.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;
|
|
nuclear_repulsion : float;
|
|
}
|
|
|
|
let make ?multiplicity:(multiplicity=1) ?charge:(charge=0) ~nuclei basis =
|
|
|
|
(* Tune Garbage Collector *)
|
|
let gc = Gc.get () in
|
|
Gc.set { gc with space_overhead = 1000 };
|
|
|
|
let electrons =
|
|
Electrons.make ~multiplicity ~charge nuclei
|
|
in
|
|
let charge =
|
|
Charge.(Nuclei.charge nuclei + Electrons.charge electrons)
|
|
in
|
|
let overlap =
|
|
lazy (Overlap.of_basis basis)
|
|
in
|
|
{
|
|
charge ;
|
|
basis ; nuclei ; electrons ; 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);
|
|
nuclear_repulsion = Nuclei.repulsion nuclei;
|
|
}
|
|
|
|
|
|
let of_filenames ?multiplicity:(multiplicity=1) ?charge:(charge=0) ~nuclei basis =
|
|
let nuclei =
|
|
Nuclei.of_filename nuclei
|
|
in
|
|
let basis =
|
|
Basis.of_nuclei_and_basis_filename ~nuclei ~filename:basis
|
|
in
|
|
make ~charge ~multiplicity ~nuclei basis
|
|
|