2018-02-09 00:42:26 +01:00
|
|
|
type t = {
|
2018-06-13 17:49:58 +02:00
|
|
|
charge : Charge.t;
|
|
|
|
electrons : Electrons.t ;
|
|
|
|
nuclei : Nuclei.t;
|
|
|
|
basis : Basis.t;
|
|
|
|
ao_basis : AOBasis.t;
|
2019-10-24 11:25:49 +02:00
|
|
|
f12 : F12factor.t option;
|
2018-02-20 23:54:48 +01:00
|
|
|
nuclear_repulsion : float;
|
2018-02-09 00:42:26 +01:00
|
|
|
}
|
|
|
|
|
2019-02-20 18:15:15 +01:00
|
|
|
let nuclei t = t.nuclei
|
|
|
|
let charge t = t.charge
|
|
|
|
let electrons t = t.electrons
|
|
|
|
let basis t = t.basis
|
|
|
|
let ao_basis t = t.ao_basis
|
|
|
|
let nuclear_repulsion t = t.nuclear_repulsion
|
2019-03-26 10:38:50 +01:00
|
|
|
let f12 t = t.f12
|
2019-02-20 18:15:15 +01:00
|
|
|
|
2018-05-31 16:46:45 +02:00
|
|
|
let make ?cartesian:(cartesian=false)
|
2018-05-28 19:58:40 +02:00
|
|
|
?multiplicity:(multiplicity=1)
|
|
|
|
?charge:(charge=0)
|
2019-03-26 10:38:50 +01:00
|
|
|
?f12
|
2018-05-28 19:58:40 +02:00
|
|
|
~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
|
2018-06-13 17:49:58 +02:00
|
|
|
|
2018-02-22 18:20:45 +01:00
|
|
|
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-06-13 17:49:58 +02:00
|
|
|
|
|
|
|
let ao_basis =
|
2019-03-26 10:38:50 +01:00
|
|
|
AOBasis.make ?f12 ~basis ~cartesian nuclei
|
2018-02-21 17:06:24 +01:00
|
|
|
in
|
2018-06-13 17:49:58 +02:00
|
|
|
|
|
|
|
let nuclear_repulsion =
|
|
|
|
Nuclei.repulsion nuclei
|
|
|
|
in
|
|
|
|
|
2018-02-09 00:42:26 +01:00
|
|
|
{
|
2019-03-26 10:38:50 +01:00
|
|
|
charge ; basis ; nuclei ; electrons ; ao_basis ; f12 ;
|
2018-06-13 17:49:58 +02:00
|
|
|
nuclear_repulsion ;
|
2018-02-09 00:42:26 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-03-26 10:38:50 +01:00
|
|
|
let of_filenames ?(cartesian=false) ?(multiplicity=1) ?(charge=0) ?f12 ~nuclei ?(aux_basis_filenames=[]) 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 =
|
2019-03-20 19:18:36 +01:00
|
|
|
Basis.of_nuclei_and_basis_filenames ~nuclei (basis_filename :: aux_basis_filenames)
|
2018-02-09 00:42:26 +01:00
|
|
|
in
|
2019-03-26 10:38:50 +01:00
|
|
|
lazy (make ?f12 ~cartesian ~charge ~multiplicity ~nuclei basis)
|
2018-10-23 13:39:06 +02:00
|
|
|
|> Parallel.broadcast
|
2018-02-09 00:42:26 +01:00
|
|
|
|