mirror of
https://gitlab.com/scemama/QCaml.git
synced 2025-01-02 17:45:40 +01:00
Notebook
This commit is contained in:
parent
536cad3098
commit
e1efc10289
7
.merlin
7
.merlin
@ -1,8 +1,5 @@
|
|||||||
EXCLUDE_QUERY_DIR
|
EXCLUDE_QUERY_DIR
|
||||||
B _build/default/.run_hartree_fock.eobjs/byte
|
B _build/**
|
||||||
B _build/default/Basis/.Basis.objs/byte
|
|
||||||
B _build/default/Nuclei/.Nuclei.objs/byte
|
|
||||||
S .
|
S .
|
||||||
S Basis
|
S ./**
|
||||||
S Nuclei
|
|
||||||
FLG -w @a-4-29-40-41-42-44-45-48-58-59-60-40 -strict-sequence -strict-formats -short-paths -keep-locs
|
FLG -w @a-4-29-40-41-42-44-45-48-58-59-60-40 -strict-sequence -strict-formats -short-paths -keep-locs
|
||||||
|
@ -40,6 +40,11 @@ let is_none t = Spindeterminant.(is_none t.alfa || is_none t.beta)
|
|||||||
let negate_phase t =
|
let negate_phase t =
|
||||||
{ t with alfa = Spindeterminant.negate_phase t.alfa }
|
{ t with alfa = Spindeterminant.negate_phase t.alfa }
|
||||||
|
|
||||||
|
let set_phase p t =
|
||||||
|
{ alfa = Spindeterminant.set_phase p t.alfa ;
|
||||||
|
beta = Spindeterminant.set_phase Phase.Pos t.beta
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
let degree_alfa t t' =
|
let degree_alfa t t' =
|
||||||
Spindeterminant.degree t.alfa t'.alfa
|
Spindeterminant.degree t.alfa t'.alfa
|
||||||
@ -61,6 +66,11 @@ let of_lists n a b =
|
|||||||
in of_spindeterminants alfa beta
|
in of_spindeterminants alfa beta
|
||||||
|
|
||||||
|
|
||||||
|
let to_lists t =
|
||||||
|
Spindeterminant.to_list t.alfa,
|
||||||
|
Spindeterminant.to_list t.beta
|
||||||
|
|
||||||
|
|
||||||
let creation spin p t =
|
let creation spin p t =
|
||||||
match spin with
|
match spin with
|
||||||
| Spin.Alfa -> { t with alfa = Spindeterminant.creation p t.alfa }
|
| Spin.Alfa -> { t with alfa = Spindeterminant.creation p t.alfa }
|
||||||
@ -89,6 +99,8 @@ let double_excitation spin h p spin' h' p' t =
|
|||||||
| Spin.(Beta, Beta) -> { t with beta = Spindeterminant.double_excitation h p h' p' t.beta }
|
| Spin.(Beta, Beta) -> { t with beta = Spindeterminant.double_excitation h p h' p' t.beta }
|
||||||
|
|
||||||
|
|
||||||
|
let compare = compare
|
||||||
|
|
||||||
|
|
||||||
let pp n ppf t =
|
let pp n ppf t =
|
||||||
Format.fprintf ppf "@[<v>@[phase:%a@]@;@[a:%a@]@;@[b:%a@]@]@."
|
Format.fprintf ppf "@[<v>@[phase:%a@]@;@[a:%a@]@;@[b:%a@]@]@."
|
||||||
|
@ -58,6 +58,9 @@ val degrees : t -> t -> int*int
|
|||||||
val degree : t -> t -> int
|
val degree : t -> t -> int
|
||||||
(** Returns degree of excitation between two determinants. *)
|
(** Returns degree of excitation between two determinants. *)
|
||||||
|
|
||||||
|
val to_lists : t -> int list * int list
|
||||||
|
(** Converts a Slater determinant to a pair of lists of orbital indices. *)
|
||||||
|
|
||||||
|
|
||||||
(** {1 Creators} *)
|
(** {1 Creators} *)
|
||||||
|
|
||||||
@ -73,6 +76,12 @@ val of_lists : int -> int list -> int list -> t
|
|||||||
val negate_phase : t -> t
|
val negate_phase : t -> t
|
||||||
(** Returns the same determinant with the phase negated. *)
|
(** Returns the same determinant with the phase negated. *)
|
||||||
|
|
||||||
|
val set_phase : Phase.t -> t -> t
|
||||||
|
(** Returns the same determinant with the phase set to [p]. *)
|
||||||
|
|
||||||
|
val compare : t -> t -> int
|
||||||
|
(** Comparison function for sorting *)
|
||||||
|
|
||||||
|
|
||||||
(** {1 Printers} *)
|
(** {1 Printers} *)
|
||||||
|
|
||||||
|
@ -96,6 +96,10 @@ let holes_particles_of t t' =
|
|||||||
List.map2 (fun h p -> (h,p)) holes particles
|
List.map2 (fun h p -> (h,p)) holes particles
|
||||||
|
|
||||||
|
|
||||||
|
let set_phase p = function
|
||||||
|
| Some t -> Some { t with phase = p }
|
||||||
|
| None -> None
|
||||||
|
|
||||||
let negate_phase = function
|
let negate_phase = function
|
||||||
| Some t -> Some { t with phase = Phase.neg t.phase }
|
| Some t -> Some { t with phase = Phase.neg t.phase }
|
||||||
| None -> None
|
| None -> None
|
||||||
|
@ -15,6 +15,10 @@ val phase : t -> Phase.t
|
|||||||
@raise Invalid_argument if the spin-determinant is [None].
|
@raise Invalid_argument if the spin-determinant is [None].
|
||||||
*)
|
*)
|
||||||
|
|
||||||
|
val set_phase : Phase.t -> t -> t
|
||||||
|
(** Returns a spin-determinant with the phase set to [p]. *)
|
||||||
|
|
||||||
|
|
||||||
val bitstring : t -> Bitstring.t
|
val bitstring : t -> Bitstring.t
|
||||||
(** Bit string.
|
(** Bit string.
|
||||||
@raise Invalid_argument if the spin-determinant is [None].
|
@raise Invalid_argument if the spin-determinant is [None].
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user