2019-02-20 19:43:16 +01:00
|
|
|
(**
|
|
|
|
The determinant space in which we solve the Schrodinger equation.
|
|
|
|
*)
|
|
|
|
|
|
|
|
type t
|
|
|
|
|
2019-03-03 01:43:04 +01:00
|
|
|
type arbitrary_space =
|
|
|
|
{
|
|
|
|
det : int array array ;
|
|
|
|
det_alfa : Spindeterminant.t array ;
|
|
|
|
det_beta : Spindeterminant.t array ;
|
|
|
|
index_start : int array;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-02-28 16:55:50 +01:00
|
|
|
type determinant_storage =
|
2019-03-03 01:43:04 +01:00
|
|
|
| Arbitrary of arbitrary_space
|
|
|
|
| Spin of (Spindeterminant.t array * Spindeterminant.t array)
|
|
|
|
|
2019-02-28 16:55:50 +01:00
|
|
|
|
2019-02-20 19:43:16 +01:00
|
|
|
(** {1 Accessors} *)
|
|
|
|
|
|
|
|
val n_alfa : t -> int
|
|
|
|
(** Number of {% $\alpha$ %} electrons in the {% $\alpha$ %} MOs. *)
|
|
|
|
|
|
|
|
val n_beta : t -> int
|
|
|
|
(** Number of {% $\beta$ %} electrons in the {% $\beta$ %} MOs. *)
|
|
|
|
|
|
|
|
val mo_class : t -> MOClass.t
|
|
|
|
(** The MO classes used to generate the space. *)
|
|
|
|
|
|
|
|
val mo_basis : t -> MOBasis.t
|
|
|
|
(** The MO basis on which the determinants are expanded. *)
|
|
|
|
|
2019-02-28 16:55:50 +01:00
|
|
|
val determinants : t -> determinant_storage
|
|
|
|
(** All the determinants belonging to the space. *)
|
|
|
|
|
|
|
|
val determinants_array : t -> Determinant.t array
|
2019-02-20 19:43:16 +01:00
|
|
|
(** All the determinants belonging to the space. *)
|
|
|
|
|
2019-02-28 14:25:57 +01:00
|
|
|
val determinant_stream : t -> Determinant.t Stream.t
|
|
|
|
(** All the determinants belonging to the space, as a stream. *)
|
|
|
|
|
2019-02-22 00:18:32 +01:00
|
|
|
val size : t -> int
|
|
|
|
(** Size of the determinant space *)
|
|
|
|
|
2019-03-19 19:07:55 +01:00
|
|
|
val fock_diag : t -> Determinant.t -> float array * float array
|
|
|
|
(** Returns the diagonal of the {% $\alpha$ %} and {% $\beta$ %} Fock matrices.
|
|
|
|
The zero elements contain the energy of the determinant.
|
|
|
|
*)
|
|
|
|
|
2019-02-22 00:18:32 +01:00
|
|
|
|
2019-03-23 15:54:46 +01:00
|
|
|
val fci_of_mo_basis : MOBasis.t -> frozen_core:bool -> t
|
2019-02-20 19:43:16 +01:00
|
|
|
(** Creates a space of all possible ways to put [n_alfa] electrons in the {% $\alpha$ %}
|
|
|
|
[Active] MOs and [n_beta] electrons in the {% $\beta$ %} [Active] MOs.
|
|
|
|
All other MOs are untouched.
|
|
|
|
*)
|
|
|
|
|
2019-03-23 15:54:46 +01:00
|
|
|
val cas_of_mo_basis : MOBasis.t -> frozen_core:bool -> int -> int -> t
|
2019-03-20 19:18:36 +01:00
|
|
|
(** Creates a CAS(n,m) space of determinants. *)
|
|
|
|
|
2019-03-23 15:54:46 +01:00
|
|
|
val fci_f12_of_mo_basis : MOBasis.t -> frozen_core:bool -> int -> t
|
2019-03-20 19:18:36 +01:00
|
|
|
(** Creates the active space to perform a FCI-F12 with an
|
|
|
|
auxiliary basis set. *)
|
|
|
|
|
2019-03-23 15:54:46 +01:00
|
|
|
val cas_f12_of_mo_basis : MOBasis.t -> frozen_core:bool -> int -> int -> int -> t
|
2019-03-20 19:18:36 +01:00
|
|
|
(** [cas_of_mo_basis mo_basis m n mo_num] Creates a CAS(n,m) space
|
|
|
|
of determinants with an auxiliary basis set defined as the MOs from
|
|
|
|
[mo_num+1] to [MOBasis.size mo_basis].
|
2019-03-18 19:17:15 +01:00
|
|
|
*)
|
|
|
|
|
2019-02-20 19:43:16 +01:00
|
|
|
(** {2 Printing} *)
|
|
|
|
|
2019-12-03 12:25:31 +01:00
|
|
|
val pp : Format.formatter -> t -> unit
|