7.8 KiB
Angular Momentum
Azimuthal quantum number, repsesented as \( s,p,d,\dots \) .
Type
type t =
| S | P | D | F | G | H | I | J | K | L | M | N | O
| Int of int
exception Angular_momentum_error of string
type kind =
Singlet of t
| Doublet of (t * t)
| Triplet of (t * t * t)
| Quartet of (t * t * t * t)
An exception is raised when the Angular_momentum.t
element can't
be created.
The kind
is used to build shells, shell doublets, triplets or
quartets, use in the two-electron operators.
Conversions
of_char
Returns an Angular_momentum.t
when a shell is given as a character
(case insensitive):
Angular_momentum.of_char 'p' -> Angular_momentum.P
val of_char : char -> t
to_string
Converts the angular momentum into a string:
Angular_momentum.(to_string D) -> "D"
val to_string : t -> string
to_char
Converts the angular momentum into a char:
Angular_momentum.(to_char D) -> 'D'
val to_char : t -> char
to_int
Returns the $l_{max}$ value of the shell:
Angular_momentum.(to_char D) -> 2
val to_int : t -> int
of_int
Returns a shell given an $l$ value.
Angular_momentum.of_int 3 -> Angular_momentum.F
val of_int : int -> t
Shell functions
n_functions
Returns the number of cartesian functions in a shell.
Angular_momentum.n_functions D -> 6
val n_functions : t -> int
zkey_array
Array of Zkey.t
, where each element is a a key associated with the
the powers of $x,y,z$.
Angular_momentum.( zkey_array Doublet (P,S) ) -> [| {Zkey.left = 0; right = 1125899906842624} ; {Zkey.left = 0; right = 1099511627776} ; {Zkey.left = 0; right = 1073741824} |] = let s,x,y,z = Powers.( of_int_tuple (0,0,0), of_int_tuple (1,0,0), of_int_tuple (0,1,0), of_int_tuple (0,0,1) ) in Array.map (fun (a,b) -> {!Zkey.of_powers_six} a b) [| (x,s) ; (y,s) ; (z,s) |]
val zkey_array : kind -> Zkey.t array
Arithmetic
val ( + ) : t -> t -> t
val ( - ) : t -> t -> t
Printers
Printers can print as a string (pp_string
) or as an integer (pp_int
).
val pp_string : Format.formatter -> t -> unit
val pp_int : Format.formatter -> t -> unit