diff --git a/Nuclei/Charge.mli b/Nuclei/Charge.mli index a54e81a..bc455bf 100644 --- a/Nuclei/Charge.mli +++ b/Nuclei/Charge.mli @@ -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 diff --git a/Nuclei/Element.mli b/Nuclei/Element.mli index 2f8cba7..9cf2c97 100644 --- a/Nuclei/Element.mli +++ b/Nuclei/Element.mli @@ -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 diff --git a/Utils/Angstrom.mli b/Utils/Angstrom.mli index fa6fd98..b68535e 100644 --- a/Utils/Angstrom.mli +++ b/Utils/Angstrom.mli @@ -8,4 +8,5 @@ type t = private { val make : Point.t -> t +(** Create from a {!Point.t}. *) diff --git a/Utils/Bohr.mli b/Utils/Bohr.mli index dd46b40..e5f8e96 100644 --- a/Utils/Bohr.mli +++ b/Utils/Bohr.mli @@ -8,5 +8,6 @@ type t = private { val make : Point.t -> t +(** Create from a {!Point.t}. *) diff --git a/Utils/Electrons.mli b/Utils/Electrons.mli index c5f750c..c85b048 100644 --- a/Utils/Electrons.mli +++ b/Utils/Electrons.mli @@ -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 *) }