mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-12-22 04:13:33 +01:00
Working on Element.mli
This commit is contained in:
parent
6f633fe37e
commit
ac3f079330
@ -1,13 +1,12 @@
|
||||
(** This type should be used for all charges in the program (electrons, nuclei,...). *)
|
||||
|
||||
type t = private float
|
||||
|
||||
(** Float conversion functions *)
|
||||
val to_float : t -> float
|
||||
val of_float : float -> t
|
||||
|
||||
(** Int conversion functions *)
|
||||
val to_int : t -> int
|
||||
val of_int : int -> t
|
||||
|
||||
(** String conversion functions *)
|
||||
val to_string: t -> string
|
||||
val of_string: string -> t
|
||||
|
@ -1,3 +1,5 @@
|
||||
(** Chemical elements. *)
|
||||
|
||||
exception ElementError of string
|
||||
|
||||
type t =
|
||||
@ -10,10 +12,35 @@ type t =
|
||||
|Pt
|
||||
|
||||
|
||||
(** String conversion functions *)
|
||||
val of_string : string -> t
|
||||
(** Creates an {!Element.t} from a chemical symbol or from the full name of the
|
||||
element (case insensitive).
|
||||
@raise ElementError upon failure
|
||||
|
||||
Examples:
|
||||
|
||||
{[
|
||||
Element.of_string "Fe" -> Element.Fe
|
||||
Element.of_string "hydrogen" -> Element.H
|
||||
Element.of_string "pouet" -> ElementError "Element pouet unknown"
|
||||
]}
|
||||
*)
|
||||
|
||||
val to_string : t -> string
|
||||
(** Gets the chemical symbol of the {!Element.t} in a string.
|
||||
|
||||
Example:
|
||||
|
||||
[Element.(to_string Fe) -> "Fe"]
|
||||
*)
|
||||
|
||||
val to_long_string : t -> string
|
||||
(** Gets the full name of the {!Element.t} in a string.
|
||||
|
||||
Example:
|
||||
|
||||
[Element.(to_long_string Fe) -> "Iron"]
|
||||
*)
|
||||
|
||||
(** Properties *)
|
||||
val to_int : t -> int
|
||||
|
@ -8,4 +8,5 @@ type t = private {
|
||||
|
||||
|
||||
val make : Point.t -> t
|
||||
(** Create from a {!Point.t}. *)
|
||||
|
||||
|
@ -8,5 +8,6 @@ type t = private {
|
||||
|
||||
|
||||
val make : Point.t -> t
|
||||
(** Create from a {!Point.t}. *)
|
||||
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
(** Information related to electrons. *)
|
||||
|
||||
type t = {
|
||||
n_alpha : int ; (** Number of alpha electrons *)
|
||||
n_beta : int ; (** Number of beta electrons *)
|
||||
multiplicity : int; (** Spin multiplicity: 2S+1 *)
|
||||
n_alpha : int ; (** Number of alpha electrons *)
|
||||
n_beta : int ; (** Number of beta electrons *)
|
||||
multiplicity : int ; (** Spin multiplicity: 2S+1 *)
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user