2018-02-09 00:42:26 +01:00
|
|
|
type t = {
|
2018-02-22 18:20:45 +01:00
|
|
|
charge : Charge.t;
|
|
|
|
electrons : Electrons.t ;
|
2018-02-09 00:42:26 +01:00
|
|
|
basis : Basis.t;
|
|
|
|
nuclei : Nuclei.t;
|
|
|
|
overlap : Overlap.t lazy_t;
|
2018-02-21 17:06:24 +01:00
|
|
|
overlap_ortho : Orthonormalization.t lazy_t;
|
2018-02-09 00:42:26 +01:00
|
|
|
eN_ints : NucInt.t lazy_t;
|
|
|
|
kin_ints : KinInt.t lazy_t;
|
|
|
|
ee_ints : ERI.t lazy_t;
|
2018-02-20 23:54:48 +01:00
|
|
|
nuclear_repulsion : float;
|
2018-02-09 00:42:26 +01:00
|
|
|
}
|
|
|
|
|
2018-02-22 18:20:45 +01:00
|
|
|
let make ?multiplicity:(multiplicity=1) ?charge:(charge=0) ~nuclei basis =
|
2018-02-23 00:58:54 +01:00
|
|
|
|
|
|
|
(* Tune Garbage Collector *)
|
|
|
|
let gc = Gc.get () in
|
|
|
|
Gc.set { gc with space_overhead = 1000 };
|
|
|
|
|
2018-02-22 18:20:45 +01:00
|
|
|
let electrons =
|
|
|
|
Electrons.make ~multiplicity ~charge nuclei
|
|
|
|
in
|
|
|
|
let charge =
|
2018-03-03 22:13:14 +01:00
|
|
|
Charge.(Nuclei.charge nuclei + Electrons.charge electrons)
|
2018-02-22 18:20:45 +01:00
|
|
|
in
|
2018-02-21 17:06:24 +01:00
|
|
|
let overlap =
|
|
|
|
lazy (Overlap.of_basis basis)
|
|
|
|
in
|
2018-02-09 00:42:26 +01:00
|
|
|
{
|
2018-02-22 18:20:45 +01:00
|
|
|
charge ;
|
|
|
|
basis ; nuclei ; electrons ; overlap ;
|
2018-02-21 17:06:24 +01:00
|
|
|
overlap_ortho = lazy (Orthonormalization.make (Lazy.force overlap));
|
2018-02-09 00:42:26 +01:00
|
|
|
eN_ints = lazy (NucInt.of_basis_nuclei basis nuclei);
|
|
|
|
kin_ints = lazy (KinInt.of_basis basis);
|
|
|
|
ee_ints = lazy (ERI.of_basis basis);
|
2018-02-20 23:54:48 +01:00
|
|
|
nuclear_repulsion = Nuclei.repulsion nuclei;
|
2018-02-09 00:42:26 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-03-08 23:29:08 +01:00
|
|
|
let of_filenames ?multiplicity:(multiplicity=1) ?charge:(charge=0) ~nuclei basis_filename =
|
2018-02-09 00:42:26 +01:00
|
|
|
let nuclei =
|
2018-03-03 22:13:14 +01:00
|
|
|
Nuclei.of_filename nuclei
|
2018-02-09 00:42:26 +01:00
|
|
|
in
|
|
|
|
let basis =
|
2018-03-08 23:29:08 +01:00
|
|
|
Basis.of_nuclei_and_basis_filename ~nuclei basis_filename
|
2018-02-09 00:42:26 +01:00
|
|
|
in
|
2018-02-22 18:20:45 +01:00
|
|
|
make ~charge ~multiplicity ~nuclei basis
|
2018-02-09 00:42:26 +01:00
|
|
|
|