9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-12 16:33:37 +01:00
qp2/ocaml/Determinant.mli
Anthony Scemama cebc19a601
Merge Master (#69)
* Changed native into SSE4.2 in gfortran.cfg

* Fixed rm opam_installer

* Fix configure

* Improving scaling of pt2 with network

* Router/dealer in qp_tunnel

* Reduced size of qp2.png

* Exclude temp files in tar

* Introduce NO_CACHE in configure for daily test

* Faster determinants in OCaml

* We always give max 10k dets in qp_edit. Read-only if more

* Fixed save_natorb

* Fixing bug in qp_edit

* Comments

* Biblio (#61)

* Biblio (#62)

* Update biblio

* Update paper

* Journal missing in research.bib

* Added paper

* Fixed Pierre Francois

* Checking number of electrons in MOs

* Biblio (#64)

* Update biblio

* Update paper

* Journal missing in research.bib

* Added paper

* Fixed Pierre Francois

* 2 papers

* Fixed 6-31G and quickstart (#65)

* Fixed 6-31 basis sets

* Bug in quickstart

* Biblio (#66)

* Bugfix (#67)

* Fixing opam installation

* Fixed 6-31 basis sets

* Bug in quickstart

* Use irpf90 v1.7.6

* Fix IRPF90 Path
2019-10-21 16:45:00 +02:00

34 lines
1.0 KiB
OCaml

(** Determinants are stored as follows :
* <-------- N_int ---------->
* [| i1_alpha ; i2_alpha ; ... ;
* i1_beta ; i2_beta ; ... ; |]
* where each int64 is a list of 64 MOs. When the bit is set
* to 1, the MO is occupied.
*)
type t = int64 array [@@deriving sexp]
(** Transform to an int64 array *)
val to_int64_array : t -> int64 array
(** Create from an int64 array, checking the number of alpha
* and beta electrons *)
val of_int64_array : n_int:Qptypes.N_int_number.t ->
alpha:Qptypes.Elec_alpha_number.t ->
beta:Qptypes.Elec_beta_number.t ->
int64 array -> t
(** Split into an alpha-only and a beta-only determinant *)
val to_alpha_beta : t -> (int64 array)*(int64 array)
(** Transform to a bit list *)
val to_bitlist_couple : t -> Bitlist.t * Bitlist.t
(** Create from a bit list *)
val of_bitlist_couple : n_int:Qptypes.N_int_number.t ->
alpha:Qptypes.Elec_alpha_number.t ->
beta:Qptypes.Elec_beta_number.t ->
Bitlist.t * Bitlist.t -> t
(** String representation *)
val to_string : mo_num:Qptypes.MO_number.t -> t -> string