mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-11-07 06:33:39 +01:00
53 lines
1.1 KiB
OCaml
53 lines
1.1 KiB
OCaml
type t = {
|
|
charge : Charge.t;
|
|
electrons : Electrons.t ;
|
|
nuclei : Nuclei.t;
|
|
basis : Basis.t;
|
|
ao_basis : AOBasis.t;
|
|
nuclear_repulsion : float;
|
|
}
|
|
|
|
let make ?cartesian:(cartesian=false)
|
|
?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 ao_basis =
|
|
AOBasis.make ~basis ~cartesian nuclei
|
|
in
|
|
|
|
let nuclear_repulsion =
|
|
Nuclei.repulsion nuclei
|
|
in
|
|
|
|
{
|
|
charge ; basis ; nuclei ; electrons ; ao_basis ;
|
|
nuclear_repulsion ;
|
|
}
|
|
|
|
|
|
let of_filenames ?cartesian:(cartesian=false) ?multiplicity:(multiplicity=1) ?charge:(charge=0) ~nuclei basis_filename =
|
|
let nuclei =
|
|
Nuclei.of_filename nuclei
|
|
in
|
|
let basis =
|
|
Basis.of_nuclei_and_basis_filename ~nuclei basis_filename
|
|
in
|
|
lazy (make ~cartesian ~charge ~multiplicity ~nuclei basis)
|
|
|> Parallel.broadcast
|
|
|