mirror of
https://gitlab.com/scemama/QCaml.git
synced 2025-01-05 10:58:47 +01:00
47 lines
944 B
OCaml
47 lines
944 B
OCaml
open Qcaml_common
|
|
open Qcaml_particles
|
|
open Qcaml_ao_basis
|
|
open Qcaml_operators
|
|
|
|
type t = {
|
|
charge : Charge.t;
|
|
electrons : Electrons.t;
|
|
nuclei : Nuclei.t;
|
|
ao_basis : Ao_basis.t;
|
|
operators : Operator.t list;
|
|
}
|
|
|
|
let nuclei t = t.nuclei
|
|
let charge t = t.charge
|
|
let electrons t = t.electrons
|
|
let ao_basis t = t.ao_basis
|
|
let nuclear_repulsion t = Nuclei.repulsion @@ nuclei t
|
|
let operators t = t.operators
|
|
|
|
let make ?(multiplicity=1)
|
|
?(charge=0)
|
|
?(operators=[])
|
|
~nuclei
|
|
ao_basis
|
|
=
|
|
|
|
(* Tune Garbage Collector *)
|
|
let gc = Gc.get () in
|
|
Gc.set { gc with space_overhead = 1000 };
|
|
|
|
let electrons =
|
|
Electrons.of_atoms ~multiplicity ~charge nuclei
|
|
in
|
|
|
|
let charge =
|
|
Charge.(Nuclei.charge nuclei + Electrons.charge electrons)
|
|
in
|
|
|
|
{
|
|
charge ; nuclei ; electrons ; ao_basis ;
|
|
operators
|
|
}
|
|
|
|
|
|
|