10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-11-07 06:33:39 +01:00
QCaml/particles/element.org
2020-12-28 23:27:33 +01:00

14 KiB

Element

Chemical elements.

Type

type t =
|X
|H                                                 |He
|Li|Be                              |B |C |N |O |F |Ne
|Na|Mg                              |Al|Si|P |S |Cl|Ar
|K |Ca|Sc|Ti|V |Cr|Mn|Fe|Co|Ni|Cu|Zn|Ga|Ge|As|Se|Br|Kr
|Rb|Sr|Y |Zr|Nb|Mo|Tc|Ru|Rh|Pd|Ag|Cd|In|Sn|Sb|Te|I |Xe
                       |Pt          

exception ElementError of string

open Common

Conversion

val of_string      : string -> t
val to_string      : t -> string
val to_long_string : t -> string

val to_int : t -> int 
val of_int : int -> t

val to_charge : t -> Charge.t
val of_charge : Charge.t -> t
of_string Creates an Element.t from a chemical symbol or from the full name of the element (case insensitive)
to_string Gets the chemical symbol of the Element.t in a string
to_long_string Gets the full name of the Element.t in a string
to_int Convert to the atomic charge, with int type
of_int Create from the atomic charge, with int type
to_charge Convert to the atomic charge, with Charge.t type
of_charge Create from the atomic charge, with Charge.t type
Element.of_string "Fe" ;;
- : Element.t = Particles.Element.Fe

Element.of_string "hydrogen" ;;
- : Element.t = Particles.Element.H

Element.of_string "Kryptonite" ;;
Exception: Particles.Element.ElementError "Element Kryptonite unknown".

Element.(to_long_string Fe) ;;
- : string = "Iron"

Element.(to_string Fe);;
- : string = "Fe"

Database information

val covalent_radius : t -> Non_negative_float.t
val vdw_radius      : t -> Non_negative_float.t
val mass            : t -> Mass.t
val small_core      : t -> int
val large_core      : t -> int
covalent_radius Covalent radii of the elements, in atomic units
vdw_radius Van der Waals radii of the elements, in atomic units
mass Atomic mass of the elements, in atomic units)
small_core Number of electrons in the small core model (all except the outermost two shells)
large_core Number of electrons in the large core model (all except the outermost shell)

Printers

val pp      : Format.formatter -> t -> unit
val pp_long : Format.formatter -> t -> unit